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

# Atualizar mercadoria



## OpenAPI

````yaml /openapi-nfe.json patch /mercadorias/{codigo}
openapi: 3.0.1
info:
  title: Invo API Docs — NF-e
  version: v1
servers:
  - url: https://invo.work/api/nfe/v1
security: []
tags:
  - name: Notas de Produto
  - name: Inutilizações
  - name: Mercadorias
  - name: Empresa
paths:
  /mercadorias/{codigo}:
    patch:
      tags:
        - Mercadorias
      summary: Atualizar mercadoria
      parameters:
        - name: X-Empresa-CNPJ
          in: header
          required: false
          schema:
            description: >-
              CNPJ da empresa emitente. Ausente, usa a primeira empresa da
              conta.
            type: string
        - name: codigo
          in: path
          required: false
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                nome:
                  type: string
                descricao:
                  type: string
                ncm:
                  type: string
                cest:
                  type: string
                cfop_padrao:
                  type: string
                unidade_comercial:
                  type: string
                valor:
                  description: >-
                    * Número decimal codificado como texto. Por exemplo:
                    '123.45'
                  type: string
                  pattern: ^\d*\.?\d*$
                  format: decimal number
                origem:
                  type: integer
                cst_icms:
                  type: string
                csosn:
                  type: string
                aliquota_icms:
                  description: >-
                    * Número decimal codificado como texto. Por exemplo:
                    '123.45'
                  type: string
                  pattern: ^\d*\.?\d*$
                  format: decimal number
                cst_pis:
                  type: string
                cst_cofins:
                  type: string
                padrao:
                  type: boolean
              additionalProperties: false
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                type: object
                properties:
                  codigo:
                    type: string
                  nome:
                    type: string
                  descricao:
                    type: string
                  ncm:
                    type: string
                  cest:
                    type: string
                  cfop_padrao:
                    type: string
                  unidade_comercial:
                    type: string
                  valor:
                    description: >-
                      * Número decimal codificado como texto. Por exemplo:
                      '123.45'
                    type: string
                    pattern: ^\d*\.?\d*$
                    format: decimal number
                  origem:
                    type: integer
                  cst_icms:
                    type: string
                  csosn:
                    type: string
                  aliquota_icms:
                    description: >-
                      * Número decimal codificado como texto. Por exemplo:
                      '123.45'
                    type: string
                    pattern: ^\d*\.?\d*$
                    format: decimal number
                  aliquota_icms_percent:
                    type: string
                  cst_pis:
                    type: string
                  cst_cofins:
                    type: string
                  padrao:
                    type: boolean
                  created_at:
                    type: string
                  updated_at:
                    type: string
                required:
                  - codigo
                  - nome
                  - ncm
                  - cfop_padrao
                  - unidade_comercial
                  - valor
                  - padrao
                  - created_at
                  - updated_at
                additionalProperties: false
          description: OK
        '401':
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    enum:
                      - 'HTTP Basic: Access denied.'
                required:
                  - error
                additionalProperties: false
          description: Unauthorized
        '404':
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    enum:
                      - Mercadoria não encontrada
                required:
                  - error
                additionalProperties: false
          description: Not Found
        '422':
          content:
            application/json:
              schema:
                oneOf:
                  - type: object
                    properties:
                      error:
                        type: string
                        enum:
                          - Erro ao salvar mercadoria
                    required:
                      - error
                    additionalProperties: false
                  - type: object
                    properties:
                      error:
                        type: string
                        enum:
                          - invalid_params
                      params:
                        description: >-
                          An object containing error messages for all invalid
                          params
                        type: object
                        additionalProperties:
                          type: string
                    required:
                      - error
                      - params
                    additionalProperties: false
          description: Unprocessable Content
      security:
        - basicAuth: []
components:
  securitySchemes:
    basicAuth:
      type: http
      scheme: basic

````