VTEX Invoices API

The Invoices API from VTEX — 5 operation(s) for invoices.

Documentation

📖
Documentation
https://developers.vtex.com/docs/guides/how-the-integration-protocol-between-vtex-and-antifraud-companies-works
📖
Documentation
https://developers.vtex.com/docs/guides/bulk-import-buyer-organizations-spreadsheet
📖
Documentation
https://developers.vtex.com/docs/guides/catalog-api-seller-portal-overview
📖
Documentation
https://developers.vtex.com/docs/guides/catalog-overview
📖
Documentation
https://developers.vtex.com/docs/guides/checkout-overview
📖
Documentation
https://help.vtex.com/en/tutorial/customer-credit-overview--1uIqTjWxIIIEW0COMg4uE0
📖
Documentation
https://help.vtex.com/en/tutorial/data-subject-rights--6imchxTx09icupKMbzHVIM
📖
Documentation
https://developers.vtex.com/docs/api-reference/do-api
📖
Documentation
https://developers.vtex.com/docs/guides/managing-vtex-gift-cards
📖
Documentation
https://developers.vtex.com/docs/guides/gift-card-integration-guide
📖
Documentation
https://developers.vtex.com/docs/guides/faststore/headless-cms-overview
📖
Documentation
https://developers.vtex.com/docs/api-reference/vtex-id-api
📖
Documentation
https://help.vtex.com/en/tracks/vtex-intelligent-search--19wrbB7nEQcmwzDPl1l4Cb/3qgT47zY08biLP3d5os3DG
📖
Documentation
https://developers.vtex.com/docs/apps/vtex.search@1.0.8
📖
Documentation
https://help.vtex.com/en/tracks/cms--2YcpgIljVaLVQYMzxQbc3z/1oN446gRGcR2s70RvBCAmj
📖
Documentation
https://developers.vtex.com/docs/guides/search-overview
📖
Documentation
https://help.vtex.com/en/tutorial/license-manager-resources--3q6ztrC8YynQf6rdc6euk3
📖
Documentation
https://developers.vtex.com/docs/guides/fulfillment
📖
Documentation
https://developers.vtex.com/docs/guides/marketplace-overview
📖
Documentation
https://developers.vtex.com/updates/release-notes/marketplace-protocol-documentation-update
📖
Documentation
https://developers.vtex.com/docs/guides/external-marketplace-integration-guide
📖
Documentation
https://developers.vtex.com/docs/guides/external-seller-integration-connector
📖
Documentation
https://developers.vtex.com/docs/guides/external-seller-integration-guide
📖
Documentation
https://help.vtex.com/en/tutorial/master-data--4otjBnR27u4WUIciQsmkAw
📖
Documentation
https://help.vtex.com/en/tutorial/understanding-the-message-center--tutorials_84
📖
Documentation
https://developers.vtex.com/docs/guides/orders-overview
📖
Documentation
https://developers.vtex.com/docs/guides/changes-in-vtex-features-behavior-to-handle-pii-data
📖
Documentation
https://help.vtex.com/en/tutorial/payment-provider-protocol--RdsT2spdq80MMwwOeEq0m
📖
Documentation
https://developers.vtex.com/docs/guides/payments-integration-guide
📖
Documentation
https://help.vtex.com/en/tutorial/vtex-pick-and-pack-last-mile--HN7WKV0xoq2ssVjsJlfzr
📖
Documentation
https://developers.vtex.com/docs/guides/vtex-io-documentation-policies
📖
Documentation
https://developers.vtex.com/docs/guides/pricing-hub
📖
Documentation
https://developers.vtex.com/docs/guides/pricing-overview
📖
Documentation
https://developers.vtex.com/docs/guides/profile-system
📖
Documentation
https://developers.vtex.com/docs/guides/promotions-overview
📖
Documentation
https://developers.vtex.com/docs/apps/vtex.reviews-and-ratings
📖
Documentation
https://developers.vtex.com/docs/guides/sent-offers-integration-guide-connectors
📖
Documentation
https://developers.vtex.com/docs/guides/sessions-system-overview
📖
Documentation
https://developers.vtex.com/docs/guides/vtex-shipping-network
📖
Documentation
https://help.vtex.com/en/tutorial/sku-bindings--1SmrVgNwjJX17hdqwLa0TX
📖
Documentation
https://developers.vtex.com/docs/guides/subscriptions
📖
Documentation
https://developers.vtex.com/docs/apps/vtex.search/suggestions
📖
Documentation
https://developers.vtex.com/docs/guides/vtex-tracking

