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

# Criar produto



## OpenAPI

````yaml https://erp.olist.com/public-api/v3/swagger/swagger-mintlify.json post /produtos
openapi: 3.0.0
info:
  title: Olist ERP API v3
  description: >-
    Documentação completa: <a href="https://api-docs.erp.olist.com"
    target="_blank">https://api-docs.erp.olist.com</a>
  version: '3.1'
servers:
  - url: https://api.tiny.com.br/public-api/v3
security: []
paths:
  /produtos:
    post:
      tags:
        - Produtos
      summary: Criar produto
      operationId: CriarProdutoAction
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CriarProdutoRequestModel'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CriarProdutoComVariacoesResponseModel'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDTO'
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '404':
          description: Not Found
        '500':
          description: Internal Server Error
        '503':
          description: Service Unavailable
      security:
        - bearerAuth: []
components:
  schemas:
    CriarProdutoRequestModel:
      title: ' '
      description: ' '
      type: object
      allOf:
        - $ref: '#/components/schemas/ProdutoModel'
        - required:
            - tipo
            - descricao
          properties:
            descricao:
              type: string
              nullable: false
            tipo:
              description: |-

                - K - Kit
                - S - Simples
                - V - Com Variacoes
                - F - Fabricado
                - M - Materia Prima
              type: string
              enum:
                - K
                - S
                - V
                - F
                - M
              x-enumDescriptions:
                - K - Kit
                - S - Simples
                - V - Com Variacoes
                - F - Fabricado
                - M - Materia Prima
            estoque:
              $ref: '#/components/schemas/CriarProdutoEstoqueRequestModel'
            seo:
              $ref: '#/components/schemas/SeoProdutoRequestModel'
            anexos:
              type: array
              items:
                $ref: '#/components/schemas/AnexoRequestModel'
            grade:
              description: >-
                Lista de chaves da grade. Obrigatório quando tipo = 'V'.
                Exemplo: ['Tamanho', 'Cor']. As chaves devem corresponder às
                chaves das grades das variações.
              type: array
              items:
                type: string
            producao:
              oneOf:
                - $ref: '#/components/schemas/ProducaoProdutoRequestModel'
              nullable: true
              description: >-
                Informações de produção do produto. Obrigatório quando tipo =
                'F' (Fabricado). Deve conter ao menos um produto ou uma etapa de
                produção.
            kit:
              description: Lista de produtos do kit. Obrigatório quando tipo = 'K' (Kit).
              type: array
              items:
                $ref: '#/components/schemas/ProdutoKitRequestModel'
            variacoes:
              description: Lista de variações do produto. Obrigatório quando tipo = 'V'.
              type: array
              items:
                $ref: '#/components/schemas/VariacaoProdutoRequestModel'
          type: object
    CriarProdutoComVariacoesResponseModel:
      title: ' '
      description: ' '
      type: object
      allOf:
        - $ref: '#/components/schemas/CriarProdutoResponseModel'
        - properties:
            variacoes:
              type: array
              items:
                $ref: '#/components/schemas/CriarProdutoResponseModel'
          type: object
    ErrorDTO:
      title: ' '
      description: ' '
      properties:
        mensagem:
          description: Mensagem de erro geral
          type: string
          example: Ocorreram erros de validação
        detalhes:
          description: Detalhes específicos do erro
          type: array
          items:
            $ref: '#/components/schemas/ErrorDetailDTO'
          example:
            - campo: codigo
              mensagem: O campo código é obrigatório
          nullable: true
      type: object
    ProdutoModel:
      title: ' '
      description: ' '
      type: object
      allOf:
        - required:
            - sku
          properties:
            sku:
              type: string
              nullable: false
            descricaoComplementar:
              type: string
              nullable: true
            unidade:
              type: string
              nullable: true
            unidadePorCaixa:
              type: string
              nullable: true
            ncm:
              type: string
              nullable: true
            gtin:
              type: string
              nullable: true
            origem:
              type: integer
              nullable: true
            codigoEspecificadorSubstituicaoTributaria:
              type: string
              nullable: true
            garantia:
              type: string
              nullable: true
            observacoes:
              type: string
              nullable: true
            marca:
              $ref: '#/components/schemas/MarcaRequestModel'
            categoria:
              $ref: '#/components/schemas/CategoriaRequestModel'
            precos:
              $ref: '#/components/schemas/PrecoProdutoRequestModel'
            dimensoes:
              $ref: '#/components/schemas/DimensoesProdutoRequestModel'
            tributacao:
              $ref: '#/components/schemas/TributacaoProdutoRequestModel'
            seo:
              $ref: '#/components/schemas/SeoProdutoRequestModel'
            fornecedores:
              type: array
              items:
                $ref: '#/components/schemas/FornecedorProdutoRequestModel'
          type: object
    CriarProdutoEstoqueRequestModel:
      title: ' '
      description: ' '
      type: object
      allOf:
        - $ref: '#/components/schemas/EstoqueProdutoRequestModel'
        - properties:
            inicial:
              type: number
              format: float
              nullable: true
          type: object
    SeoProdutoRequestModel:
      title: ' '
      description: ' '
      type: object
      allOf:
        - properties:
            titulo:
              type: string
              nullable: true
            descricao:
              type: string
              nullable: true
            keywords:
              type: array
              items:
                type: string
            linkVideo:
              type: string
              nullable: true
            slug:
              type: string
              nullable: true
          type: object
    AnexoRequestModel:
      title: ' '
      description: ' '
      properties:
        url:
          type: string
          nullable: true
        externo:
          type: boolean
      type: object
    ProducaoProdutoRequestModel:
      title: ' '
      description: ' '
      type: object
      allOf:
        - properties:
            produtos:
              description: >-
                Lista de produtos que compõem a estrutura de produção. Deve
                conter ao menos um produto ou uma etapa.
              type: array
              items:
                $ref: '#/components/schemas/ProdutoFabricadoRequestModel'
            etapas:
              description: >-
                Lista de etapas de produção. Deve conter ao menos um produto ou
                uma etapa.
              type: array
              items:
                type: string
          type: object
    ProdutoKitRequestModel:
      title: ' '
      description: ' '
      type: object
      allOf:
        - properties:
            produto:
              $ref: '#/components/schemas/ProdutoRequestModel'
            quantidade:
              type: number
              format: float
              nullable: false
          type: object
    VariacaoProdutoRequestModel:
      title: ' '
      description: ' '
      type: object
      allOf:
        - properties:
            sku:
              type: string
              nullable: false
            gtin:
              type: string
              nullable: true
            precos:
              $ref: '#/components/schemas/PrecoVariacaoRequestModel'
            estoque:
              $ref: '#/components/schemas/EstoqueVariacaoRequestModel'
            grade:
              description: >-
                Grade da variação. Cada item deve conter 'chave' e 'valor'. As
                chaves devem corresponder exatamente às chaves informadas na
                grade do produto. A quantidade de itens deve ser igual à
                quantidade de chaves na grade do produto.
              type: array
              items:
                $ref: '#/components/schemas/GradeVariacaoRequestModel'
              nullable: false
          type: object
    CriarProdutoResponseModel:
      title: ' '
      description: ' '
      properties:
        id:
          type: integer
        codigo:
          type: string
        descricao:
          type: string
      type: object
    ErrorDetailDTO:
      title: ' '
      description: ' '
      properties:
        campo:
          description: Campo que gerou o erro
          type: string
          example: codigo
        mensagem:
          description: Mensagem de erro específica do campo
          type: string
          example: O campo código é obrigatório
      type: object
    MarcaRequestModel:
      title: ' '
      description: ' '
      type: object
      allOf:
        - properties:
            id:
              type: integer
              nullable: true
          type: object
    CategoriaRequestModel:
      title: ' '
      description: ' '
      type: object
      allOf:
        - properties:
            id:
              type: integer
              nullable: true
          type: object
    PrecoProdutoRequestModel:
      title: ' '
      description: ' '
      type: object
      allOf:
        - properties:
            preco:
              type: number
              format: float
              nullable: true
            precoPromocional:
              type: number
              format: float
              nullable: true
            precoCusto:
              type: number
              format: float
              nullable: true
          type: object
    DimensoesProdutoRequestModel:
      title: ' '
      description: ' '
      type: object
      allOf:
        - properties:
            embalagem:
              $ref: '#/components/schemas/EmbalagemRequestModel'
            largura:
              type: number
              format: float
              nullable: true
            altura:
              type: number
              format: float
              nullable: true
            comprimento:
              type: number
              format: float
              nullable: true
            diametro:
              type: number
              format: float
              nullable: true
            pesoLiquido:
              type: number
              format: float
              nullable: true
            pesoBruto:
              type: number
              format: float
              nullable: true
          type: object
    TributacaoProdutoRequestModel:
      title: ' '
      description: ' '
      type: object
      allOf:
        - properties:
            gtinEmbalagem:
              type: string
              nullable: true
            valorIPIFixo:
              type: number
              format: float
              nullable: true
            classeIPI:
              type: string
              nullable: true
          type: object
    FornecedorProdutoRequestModel:
      title: ' '
      description: ' '
      type: object
      allOf:
        - properties:
            id:
              type: integer
              nullable: false
            codigoProdutoNoFornecedor:
              type: string
              nullable: true
            padrao:
              type: boolean
              nullable: false
          type: object
    EstoqueProdutoRequestModel:
      title: ' '
      description: ' '
      type: object
      allOf:
        - properties:
            controlar:
              type: boolean
            sobEncomenda:
              type: boolean
            minimo:
              type: number
              format: float
              nullable: true
            maximo:
              type: number
              format: float
              nullable: true
            diasPreparacao:
              type: integer
              nullable: true
            localizacao:
              type: string
              nullable: true
          type: object
    ProdutoFabricadoRequestModel:
      title: ' '
      description: ' '
      type: object
      allOf:
        - properties:
            produto:
              $ref: '#/components/schemas/ProdutoRequestModel'
            quantidade:
              type: number
              format: float
              nullable: false
          type: object
    ProdutoRequestModel:
      title: ' '
      description: ' '
      type: object
      allOf:
        - properties:
            id:
              type: integer
              nullable: false
            tipo:
              description: |-

                - P - Produto
                - S - Servico
              type: string
              enum:
                - P
                - S
              nullable: true
              x-enumDescriptions:
                - P - Produto
                - S - Servico
          type: object
    PrecoVariacaoRequestModel:
      title: ' '
      description: ' '
      type: object
      allOf:
        - properties:
            preco:
              type: number
              format: float
              nullable: true
            precoPromocional:
              type: number
              format: float
              nullable: true
          type: object
    EstoqueVariacaoRequestModel:
      title: ' '
      description: ' '
      type: object
      allOf:
        - properties:
            inicial:
              type: number
              format: float
              nullable: true
          type: object
    GradeVariacaoRequestModel:
      title: ' '
      description: ' '
      type: object
      allOf:
        - properties:
            chave:
              type: string
              nullable: false
            valor:
              type: string
              nullable: false
          type: object
    EmbalagemRequestModel:
      title: ' '
      description: ' '
      type: object
      allOf:
        - properties:
            id:
              type: integer
              nullable: true
            tipo:
              description: |-

                - 0 - Nao Definido
                - 1 - Envelope
                - 2 - Caixa
                - 3 - Cilindro
              type: integer
              enum:
                - 0
                - 1
                - 2
                - 3
              nullable: true
              x-enumDescriptions:
                - 0 - Nao Definido
                - 1 - Envelope
                - 2 - Caixa
                - 3 - Cilindro
          type: object
  securitySchemes:
    bearerAuth:
      type: http
      scheme: Bearer

````