# Create customer

Route to create customer

Endpoint: POST /customers
Version: 1.0

## Header parameters:

  - `x-api-key` (string, required)
    Api key provided on integrations tab in Easyflow platform.

  - `x-api-secret` (string, required)
    Api Secret provided on integrations tab in Easyflow platform.

## Request fields (application/json):

  - `businessId` (string, required)

  - `name` (string, required)

  - `email` (string, required)

  - `address` (object)

  - `address.zipCode` (string)

  - `address.street` (string)

  - `address.complement` (string)

  - `address.neighborhood` (string)

  - `address.city` (string)

  - `address.state` (string)
    The state must send an abbreviation (Example: sp)

  - `address.number` (string)

  - `deliveryAddress` (object)

  - `deliveryAddress.zipCode` (string)

  - `deliveryAddress.street` (string)

  - `deliveryAddress.complement` (string)

  - `deliveryAddress.neighborhood` (string)

  - `deliveryAddress.city` (string)

  - `deliveryAddress.state` (string)
    The state must send an abbreviation (Example: sp)

  - `deliveryAddress.number` (string)

  - `document` (object, required)

  - `document.type` (string)
    Enum: "CPF", "CNPJ"

  - `document.number` (string)

  - `phone` (object)

  - `phone.areaCode` (string)

  - `phone.ddd` (string)

  - `phone.number` (string)

  - `phone.isMobile` (boolean)

## Response 200 fields (application/json):

  - `statusCode` (integer)
    Example: 200

  - `data` (object)

  - `data.customer` (object)

  - `data.customer.id` (string)

  - `data.customer.createdAt` (string)

  - `data.customer.updatedAt` (string)

  - `data.customer.deleted` (boolean)

  - `data.customer.name` (string)

  - `data.customer.businessId` (string)

  - `data.customer.userId` (string)

  - `data.customer.email` (string)

  - `data.customer.phone` (object)

  - `data.customer.phone.areaCode` (string)

  - `data.customer.phone.ddd` (string)

  - `data.customer.phone.number` (string)

  - `data.customer.phone.isMobile` (boolean)

  - `data.customer.address` (object)

  - `data.customer.address.zipCode` (string)

  - `data.customer.address.street` (string)

  - `data.customer.address.number` (string)

  - `data.customer.address.complement` (string)

  - `data.customer.address.neighborhood` (string)

  - `data.customer.address.city` (string)

  - `data.customer.address.state` (string)
    The state must send an abbreviation (Example: sp)

  - `data.customer.deliveryAddress` (object)

  - `data.customer.deliveryAddress.zipCode` (string)

  - `data.customer.deliveryAddress.street` (string)

  - `data.customer.deliveryAddress.number` (string)

  - `data.customer.deliveryAddress.complement` (string)

  - `data.customer.deliveryAddress.neighborhood` (string)

  - `data.customer.deliveryAddress.city` (string)

  - `data.customer.deliveryAddress.state` (string)
    The state must send an abbreviation (Example: sp)

  - `data.customer.document` (object)

  - `data.customer.document.type` (string)
    Enum: "CPF", "CNPJ"

  - `data.customer.document.number` (string)

## Response 400 fields (application/json):

  - `message` (string)
    Invalid param: []
    Example: "Invalid param: []"

  - `error` (string)
    Bad Request
    Example: "Bad Request"

  - `statusCode` (integer)
    400
    Example: 400

## Response 401 fields (application/json):

  - `message` (string)
    Invalid field
    Example: "Unauthorized"

  - `error` (string)
    Unauthorized
    Example: "Unauthorized"

  - `statusCode` (integer)
    401
    Example: 401

## Response 403 fields (application/json):

  - `message` (string)
    Forbidden resource
    Example: "Forbidden resource"

  - `error` (string)
    Forbidden
    Example: "Forbidden"

  - `statusCode` (integer)
    403
    Example: 403

## Response 500 fields (application/json):

  - `message` (string)
    Internal server error
    Example: "Internal server error"

  - `error` (string)
    Internal Server Error
    Example: "Internal Server Error"

  - `statusCode` (integer)
    500
    Example: 500