Specifications

OpenAPI Specification

vtex-invoices-api-openapi.yml Raw ↑
openapi: 3.0.0
info:
  title: VTex Anti-fraud Provider Account Invoices API
  description: ">ℹ️ Onboarding guide\r\n>\r\n> Check the new [Payments onboarding guide](https://developers.vtex.com/docs/guides/payments-overview). We created this guide to improve the onboarding experience for developers at VTEX. It assembles all documentation on our Developer Portal about Payments and is organized by focusing on the developer's journey.\r\n\r\nThe Anti-fraud Provider Protocol is a set of definitions to help you integrate your anti-fraud service API into VTEX platform.\r\n\r\nTo achieve this, you need to implement a web API (REST) following the specifications described in this documentation.\r\n\r\n>⚠️ You can also access our [template on GitHub](https://github.com/vtex-apps/antifraud-provider-example) to help you quickly develop your anti-fraud connector using the Anti-fraud Provider Protocol and VTEX IO.\r\n\r\nTo learn more about the Anti-fraud Provider Protocol, check our [developer guide](https://developers.vtex.com/docs/guides/how-the-integration-protocol-between-vtex-and-antifraud-companies-works).\r\n\r\n## Anti-fraud Provider API Index\r\n\r\n### Anti-fraud  Flow\r\n\r\n- `POST` [Send Anti-fraud Pre-Analysis Data (optional)](https://developers.vtex.com/docs/api-reference/antifraud-provider-protocol#post-/pre-analysis)\r\n- `POST` [Send Anti-fraud Data](https://developers.vtex.com/docs/api-reference/antifraud-provider-protocol#post-/transactions)\r\n- `PUT` [Update Anti-fraud Transactions (optional)](https://developers.vtex.com/docs/api-reference/antifraud-provider-protocol#put-/transactions/-transactionId-)\r\n- `GET` [List Anti-fraud Provider Manifest](https://developers.vtex.com/docs/api-reference/antifraud-provider-protocol#get-/manifest)\r\n- `GET` [Get Anti-fraud Status](https://developers.vtex.com/docs/api-reference/antifraud-provider-protocol#get-/transactions/-transactions.id-)\r\n- `DELETE` [Stop Anti-fraud Analysis (optional)](https://developers.vtex.com/docs/api-reference/antifraud-provider-protocol#delete-/transactions/-transactions.Id-)\r\n\r\n### OAuth Flow\r\n\r\n1. `POST` [Retrieve Token](https://developers.vtex.com/docs/api-reference/antifraud-provider-protocol#post-/authorization/token)\r\n2. `GET` [Redirect](https://developers.vtex.com/docs/api-reference/antifraud-provider-protocol#get-/redirect)\r\n3. `GET` [Return to VTEX](https://developers.vtex.com/docs/api-reference/antifraud-provider-protocol#get-/authorizationCode)\r\n4. `GET` [Get Credentials](https://developers.vtex.com/docs/api-reference/antifraud-provider-protocol#get-/authorization/credentials)"
  version: '1.0'
servers:
- url: https://{providerApiEndpoint}
  description: Anti-fraud provider endpoint URL.
  variables:
    providerApiEndpoint:
      description: Anti-fraud provider endpoint URL.
      default: '{providerApiEndpoint}'
