> ## 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.

# customer updated



## OpenAPI

````yaml https://integration.teceo.co/aos patch /v1/customers/{idOrCode}
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/{idOrCode}:
    patch:
      tags:
        - 'Customers:'
      summary: customer updated
      operationId: CustomerController_patchCustomer_v1
      parameters:
        - name: idOrCode
          required: true
          in: path
          description: 'customer identifier. search priority: 1) code, 2) id'
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/BrandIntegratorPatchCustomerDTO'
      responses:
        '200':
          description: customer updated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PatchCustomerResponseDTO'
        '400':
          description: >-
            response status code indicates that the server cannot or will not
            process the request due to something that is perceived to be a
            client error
        '403':
          description: >-
            client error status response code indicates that the server
            understood the request but refuses to authorize it
        '404':
          description: >-
            client error response code indicates that the server can't find the
            requested resource
      security:
        - ApiKey: []
components:
  schemas:
    BrandIntegratorPatchCustomerDTO:
      type: object
      properties:
        phone:
          type: string
        countryCode:
          type: string
        status:
          type: string
          enum:
            - DRAFT
            - PENDING
            - APPROVED
            - BLOCKED
            - INACTIVE
        companyName:
          type: string
        commercialName:
          type: string
        stateInscription:
          type: string
        email:
          type: string
        observation:
          type: string
        addresses:
          nullable: true
          type: array
          items:
            $ref: '#/components/schemas/CustomerAddressDto'
        salesRepresentatives:
          nullable: true
          type: array
          items:
            $ref: '#/components/schemas/BrandIntegratorCustomerSalesRepresentativeDto'
        classifications:
          nullable: true
          type: array
          items:
            $ref: '#/components/schemas/CustomerClassificationDto'
        priceTable:
          $ref: '#/components/schemas/BrandIntegratorPatchCustomerPriceTableDTO'
        creditLimit:
          type: number
        availableBalance:
          type: number
        suframaCode:
          type: string
        customerParentCode:
          type: string
          nullable: true
          description: parent customer code. pass null to remove the parent relationship.
        customFields:
          description: custom fields to be set to the customer
          type: array
          items:
            $ref: '#/components/schemas/CustomerCustomFieldBrandIntegrator'
        contacts:
          nullable: true
          description: >-
            customer contacts to be updated. each contact must have a name and
            at least email or phone. duplicate emails or phones are not allowed.
            if provided as array, all existing contacts will be replaced. if
            provided as null or empty array, all contacts will be removed
          type: array
          items:
            $ref: '#/components/schemas/UpdateCustomerContactDTO'
    PatchCustomerResponseDTO:
      type: object
      properties:
        status:
          type: number
        message:
          type: string
      required:
        - status
    CustomerAddressDto:
      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
        customerAddressId:
          type: string
          description: customer address id
        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
    CustomerClassificationDto:
      type: object
      properties:
        name:
          type: string
        code:
          type: string
        classificationType:
          $ref: '#/components/schemas/CustomerClassificationTypeDto'
      required:
        - name
        - code
        - classificationType
    BrandIntegratorPatchCustomerPriceTableDTO:
      type: object
      properties:
        integrationCode:
          type: string
      required:
        - integrationCode
    CustomerCustomFieldBrandIntegrator:
      type: object
      properties:
        name:
          type: string
        value:
          type: object
      required:
        - name
        - value
    UpdateCustomerContactDTO:
      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
    CustomerClassificationTypeDto:
      type: object
      properties:
        name:
          type: string
        code:
          type: string
      required:
        - name
        - code
  securitySchemes:
    ApiKey:
      type: apiKey
      in: header
      name: x-api-key
      description: unique identifier access key. each brand has it own unique key.

````