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

# Criar pedido

> Cria um novo pedido CDC com os dados do cliente e as informações da venda.



## OpenAPI

````yaml POST /v1/order
openapi: 3.0.1
info:
  title: WebIntegration
  description: Este documento descreve os endpoints disponíveis da API.
  version: '1.0'
servers:
  - url: https://api.staging.cartaosimples.com.br/integration
    description: Servidor para o ambiente de staging
security:
  - bearerAuth: []
paths:
  /v1/order:
    post:
      tags:
        - Pedido
      summary: Criar pedido.
      description: >-
        Cria um novo pedido CDC com os dados do cliente e as informações da
        venda.
      operationId: createOrder
      requestBody:
        content:
          application/json:
            schema:
              $ref: >-
                #/components/schemas/WebIntegration.Endpoints.Order.Requests.CreateOrderRequestContent
            example:
              cpf: '12345678901'
              celular: +55 (11) 91234-5678
              documentoEstabelecimento: '12345678000195'
              valorSolicitado: 1500
              nome: João da Silva
              email: joao.silva@email.com
              dataDeNascimento: '1990-05-15T00:00:00Z'
              endereco:
                logradouro: Av. Paulista
                numero: '1578'
                complemento: Bloco B, Apto 1203
                bairro: Bela Vista
                cidade: São Paulo
                estado: SP
                cep: '01311000'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/Customer.Shared.Responses.IdentifierResponse
              example:
                pedidoId: 3c90c3cc-0d44-4b50-8888-8dd25736052a
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails'
        '500':
          description: Internal Server Error
components:
  schemas:
    WebIntegration.Endpoints.Order.Requests.CreateOrderRequestContent:
      required:
        - celular
        - cpf
        - dataDeNascimento
        - documentoEstabelecimento
        - email
        - nome
        - valorSolicitado
      type: object
      properties:
        cpf:
          minLength: 1
          type: string
          example: '12345678901'
        celular:
          minLength: 1
          type: string
          example: +55 (11) 91234-5678
        documentoEstabelecimento:
          minLength: 1
          type: string
          example: '12345678000195'
        valorSolicitado:
          type: number
          format: double
          example: 1500
        nome:
          minLength: 1
          type: string
          example: João da Silva
        email:
          minLength: 1
          type: string
          example: joao.silva@email.com
        dataDeNascimento:
          type: string
          format: date-time
          example: '2023-11-07T05:31:56Z'
        endereco:
          $ref: >-
            #/components/schemas/WebIntegration.Endpoints.Order.Requests.AddressRequestContent
      additionalProperties: false
    Customer.Shared.Responses.IdentifierResponse:
      type: object
      properties:
        pedidoId:
          type: string
          format: uuid
      additionalProperties: false
    Microsoft.AspNetCore.Mvc.ProblemDetails:
      type: object
      properties:
        tipo:
          type: string
          nullable: true
        titulo:
          type: string
          nullable: true
        status:
          type: integer
          format: int32
          nullable: true
        detalhe:
          type: string
          nullable: true
        instancia:
          type: string
          nullable: true
      example:
        tipo: https://tools.ietf.org/html/rfc7231#section-6.5.1
        titulo: Requisição inválida.
        status: 400
        detalhe: O campo 'cpf' é obrigatório.
        instancia: /v1/order
    WebIntegration.Endpoints.Order.Requests.AddressRequestContent:
      type: object
      properties:
        logradouro:
          type: string
          nullable: true
          example: Av. Paulista
        cidade:
          type: string
          nullable: true
          example: São Paulo
        estado:
          type: string
          nullable: true
          example: SP
          maxLength: 2
        bairro:
          type: string
          nullable: true
          example: Bela Vista
        cep:
          type: string
          nullable: true
          example: '01311000'
        numero:
          type: string
          nullable: true
          example: '1578'
        complemento:
          type: string
          nullable: true
          example: Bloco B, Apto 1203
      additionalProperties: false
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: >-
        Cabeçalho de autenticação Bearer no formato `Bearer <token>` onde
        `<token>` é seu TOKEN de autenticação

````