> ## Documentation Index
> Fetch the complete documentation index at: https://developers.portao3.com.br/llms.txt
> Use this file to discover all available pages before exploring further.

# Update a supplier

> Updates a supplier.

Only organization admins can update a supplier. Send only the fields you want to change: the ones you omit keep their current value, and in `address` too, so you can change the city alone. A CNPJ with letters is stored in upper case, like on creation, and a `pixKey` always comes with its `pixKeyType`. The supplier's `status` can't be changed here: use the activate and deactivate routes. Answers the supplier as it is after the change.


## OpenAPI

````yaml /api-reference/registry.openapi.json put /realms/{realmId}/organizations/{organizationId}/suppliers/{supplierId}
openapi: 3.0.3
info:
  title: Registry
  version: 1.0.0
  description: >-
    Portão 3 registry API. Every endpoint requires a bearer token in the
    Authorization header (Authorization: Bearer <token>) unless its page states
    otherwise; see the Authentication guide. That requirement is not repeated
    per endpoint. Generated by tools/openapi from code (routes + security) and
    the hand-written spec (request/response bodies). Confidence tiers:
    generated:typed=37 copied:manual=0 unknown=0.
servers:
  - url: https://api.registry.v2.portao3.com.br/
    description: production
  - url: https://api.registry.dev.3pers.com.br/
    description: development
security: []
tags:
  - name: Customers
  - name: Companies
  - name: People
  - name: Products
  - name: Suppliers