tags:
- name: Invoices
paths:
  /api/creditcontrol/invoices:
    get:
      tags:
      - Invoices
      summary: VTex Search all invoices
      description: "Returns a list of invoices related to payment orders created through [customer credit accounts](https://help.vtex.com/en/tracks/customer-credit-getting-started--1hCRg21lXYy2seOKgqQ2CC/7FHLd0cmxqqGeEUuc8uioU).\r\n\r\n>ℹ️ Query parameters can be used individually or combined to filter invoice results.\r\n\r\n### Queries to filter results\r\n\r\n- **By the location of the invoices in the list (quantity of invoices)**: `?from={int}&to={int}`\r\n- **By creation date**: `?createdDateFrom={dateISO8601}&createDateTo={dateISO8601}`. The dates should be in ISO8601 format.\r\n- **By due date**: `?dueDateFrom={dateISO8601}&dueDateTo={dateISO8601}`. The dates should be in ISO8601 format.\r\n- **By value**: `?value={decimal}`\r\n- **By status**: `?status={string}`\r\n- **By Id**: `?friendlyId={string}`\r\n- **By observation**: `?observation={string}`\r\n- **By creditAccountId**: `?creditAccountId={creditAcountId}`\r\n\r\n### Combining filters\r\n\r\nYou can use the `op` query parameter to specify if filters will be evaluated as `AND` or `OR` for the query. The default behavior when there is more than one query parameter is `AND`.\r\n\r\nExample:\r\n\r\nFor the query `?value=100&status=Paid`, the criteria will build **value = 100 AND status = Paid**.\r\n\r\nFor the same query, adding the `op` parameter (`?value=100&status=Paid&op=or`), the criteria will build **value = 100 OR status = Paid**.\r\n\r\n## Permissions\r\n\r\nAny user or [application key](https://developers.vtex.com/docs/guides/api-authentication-using-application-keys) must have at least one of the appropriate [License Manager resources](https://help.vtex.com/en/tutorial/license-manager-resources--3q6ztrC8YynQf6rdc6euk3) to be able to successfully run this request. Otherwise they will receive a status code `403` error. These are the applicable resources for this endpoint:\r\n\r\n| **Product** | **Category** | **Resource** |\r\n| --------------- | ----------------- | ----------------- |\r\n| Credit Control | Main | **Main Access** |\r\n| Credit Control | Invoices | **Read Invoices** |\r\n\r\nThere are no applicable [predefined roles](https://help.vtex.com/en/tutorial/predefined-roles--jGDurZKJHvHJS13LnO7Dy) for this resource list. You must [create a custom role](https://help.vtex.com/en/tutorial/roles--7HKK5Uau2H6wxE1rH5oRbc#creating-a-role) and add at least one of the resources above in order to use this endpoint.To learn more about machine authentication at VTEX, see [Authentication overview](https://developers.vtex.com/docs/guides/authentication).\r\n\r\n>❗ To prevent integrations from having excessive permissions, consider the [best practices for managing app keys](https://help.vtex.com/en/tutorial/best-practices-application-keys--7b6nD1VMHa49aI5brlOvJm) when assigning License Manager roles to integrations."
      operationId: Searchallinvoices
      parameters:
      - $ref: '#/components/parameters/Content-Type'
      - $ref: '#/components/parameters/Accept'
      - name: from
        in: query
        description: Indicates the starting position of the invoice to be searched in the invoice list. For example, the value `1` indicates that the first invoice in the list will be returned.
        required: false
        style: form
        schema:
          type: string
          example: '1'
      - name: to
        in: query
        description: Indicates the final position of the invoice to be searched in the invoice list. For example, if the value of `from` is equal to `1` and `to` is `300`, information from 300 invoices will be displayed in the response body of the request.
        required: false
        style: form
        schema:
          type: string
          example: '300'
      - name: createdDateFrom
        in: query
        description: Indicates the initial creation date of invoices that should be searched in the invoice list based on their creation date. The dates should be in ISO8601 format.
        required: false
        style: form
        schema:
          type: string
          example: '2023-01-20'
      - name: createdDateTo
        in: query
        description: Indicates the final creation date of invoices that should be searched in the invoice list based on their creation date. The dates should be in ISO8601 format.
        required: false
        style: form
        schema:
          type: string
          example: '2023-01-25'
      - name: dueDateFrom
        in: query
        description: Indicates the initial due date of invoices that should be searched in the invoice list based on their creation date. The dates should be in ISO8601 format.
        required: false
        style: form
        schema:
          type: string
          example: '2023-01-20'
      - name: dueDateTo
        in: query
        description: Indicates the final due date of invoices that should be searched in the invoice list based on their creation date. The dates should be in ISO8601 format.
        required: false
        style: form
        schema:
          type: string
          example: '2023-01-25'
      - name: value
        in: query
        description: Indicates the value of the invoices to be searched for. It must be completed with a decimal value.
        required: false
        style: form
        schema:
          type: number
          example: 101.22
      - name: status
        in: query
        description: Indicates the status of the invoices to be searched for.
        required: false
        style: form
        schema:
          type: string
          enum:
          - Open
          - Paid
          - Cancelled
          example: Paid
      - $ref: '#/components/parameters/friendlyId'
      - name: observation
        in: query
        description: Observation notes about the invoice.
        required: false
        style: form
        schema:
          type: string
          example: Some observation about the invoice
      - name: creditAccountId
        in: query
        description: Credit account identification.
        required: true
        style: form
        schema:
          type: string
          example: 01bce461-9g03-12ds-8217-b3d39271e15b
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                required:
                - data
                - summary
                type: object
                properties:
                  data:
                    type: array
                    description: Data information.
                    items:
                      required:
                      - id
                      - friendlyId
                      - status
                      - value
                      - accountId
                      - creditValue
                      - createdAt
                      - updatedAt
                      - originalDueDate
                      - dueDate
                      - installment
                      - orderId
                      - transactionId
                      - numberOfInstallments
                      - creditAccountId
                      type: object
                      description: Object with information about each invoice.
                      properties:
                        id:
                          type: string
                          description: Invoice identification.
                        friendlyId:
                          type: string
                          description: Simplified identification of an invoice. This code is created automatically, always associated with an existing invoice. It consists of an 8-digit random ID (of numbers and letters) and the installment.
                        status:
                          type: string
                          description: Invoice status.
                          enum:
                          - Opened
                          - Paid
                          - Cancelled
                        value:
                          type: number
                          description: Invoice value.
                        accountId:
                          type: string
                          description: Account identification. It is the same `creditAccountId` parameter used in other Customer Credit API endpoints.
                        creditValue:
                          type: number
                          description: Credit value.
                        createdAt:
                          type: string
                          description: Invoice creation date.
                        resolvedAt:
                          type: string
                          description: Invoice closing date.
                          nullable: true
                        updatedAt:
                          type: string
                          description: Date of the last update made to the invoice.
                        paymentLink:
                          type: string
                          description: Link (URL) created to direct the customer to an invoice payment environment (optional).
                          nullable: true
                        originalDueDate:
                          type: string
                          description: Original invoice expiration date.
                        dueDate:
                          type: string
                          description: Modified invoice expiration date.
                        installment:
                          type: number
                          description: Identification of installment number.
                        orderId:
                          type: string
                          description: Identification of the order that generated the invoice.
                        observation:
                          type: string
                          description: Observation notes about the invoice.
                          nullable: true
                        transactionId:
                          type: string
                          description: Identification of the invoice transaction. This is the same number as the `id` field, removing the last three characters.
                        numberOfInstallments:
                          type: number
                          description: Number of installments.
                        creditAccountId:
                          type: string
                          description: Credit account identification. It is the same `accountId` parameter used in other Customer Credit API endpoints.
                  summary:
                    required:
                    - total
                    - count
                    type: object
                    description: Summary information.
                    properties:
                      total:
                        type: number
                        description: Total amount payable (sum of invoices listed with status `Open`).
                      count:
                        type: integer
                        description: Number of invoices listed.
                      totalPaid:
                        type: number
                        description: Total amount paid (sum of invoices listed with status `Paid`).
                      totalCancelled:
                        type: number
                        description: Total amount canceled (sum of invoices listed with status `Cancelled`).
              example:
                data:
                - id: A424887D0F2D45028FE5C96E9B0E1A2D-01
                  friendlyId: u8KFsGDk-1
                  status: Paid
                  value: 5.01
                  accountId: fcba59e0-7f26-11ee-ba3c-511336e1518b
                  creditValue: 0
                  createdAt: '2023-11-09T18:26:43.2112234Z'
                  resolvedAt: '2023-11-13T19:12:17.2778233Z'
                  updatedAt: '2023-11-13T19:12:17.3403115Z'
                  paymentLink: https://www.teste.com.br
                  originalDueDate: '2023-12-09T18:26:43.2112234Z'
                  dueDate: '2023-12-09T18:26:43.2112234Z'
                  installment: 1
                  orderId: 1375060513100-01
                  observation: Open test
                  transactionId: A424887D0F2D45028FE5C96E9B0E1A2D
                  numberOfInstallments: 1
                  creditAccountId: fcba59e0-7f26-11ee-ba3c-511336e1518b
                - id: 742F1758D81F4E93BC2A3F8A382D44A8-01
                  friendlyId: 8UfrLSCc-1
                  status: Opened
                  value: 0.91
                  accountId: fcba59e0-7f26-11ee-ba3c-511336e1518b
                  creditValue: 0
                  createdAt: '2023-11-10T19:46:50.551354Z'
                  updatedAt: '2023-11-14T12:07:21.9823956Z'
                  originalDueDate: '2023-12-10T19:46:50.551354Z'
                  dueDate: '2023-12-18T19:46:50.551354Z'
                  installment: 1
                  orderId: 1375070513102-01
                  transactionId: 742F1758D81F4E93BC2A3F8A382D44A8
                  numberOfInstallments: 1
                  creditAccountId: fcba59e0-7f26-11ee-ba3c-511336e1518b
                - id: 742235D7E5E840798EC28A02EBA9E855-01
                  friendlyId: mvOEfmdk-1
                  status: Cancelled
                  value: 1.21
                  accountId: fcba59e0-7f26-11ee-ba3c-511336e1518b
                  creditValue: 0
                  createdAt: '2023-11-13T18:05:39.1334296Z'
                  resolvedAt: '2023-11-13T19:25:22.1919688Z'
                  updatedAt: '2023-11-13T19:25:22.3326219Z'
                  originalDueDate: '2023-12-13T18:05:39.1334296Z'
                  dueDate: '2023-12-13T18:05:39.1334296Z'
                  installment: 1
                  orderId: 1376020513104-01
                  transactionId: 742235D7E5E840798EC28A02EBA9E855
                  numberOfInstallments: 1
                  creditAccountId: fcba59e0-7f26-11ee-ba3c-511336e1518b
                summary:
                  total: 0.91
                  count: 3
                  totalPaid: 5.01
                  totalCancelled: 1.21
      deprecated: false
  /api/creditcontrol/accounts/{creditAccountId}/invoices/{invoiceId}:
    get:
      tags:
      - Invoices
      summary: VTex Retrieve invoice by ID
      description: "Returns data from a specific invoice using `invoiceId`.\r\n\r\n## Permissions\r\n\r\nAny user or [application key](https://developers.vtex.com/docs/guides/api-authentication-using-application-keys) must have at least one of the appropriate [License Manager resources](https://help.vtex.com/en/tutorial/license-manager-resources--3q6ztrC8YynQf6rdc6euk3) to be able to successfully run this request. Otherwise they will receive a status code `403` error. These are the applicable resources for this endpoint:\r\n\r\n| **Product** | **Category** | **Resource** |\r\n| --------------- | ----------------- | ----------------- |\r\n| Credit Control | Main | **Main Access** |\r\n| Credit Control | Invoices | **Read Invoices** |\r\n\r\nThere are no applicable [predefined roles](https://help.vtex.com/en/tutorial/predefined-roles--jGDurZKJHvHJS13LnO7Dy) for this resource list. You must [create a custom role](https://help.vtex.com/en/tutorial/roles--7HKK5Uau2H6wxE1rH5oRbc#creating-a-role) and add at least one of the resources above in order to use this endpoint.To learn more about machine authentication at VTEX, see [Authentication overview](https://developers.vtex.com/docs/guides/authentication).\r\n\r\n>❗ To prevent integrations from having excessive permissions, consider the [best practices for managing app keys](https://help.vtex.com/en/tutorial/best-practices-application-keys--7b6nD1VMHa49aI5brlOvJm) when assigning License Manager roles to integrations."
      operationId: RetrieveInvoicebyId
      parameters:
      - $ref: '#/components/parameters/Content-Type'
      - $ref: '#/components/parameters/Accept'
      - $ref: '#/components/parameters/creditAccountId'
      - $ref: '#/components/parameters/invoiceId'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                required:
                - id
                - friendlyId
                - status
                - value
                - accountId
                - creditValue
                - createdAt
                - updatedAt
                - originalDueDate
                - dueDate
                - installment
                - orderId
                - transactionId
                - numberOfInstallments
                - creditAccountId
                type: object
                properties:
                  id:
                    type: string
                    description: Invoice identification.
                  friendlyId:
                    type: string
                    description: Simplified identification of an invoice. This code is created automatically, always associated with an existing invoice. It consists of an 8-digit random ID (of numbers and letters) and the installment.
                  status:
                    type: string
                    description: Invoice status.
                    enum:
                    - Opened
                    - Paid
                    - Cancelled
                  value:
                    type: number
                    description: Invoice value.
                  accountId:
                    type: string
                    description: Account identification. It is the same `checkingAccountId` parameter used in other Customer Credit API endpoints.
                  creditValue:
                    type: number
                    description: Credit value.
                  createdAt:
                    type: string
                    description: Invoice creation date.
                  updatedAt:
                    type: string
                    description: Date of the last update made to the invoice.
                  originalDueDate:
                    type: string
                    description: Original invoice expiration date.
                  dueDate:
                    type: string
                    description: Modified invoice expiration date.
                  installment:
                    type: number
                    description: Identification of installment number.
                  orderId:
                    type: string
                    description: Identification of the order that generated the invoice.
                  transactionId:
                    type: string
                    description: Identification of the invoice transaction. This is the same number as the `id` field, removing the last three characters.
                  numberOfInstallments:
                    type: number
                    description: Number of installments.
                  creditAccountId:
                    type: string
                    description: Credit account identification. It is the same `accountId` parameter used in other Customer Credit API endpoints.
              example:
                id: A424887D0F2D45028FE5C96E9B0E1A2D-01
                friendlyId: u8KFsGDk-1
                status: Opened
                value: 50.01
                accountId: fcba59e0-7f26-11ee-ba3c-511336e1518b
                creditValue: 0
                createdAt: '2023-11-09T18:26:43.2112234Z'
                updatedAt: '2023-11-09T18:26:43.289316Z'
                originalDueDate: '2023-12-09T18:26:43.2112234Z'
                dueDate: '2023-12-09T18:26:43.2112234Z'
                installment: 1
                orderId: 1375060513100-01
                transactionId: A424887D0F2D45028FE5C96E9B0E1A2D
                numberOfInstallments: 1
                creditAccountId: fcba59e0-7f26-11ee-ba3c-511336e1518b
      deprecated: false
    put:
      tags:
      - Invoices
      summary: VTex Change invoice
      description: "Updates invoice's `status`, `observation` and `paymentLink` attributes.\r\n\r\n## Permissions\r\n\r\nAny user or [application key](https://developers.vtex.com/docs/guides/api-authentication-using-application-keys) must have at least one of the appropriate [License Manager resources](https://help.vtex.com/en/tutorial/license-manager-resources--3q6ztrC8YynQf6rdc6euk3) to be able to successfully run this request. Otherwise they will receive a status code `403` error. These are the applicable resources for this endpoint:\r\n\r\n| **Product** | **Category** | **Resource** |\r\n| --------------- | ----------------- | ----------------- |\r\n| Credit Control | Main | **Main Access** |\r\n| Credit Control | Invoices | **Create Invoices** |\r\n\r\nThere are no applicable [predefined roles](https://help.vtex.com/en/tutorial/predefined-roles--jGDurZKJHvHJS13LnO7Dy) for this resource list. You must [create a custom role](https://help.vtex.com/en/tutorial/roles--7HKK5Uau2H6wxE1rH5oRbc#creating-a-role) and add at least one of the resources above in order to use this endpoint.To learn more about machine authentication at VTEX, see [Authentication overview](https://developers.vtex.com/docs/guides/authentication).\r\n\r\n>❗ To prevent integrations from having excessive permissions, consider the [best practices for managing app keys](https://help.vtex.com/en/tutorial/best-practices-application-keys--7b6nD1VMHa49aI5brlOvJm) when assigning License Manager roles to integrations."
      operationId: ChangeInvoice
      parameters:
      - $ref: '#/components/parameters/Content-Type'
      - $ref: '#/components/parameters/Accept'
      - $ref: '#/components/parameters/creditAccountId'
      - $ref: '#/components/parameters/invoiceId'
      - $ref: '#/components/parameters/friendlyId'
      requestBody:
        content:
          application/json:
            schema:
              required:
              - status
              type: object
              properties:
                status:
                  type: string
                  description: Invoice status.
                  enum:
                  - Open
                  - Paid
                  - Cancelled
                  example: Paid
                observation:
                  type: string
                  description: Observation notes about the invoice.
                  example: BF 2023 customer invoice.
                  nullable: true
                paymentLink:
                  type: string
                  description: Link (URL) created to direct the customer to an invoice payment environment (optional).
                  example: https://paymentlink.com
                  nullable: true
        required: true
      responses:
        '200':
          description: OK. This endpoint does not return any data in the response body.
      deprecated: false
    delete:
      tags:
      - Invoices
      summary: VTex Cancel invoice
      description: "Changes the status of a specific invoice (`invoiceId`) to `Cancelled`.\r\n\r\n## Permissions\r\n\r\nAny user or [application key](https://developers.vtex.com/docs/guides/api-authentication-using-application-keys) must have at least one of the appropriate [License Manager resources](https://help.vtex.com/en/tutorial/license-manager-resources--3q6ztrC8YynQf6rdc6euk3) to be able to successfully run this request. Otherwise they will receive a status code `403` error. These are the applicable resources for this endpoint:\r\n\r\n| **Product** | **Category** | **Resource** |\r\n| --------------- | ----------------- | ----------------- |\r\n| Credit Control | Main | **Main Access** |\r\n| Credit Control | Invoices | **Create Invoices** |\r\n\r\nThere are no applicable [predefined roles](https://help.vtex.com/en/tutorial/predefined-roles--jGDurZKJHvHJS13LnO7Dy) for this resource list. You must [create a custom role](https://help.vtex.com/en/tutorial/roles--7HKK5Uau2H6wxE1rH5oRbc#creating-a-role) and add at least one of the resources above in order to use this endpoint.To learn more about machine authentication at VTEX, see [Authentication overview](https://developers.vtex.com/docs/guides/authentication).\r\n\r\n>❗ To prevent integrations from having excessive permissions, consider the [best practices for managing app keys](https://help.vtex.com/en/tutorial/best-practices-application-keys--7b6nD1VMHa49aI5brlOvJm) when assigning License Manager roles to integrations."
      operationId: CancelInvoice
      parameters:
      - $ref: '#/components/parameters/Content-Type'
      - $ref: '#/components/parameters/Accept'
      - $ref: '#/components/parameters/creditAccountId'
      - $ref: '#/components/parameters/invoiceId'
      responses:
        '200':
          description: OK. This endpoint does not return any data in the response body.
      deprecated: false
  /api/creditcontrol/accounts/{creditAccountId}/invoices:
    get:
      tags:
      - Invoices
      summary: VTex Retrieve invoices by creditaccountid
      description: "Returns associated invoices given a specific `creditAccountId`.\r\n\r\n## Permissions\r\n\r\nAny user or [application key](https://developers.vtex.com/docs/guides/api-authentication-using-application-keys) must have at least one of the appropriate [License Manager resources](https://help.vtex.com/en/tutorial/license-manager-resources--3q6ztrC8YynQf6rdc6euk3) to be able to successfully run this request. Otherwise they will receive a status code `403` error. These are the applicable resources for this endpoint:\r\n\r\n| **Product** | **Category** | **Resource** |\r\n| --------------- | ----------------- | ----------------- |\r\n| Credit Control | Main | **Main Access** |\r\n| Credit Control | Invoices | **Read Invoices** |\r\n\r\nThere are no applicable [predefined roles](https://help.vtex.com/en/tutorial/predefined-roles--jGDurZKJHvHJS13LnO7Dy) for this resource list. You must [create a custom role](https://help.vtex.com/en/tutorial/roles--7HKK5Uau2H6wxE1rH5oRbc#creating-a-role) and add at least one of the resources above in order to use this endpoint.To learn more about machine authentication at VTEX, see [Authentication overview](https://developers.vtex.com/docs/guides/authentication).\r\n\r\n>❗ To prevent integrations from having excessive permissions, consider the [best practices for managing app keys](https://help.vtex.com/en/tutorial/best-practices-application-keys--7b6nD1VMHa49aI5brlOvJm) when assigning License Manager roles to integrations."
      operationId: SearchallinvoicesofaAccount
      parameters:
      - $ref: '#/components/parameters/Content-Type'
      - $ref: '#/components/parameters/Accept'
      - $ref: '#/components/parameters/creditAccountId'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                required:
                - data
                - summary
                type: object
                properties:
                  data:
                    type: array
                    description: Data information.
                    items:
                      required:
                      - id
                      - friendlyId
                      - status
                      - value
                      - accountId
                      - creditValue
                      - createdAt
                      - updatedAt
                      - originalDueDate
                      - dueDate
                      - installment
                      - orderId
                      - transactionId
                      - numberOfInstallments
                      - creditAccountId
                      type: object
                      description: Object with information about each invoice.
                      properties:
                        id:
                          type: string
                          description: Invoice identification.
                        friendlyId:
                          type: string
                          description: Simplified identification of an invoice. This code is created automatically, always associated with an existing invoice. It consists of an 8-digit random ID (of numbers and letters) and the installment.
                        status:
                          type: string
                          description: Invoice status.
                          enum:
                          - Opened
                          - Paid
                          - Cancelled
                        value:
                          type: number
                          description: Invoice value.
                        accountId:
                          type: string
                          description: Account identification. It is the same `checkingAccountId` parameter used in other Customer Credit API endpoints.
                        creditValue:
                          type: number
                          description: Credit value.
                        createdAt:
                          type: string
                          description: Invoice creation date.
                        updatedAt:
                          type: string
                          description: Date of the last update made to the invoice.
                        originalDueDate:
                          type: string
                          description: Original invoice expiration date.
                        dueDate:
                          type: string
                          description: Modified invoice expiration date.
                        installment:
                          type: number
                     

# --- truncated at 32 KB (45 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/vtex/refs/heads/main/openapi/vtex-invoices-api-openapi.yml