> ## 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.

# Importar nota fiscal

> Importa a nota fiscal de um pedido CDC a partir de um arquivo em base64.



## OpenAPI

````yaml POST /v1/order/invoice
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/invoice:
    post:
      tags:
        - Pedido
      summary: Importar nota fiscal.
      description: Importa a nota fiscal de um pedido CDC a partir de um arquivo em base64.
      operationId: importOrderInvoice
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: >-
                #/components/schemas/WebIntegration.Endpoints.Order.Requests.ImportOrderInvoiceFromBase64Content
            example:
              pedidoId: 00000000-0000-0000-0000-000000000000
              arquivoBase64: JVBERi0xLjQKJeLjz9MKMSAwIG9iago...
              nomeArquivo: nota-fiscal.pdf
      responses:
        '200':
          description: OK
        '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.ImportOrderInvoiceFromBase64Content:
      required:
        - pedidoId
        - arquivoBase64
        - nomeArquivo
      type: object
      properties:
        pedidoId:
          type: string
          format: uuid
          description: Identificador do pedido.
          example: 00000000-0000-0000-0000-000000000000
        arquivoBase64:
          minLength: 1
          type: string
          description: Conteúdo do arquivo da nota fiscal codificado em base64.
          example: JVBERi0xLjQKJeLjz9MKMSAwIG9iago...
        nomeArquivo:
          minLength: 1
          type: string
          description: 'Nome do arquivo com extensão (ex: nota-fiscal.pdf).'
          example: nota-fiscal.pdf
      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
  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

````