paths:
  /realms/{realmId}/organizations/{organizationId}/suppliers/{supplierId}:
    put:
      tags:
        - Suppliers
      summary: Update a supplier
      description: Updates a supplier.
      operationId: putRealmsByRealmIdOrganizationsByOrganizationIdSuppliersBySupplierId
      parameters:
        - name: realmId
          in: path
          required: true
          description: |-
            ID of your realm.

            Format: `UUID`
          schema:
            type: string
            format: uuid
          example: f495ff0c-ab54-4f99-8e92-ca8682e4de9b
        - name: organizationId
          in: path
          required: true
          description: |-
            ID of the organization the supplier belongs to.

            Format: `UUID`
          schema:
            type: string
            format: uuid
          example: c4bd3f21-dfbd-44e8-8055-68ba15bed410
        - name: supplierId
          in: path
          required: true
          description: |-
            ID of the supplier (`id` in the supplier list).

            Format: `UUID`
          schema:
            type: string
            format: uuid
          example: 5f0c7d2a-91b4-4e6f-8a13-c2d4e6f80b17
      requestBody:
        required: false
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  description: >-
                    New name, up to 100 characters. Omit it to keep the current
                    one.
                  example: Transportadora Boa Viagem Ltda
                  type: string
                  minLength: 1
                  maxLength: 100
                tradingName:
                  description: >-
                    New trade name, up to 100 characters. Omit it to keep the
                    current one.
                  example: Boa Viagem Transportes
                  type: string
                  maxLength: 100
                document:
                  description: >-
                    New CPF or CNPJ: letters and digits only, with no dots,
                    slashes or hyphens (a CNPJ can contain letters). It must be
                    valid and agree with `documentType`. Omit it to keep the
                    current one.
                  example: '11222333000181'
                  type: string
                  minLength: 1
                  pattern: ^[A-Za-z0-9]+$
                documentType:
                  description: >-
                    `CPF` when the supplier is a person, `CNPJ` when it is a
                    company. When you also send `document`, it must match it.
                    Omit it to keep the current one.
                  example: CNPJ
                  type: string
                  enum:
                    - CPF
                    - CNPJ
                email:
                  description: New e-mail address. Omit it to keep the current one.
                  example: financeiro@boaviagem.example.com
                  type: string
                  format: email
                  pattern: >-
                    ^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$
                phoneNumber:
                  description: >-
                    New phone number in international format: `+55`, the area
                    code and the number, with no spaces or punctuation. Omit it
                    to keep the current one.
                  example: '+5534984325252'
                  type: string
                  pattern: ^\+55[0-9]{10,11}$
                address:
                  description: >-
                    The address fields to change. Send only the ones that
                    change: the others keep their current value.
                  type: object
                  properties:
                    street:
                      type: string
                      maxLength: 100
                      description: Street name, up to 100 characters.
                      example: Rua das Flores
                    number:
                      type: string
                      maxLength: 20
                      description: Street number, up to 20 characters.
                      example: '100'
                    neighborhood:
                      type: string
                      maxLength: 100
                      description: Neighborhood, up to 100 characters.
                      example: Centro
                    city:
                      type: string
                      maxLength: 50
                      description: City, up to 50 characters.
                      example: Uberlândia
                    state:
                      type: string
                      enum:
                        - AC
                        - AL
                        - AP
                        - AM
                        - BA
                        - CE
                        - ES
                        - GO
                        - MA
                        - MT
                        - MS
                        - MG
                        - PA
                        - PB
                        - PR
                        - PE
                        - PI
                        - RJ
                        - RN
                        - RS
                        - RO
                        - RR
                        - SC
                        - SP
                        - SE
                        - TO
                        - DF
                      description: State, as its two-letter abbreviation.
                      example: MG
                    postalCode:
                      type: string
                      pattern: ^\d{5}-\d{3}$
                      description: Postal code (CEP) as `00000-000`, with the hyphen.
                      example: 38400-000
                    complement:
                      description: >-
                        Complement such as a suite or a floor, up to 50
                        characters.
                      example: Sala 2
                      type: string
                      maxLength: 50
                pixKey:
                  description: >-
                    New PIX key: an e-mail address, 11 digits (a CPF or a phone
                    number), a CNPJ, a random key of 32 letters and digits, or 8
                    digits. Send `pixKeyType` with it.
                  example: financeiro@boaviagem.example.com
                  type: string
                  pattern: >-
                    ^[0-9a-zA-Z._-]+@[0-9a-zA-Z._-]+$|^[0-9]{11}$|^[A-Za-z0-9]{12}[0-9]{2}$|^[a-zA-Z0-9]{32}$|^[0-9]{8}$
                pixKeyType:
                  description: >-
                    Type of `pixKey`: `PHONE`, `EMAIL`, `CPF`, `CNPJ` or `EVP`
                    (a random key). Required when you send `pixKey`, and not
                    allowed without it.
                  example: EMAIL
                  type: string
                  enum:
                    - PHONE
                    - EMAIL
                    - CPF
                    - CNPJ
                    - EVP
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                    description: ID of the supplier.
                    example: 5f0c7d2a-91b4-4e6f-8a13-c2d4e6f80b17
                  realm:
                    type: string
                    description: ID of the realm the supplier belongs to.
                    example: f495ff0c-ab54-4f99-8e92-ca8682e4de9b
                    format: uuid
                  organization:
                    type: string
                    description: ID of the organization the supplier belongs to.
                    example: c4bd3f21-dfbd-44e8-8055-68ba15bed410
                    format: uuid
                  name:
                    type: string
                    description: Name of the supplier.
                    example: Transportadora Boa Viagem Ltda
                  tradingName:
                    type: string
                    description: Trade name of the supplier. Absent when none was given.
                    example: Boa Viagem Transportes
                  document:
                    type: string
                    description: >-
                      CPF or CNPJ of the supplier, with no punctuation. A CNPJ
                      with letters is returned in upper case.
                    example: '11222333000181'
                  documentType:
                    type: string
                    enum:
                      - CPF
                      - CNPJ
                    description: >-
                      `CPF` when the supplier is a person, `CNPJ` when it is a
                      company.
                    example: CNPJ
                  email:
                    type: string
                    description: E-mail address of the supplier.
                    example: financeiro@boaviagem.example.com
                  phoneNumber:
                    type: string
                    description: Phone number of the supplier in international format.
                    example: '+5534984325252'
                  address:
                    type: object
                    properties:
                      street:
                        type: string
                        description: Street name.
                        example: Rua das Flores
                      number:
                        type: string
                        description: Street number.
                        example: '100'
                      neighborhood:
                        type: string
                        description: Neighborhood.
                        example: Centro
                      city:
                        type: string
                        description: City.
                        example: Uberlândia
                      state:
                        type: string
                        description: State, as its two-letter abbreviation.
                        example: MG
                      postalCode:
                        type: string
                        description: Postal code (CEP) as `00000-000`.
                        example: 38400-000
                      complement:
                        type: string
                        description: >-
                          Complement such as a suite or a floor. Absent when
                          none was given.
                        example: Sala 2
                    required:
                      - street
                      - number
                      - neighborhood
                      - city
                      - state
                      - postalCode
                    description: Address of the supplier.
                  status:
                    type: string
                    enum:
                      - ACTIVE
                      - DEACTIVATED
                    description: >-
                      `ACTIVE`, or `DEACTIVATED` once the supplier was
                      deactivated.
                    example: ACTIVE
                  pixKey:
                    type: string
                    description: PIX key to pay the supplier. Absent when none was given.
                    example: financeiro@boaviagem.example.com
                  pixKeyType:
                    type: string
                    enum:
                      - PHONE
                      - EMAIL
                      - CPF
                      - CNPJ
                      - EVP
                    description: >-
                      Type of `pixKey`: `PHONE`, `EMAIL`, `CPF`, `CNPJ` or `EVP`
                      (a random key). Absent when there is no PIX key.
                    example: EMAIL
                  createdBy:
                    type: string
                    description: ID of the user who registered the supplier.
                    example: e3553bc1-5e20-4e17-b22a-a796fda0aa99
                    format: uuid
                  createdAt:
                    type: string
                    description: When the supplier was registered.
                    example: '2026-10-02T14:03:11.000Z'
                    format: date-time
                  updatedAt:
                    type: string
                    description: When the supplier was last changed.
                    example: '2026-10-05T09:30:00.000Z'
                    format: date-time
                required:
                  - id
                  - realm
                  - organization
                  - name
                  - document
                  - documentType
                  - email
                  - phoneNumber
                  - status
                description: 'A supplier of the organization: someone you pay.'
        '403':
          description: '`FORBIDDEN_SUPPLIER` — You are not an admin of the organization.'
          content:
            application/json:
              schema:
                type: object
                properties:
                  traceId:
                    type: string
                    description: >-
                      Identifier of the request that failed. Quote it when
                      contacting support.
                    example: 1-68ee2a1b-3c4d5e6f7a8b9c0d1e2f3a4b
                  code:
                    type: string
                    enum:
                      - FORBIDDEN_SUPPLIER
                    description: >-
                      Stable, machine-readable error code. Branch on this, never
                      on `message`.
                  origin:
                    type: string
                    enum:
                      - REGISTRY
                    description: Service that produced the error.
                  message:
                    type: string
                    description: >-
                      Human-readable explanation. Its wording may change without
                      notice.
                required:
                  - traceId
                  - code
                  - origin
                  - message
              example:
                traceId: 1-68ee2a1b-3c4d5e6f7a8b9c0d1e2f3a4b
                code: FORBIDDEN_SUPPLIER
                origin: REGISTRY
                message: You do not have permission to perform this action on supplier
        '404':
          description: >-
            `SUPPLIER_NOT_FOUND` — No supplier with this ID exists in the
            organization.
          content:
            application/json:
              schema:
                type: object
                properties:
                  traceId:
                    type: string
                    description: >-
                      Identifier of the request that failed. Quote it when
                      contacting support.
                    example: 1-68ee2a1b-3c4d5e6f7a8b9c0d1e2f3a4b
                  code:
                    type: string
                    enum:
                      - SUPPLIER_NOT_FOUND
                    description: >-
                      Stable, machine-readable error code. Branch on this, never
                      on `message`.
                  origin:
                    type: string
                    enum:
                      - REGISTRY
                    description: Service that produced the error.
                  message:
                    type: string
                    description: >-
                      Human-readable explanation. Its wording may change without
                      notice.
                required:
                  - traceId
                  - code
                  - origin
                  - message
              example:
                traceId: 1-68ee2a1b-3c4d5e6f7a8b9c0d1e2f3a4b
                code: SUPPLIER_NOT_FOUND
                origin: REGISTRY
                message: Supplier not found
        '422':
          description: >-
            `BAD_REQUEST` — A path parameter or a body field is invalid, such as
            a `supplierId` that is not a UUID, a document that is not a valid
            CPF or CNPJ or a phone number outside the `+55` format; `fields`
            lists each one.
          content:
            application/json:
              schema:
                type: object
                properties:
                  traceId:
                    type: string
                    description: >-
                      Identifier of the request that failed. Quote it when
                      contacting support.
                    example: 1-68ee2a1b-3c4d5e6f7a8b9c0d1e2f3a4b
                  code:
                    type: string
                    enum:
                      - BAD_REQUEST
                    description: >-
                      Stable, machine-readable error code. Branch on this, never
                      on `message`.
                  origin:
                    type: string
                    enum:
                      - REGISTRY
                    description: Service that produced the error.
                  message:
                    type: string
                    description: >-
                      Human-readable explanation. Its wording may change without
                      notice.
                  fields:
                    type: array
                    description: >-
                      One entry per invalid request field (validation errors
                      only).
                    items:
                      type: object
                      properties:
                        field:
                          type: string
                          description: >-
                            Path of the invalid field, e.g. `label` or
                            `values[0].value`.
                          example: label
                        message:
                          type: string
                          description: Why the field was rejected.
                          example: label is required
                        code:
                          type: string
                          description: >-
                            `<FIELD>_<REASON>` — e.g. `LABEL_REQUIRED`,
                            `TYPE_ONE_OF`, `VALUES_VALUE_TYPE_ERROR`.
                          example: LABEL_REQUIRED
                        values:
                          type: array
                          items:
                            type: string
                          description: >-
                            The accepted values, when the field is an
                            enumeration.
                      required:
                        - field
                        - message
                        - code
                required:
                  - traceId
                  - code
                  - origin
                  - message
              example:
                traceId: 1-68ee2a1b-3c4d5e6f7a8b9c0d1e2f3a4b
                code: BAD_REQUEST
                origin: REGISTRY
                message: >-
                  Bad Request: Your request is invalid or incomplete. Please
                  make sure you are requesting with the right fields.
                fields:
                  - field: name
                    message: 'Too big: expected string to have <=100 characters'
                    code: NAME_MAX

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.