> ## 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 conta a pagar



## OpenAPI

````yaml https://erp.olist.com/public-api/v3/swagger/swagger-mintlify.json post /contas-pagar
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:
  /contas-pagar:
    post:
      tags:
        - Contas a pagar
      summary: Criar conta a pagar
      operationId: CriarContaPagarAction
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CriarContaPagarRequestModel'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CriarContaPagarResponseModel'
        '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:
    CriarContaPagarRequestModel:
      title: ' '
      description: ' '
      required:
        - dataVencimento
        - valor
        - contato
      properties:
        data:
          type: string
          example: '2024-01-01'
          nullable: true
        dataVencimento:
          type: string
          example: '2024-01-01'
          nullable: false
        valor:
          type: number
          format: float
          nullable: false
        numeroDocumento:
          type: string
          nullable: true
        contato:
          $ref: '#/components/schemas/ContatoRequestModel'
        historico:
          type: string
          nullable: true
        categoria:
          $ref: '#/components/schemas/CategoriaRequestModel'
        dataCompetencia:
          type: string
          example: 2024-01
          nullable: true
        ocorrencia:
          description: |-

            - U - Unica
            - W - Semanal
            - Q - Quinzenal
            - M - Mensal
            - T - Trimestral
            - S - Semestral
            - A - Anual
            - P - Parcelada
          type: string
          enum:
            - U
            - W
            - Q
            - M
            - T
            - S
            - A
            - P
          nullable: true
          x-enumDescriptions:
            - U - Unica
            - W - Semanal
            - Q - Quinzenal
            - M - Mensal
            - T - Trimestral
            - S - Semestral
            - A - Anual
            - P - Parcelada
        formaPagamento:
          description: |-

            - 0 - Nao Definida
            - 2 - Dinheiro
            - 3 - Credito
            - 4 - Debito
            - 5 - Boleto
            - 6 - Deposito
            - 7 - Cheque
            - 8 - Crediario
            - 10 - Outra
            - 12 - Duplicata Mercantil
            - 14 - Vale
            - 15 - Pix
            - 16 - Vale Alimentacao
            - 17 - Vale Refeicao
            - 18 - Vale Presente
            - 19 - Vale Combustivel
            - 20 - Deposito Bancario
            - 21 - Transferencia Bancaria Carteira Digital
            - 22 - Fidelidade Cashback Credito Virtual
          type: integer
          enum:
            - 0
            - 2
            - 3
            - 4
            - 5
            - 6
            - 7
            - 8
            - 10
            - 12
            - 14
            - 15
            - 16
            - 17
            - 18
            - 19
            - 20
            - 21
            - 22
          nullable: true
          x-enumDescriptions:
            - 0 - Nao Definida
            - 2 - Dinheiro
            - 3 - Credito
            - 4 - Debito
            - 5 - Boleto
            - 6 - Deposito
            - 7 - Cheque
            - 8 - Crediario
            - 10 - Outra
            - 12 - Duplicata Mercantil
            - 14 - Vale
            - 15 - Pix
            - 16 - Vale Alimentacao
            - 17 - Vale Refeicao
            - 18 - Vale Presente
            - 19 - Vale Combustivel
            - 20 - Deposito Bancario
            - 21 - Transferencia Bancaria Carteira Digital
            - 22 - Fidelidade Cashback Credito Virtual
        diaVencimento:
          type: integer
          nullable: true
        quantidadeParcelas:
          type: integer
          nullable: true
        diaSemanaVencimento:
          type: integer
          nullable: true
      type: object
    CriarContaPagarResponseModel:
      title: ' '
      description: ' '
      properties:
        id:
          type: integer
      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
    ContatoRequestModel:
      title: ' '
      description: ' '
      properties:
        id:
          type: integer
          nullable: true
      type: object
    CategoriaRequestModel:
      title: ' '
      description: ' '
      type: object
      allOf:
        - properties:
            id:
              type: integer
              nullable: true
          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
  securitySchemes:
    bearerAuth:
      type: http
      scheme: Bearer

````