> ## Documentation Index
> Fetch the complete documentation index at: https://docs.teceo.co/llms.txt
> Use this file to discover all available pages before exploring further.

# creates a new customer



## OpenAPI

````yaml https://integration.teceo.co/aos post /v1/customers
openapi: 3.0.0
info:
  title: teceo brand integrator API
  description: integrate your brand with teceo
  version: '1.0'
  contact: {}
servers:
  - url: /
security: []
tags: []
paths:
  /v1/customers:
    post:
      tags:
        - 'Customers:'
      summary: creates a new customer
      operationId: CustomerController_postCustomer_v1
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/BrandIntegratorPostCustomerDTO'
      responses:
        '200':
          description: creates a new customer
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BrandIntegratorPostCustomerDTO'
      security:
        - ApiKey: []
components:
  schemas:
    BrandIntegratorPostCustomerDTO:
      type: object
      properties:
        isPJ:
          type: boolean
          description: >-
            determines if this customer is a company or not. only required when
            location is Brazil
        commercialName:
          type: string
          description: commercial name of the customer
        companyName:
          type: string
          description: >-
            company name of the customer, if it's a company. only required when
            location is Brazil
        code:
          type: string
          description: code of the customer. it must be unique
        location:
          type: string
          description: >-
            two letter country code defined by ISO 3166-1 Alpha-2 that defines
            where the customer is located
          enum:
            - AD
            - AE
            - AF
            - AG
            - AI
            - AL
            - AM
            - AO
            - AQ
            - AR
            - AS
            - AT
            - AU
            - AW
            - AX
            - AZ
            - BA
            - BB
            - BD
            - BE
            - BF
            - BG
            - BH
            - BI
            - BJ
            - BL
            - BM
            - BN
            - BO
            - BR
            - BS
            - BT
            - BV
            - BW
            - BY
            - BZ
            - CA
            - CC
            - CD
            - CF
            - CG
            - CH
            - CI
            - CK
            - CL
            - CM
            - CN
            - CO
            - CR
            - CU
            - CV
            - CW
            - CX
            - CY
            - CZ
            - DE
            - DJ
            - DK
            - DM
            - DO
            - DZ
            - EC
            - EE
            - EG
            - EH
            - ER
            - ES
            - ET
            - FI
            - FJ
            - FK
            - FM
            - FO
            - FR
            - GA
            - GB
            - GD
            - GE
            - GF
            - GG
            - GH
            - GI
            - GL
            - GM
            - GN
            - GP
            - GQ
            - GR
            - GS
            - GT
            - GU
            - GW
            - GY
            - HK
            - HM
            - HN
            - HR
            - HT
            - HU
            - ID
            - IE
            - IL
            - IM
            - IN
            - IO
            - IQ
            - IR
            - IS
            - IT
            - JE
            - JM
            - JO
            - JP
            - KE
            - KG
            - KH
            - KI
            - KM
            - KN
            - KP
            - KR
            - KW
            - KY
            - KZ
            - LA
            - LB
            - LC
            - LI
            - LK
            - LR
            - LS
            - LT
            - LU
            - LV
            - LY
            - MA
            - MC
            - MD
            - ME
            - MF
            - MG
            - MH
            - MK
            - ML
            - MM
            - MN
            - MO
            - MP
            - MQ
            - MR
            - MS
            - MT
            - MU
            - MV
            - MW
            - MX
            - MY
            - MZ
            - NA
            - NC
            - NE
            - NF
            - NG
            - NI
            - NL
            - 'NO'
            - NP
            - NR
            - NU
            - NZ
            - OM
            - PA
            - PE
            - PF
            - PG
            - PH
            - PK
            - PL
            - PM
            - PN
            - PR
            - PS
            - PT
            - PW
            - PY
            - QA
            - RE
            - RO
            - RS
            - RU
            - RW
            - SA
            - SB
            - SC
            - SD
            - SE
            - SG
            - SH
            - SI
            - SJ
            - SK
            - SL
            - SM
            - SN
            - SO
            - SR
            - SS
            - ST
            - SV
            - SX
            - SY
            - SZ
            - TC
            - TD
            - TF
            - TG
            - TH
            - TJ
            - TK
            - TL
            - TM
            - TN
            - TO
            - TR
            - TT
            - TV
            - TW
            - TZ
            - UA
            - UG
            - US
            - UY
            - UZ
            - VA
            - VC
            - VE
            - VG
            - VI
            - VN
            - VU
            - WF
            - WS
            - XK
            - YE
            - YT
            - ZA
            - ZM
            - ZW
        documentType:
          type: string
          description: type of document that the customer will be using to register itself.
          enum:
            - CNPJ
            - CPF
            - TAX_ID
            - NIF
            - PASSPORT
            - OTHER
        cpfcnpj:
          type: string
          description: document that the customer will be using to register itself.
        stateInscription:
          type: string
          description: customer's state inscription
        countryCode:
          type: string
          description: >-
            countryCode refers to the international dialing code (DDI) of the
            country where the customer is located.
        phone:
          type: string
          description: phone number of the customer
        email:
          type: string
          description: customer email is required if location is set to Brazil
        observation:
          type: string
          description: observations about the customer
        status:
          type: string
          enum:
            - DRAFT
            - PENDING
            - APPROVED
            - BLOCKED
            - INACTIVE
          description: customer status
        priceTableCode:
          type: string
          description: >-
            if the customer has a price table, then the code of the price table
            must be provided
        creditLimit:
          type: number
          description: customer credit limit
        availableBalance:
          type: number
          description: customer available balance
        customerParentCode:
          type: string
          description: >-
            if the customer has a parent, then one existing customer parent code
            must be provided
        addresses:
          description: >-
            customer address to be created after the customer. one of them must
            be the principal
          type: array
          items:
            $ref: '#/components/schemas/CreateCustomerAddressDTO'
        salesRepresentatives:
          description: >-
            list of sales representatives to be related to the customer. should
            be used a code of an existent sales representative
          type: array
          items:
            $ref: '#/components/schemas/BrandIntegratorCustomerSalesRepresentativeDto'
        classifications:
          description: >-
            customer classifications to be created and binded or binded, if they
            already exists
          type: array
          items:
            $ref: '#/components/schemas/CreateClassificationDTO'
        suframaCode:
          type: string
          description: SUFRAMA code of the customer, if applicable
        customFields:
          description: custom fields to be set to the customer
          type: array
          items:
            $ref: '#/components/schemas/CustomerCustomFieldBrandIntegrator'
        origin:
          type: string
          enum:
            - INTEGRATION
            - EXTERNAL_FORM
          description: customer origin
        contacts:
          description: >-
            customer contacts to be created. Each contact must have a name and
            at least email or phone. Duplicate emails or phones are not allowed
          type: array
          items:
            $ref: '#/components/schemas/CreateCustomerContactDTO'
      required:
        - commercialName
        - status
    CreateCustomerAddressDTO:
      type: object
      properties:
        zipCode:
          type: string
          description: address zip code
        streetDescription:
          type: string
          description: address street name
        streetNumber:
          type: string
          description: address street number
        complement:
          type: string
          description: address complement
        reference:
          type: string
          description: address reference
        neighborhood:
          type: string
          description: address neighborhood
        city:
          type: string
          description: address city
        state:
          type: string
          description: address state
        country:
          type: string
          description: address country
        code:
          type: string
          description: address code
        type:
          type: string
          description: address type
          enum:
            - DELIVERY
            - BILLING
            - COMMERCIAL
        principal:
          type: boolean
          description: principal address
          default: false
      required:
        - zipCode
        - streetDescription
        - city
        - state
        - country
        - type
    BrandIntegratorCustomerSalesRepresentativeDto:
      type: object
      properties:
        code:
          type: string
        principal:
          type: boolean
          default: false
      required:
        - code
    CreateClassificationDTO:
      type: object
      properties:
        name:
          type: string
        code:
          type: string
        classificationTypeId:
          type: string
          description: id of the classification type it belongs to
        description:
          type: string
      required:
        - name
        - code
        - classificationTypeId
    CustomerCustomFieldBrandIntegrator:
      type: object
      properties:
        name:
          type: string
        value:
          type: object
      required:
        - name
        - value
    CreateCustomerContactDTO:
      type: object
      properties:
        name:
          type: string
          description: contact name
          example: string
        surname:
          type: string
          description: contact surname
          example: string
        email:
          type: string
          description: >-
            contact email, required if phone is not provided. Must be unique
            across all contacts
          example: example@email.com
        phone:
          type: string
          description: >-
            contact phone, required if email is not provided. Must be unique
            across all contacts
          example: string
        countryCode:
          type: string
          description: contact country code, required if phone is provided
          example: '55'
        position:
          type: string
          enum:
            - BUYER
            - OWNER
            - MANAGER
            - DIRECTOR
            - SUPERVISOR
          example: BUYER
      required:
        - name
  securitySchemes:
    ApiKey:
      type: apiKey
      in: header
      name: x-api-key
      description: unique identifier access key. each brand has it own unique key.

````