VTEX Invoices API

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

Operations 7

GET /api/creditcontrol/invoices VTex Search all invoices #
GET /api/creditcontrol/accounts/{creditAccountId}/invoices/{invoiceId} VTex Retrieve invoice by ID #
PUT /api/creditcontrol/accounts/{creditAccountId}/invoices/{invoiceId} VTex Change invoice #
DELETE /api/creditcontrol/accounts/{creditAccountId}/invoices/{invoiceId} VTex Cancel invoice #
GET /api/creditcontrol/accounts/{creditAccountId}/invoices VTex Retrieve invoices by creditaccountid #
POST /api/creditcontrol/accounts/{creditAccountId}/invoices/{invoiceId}/payments VTex Mark an invoice as paid #
PUT /api/creditcontrol/accounts/{creditAccountId}/invoices/{invoiceId}/postponement VTex Postpone an invoice #

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

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/vtex-invoices-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

vtex-invoices-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: VTex Customer Credit Invoices API
  description: 'With Customer Credit your store can enable **credit payments** through the checkout. You can also control **invoices** and the **credit limits** of your clients.


    Learn more about Customer Credit in our [Help Center article](https://help.vtex.com/en/tracks/customer-credit-getting-started--1hCRg21lXYy2seOKgqQ2CC/36grlQ69NK6OCuioeekyCs).


    Additionally, you can find more information on installment payments for an order in the `customData`  field found in the [Get Order](https://developers.vtex.com/docs/api-reference/orders-api#get-/api/oms/pvt/orders/-orderId-) endpoint of the Orders API. This includes the number of installments, amount and due dates.


    All requests need an authorization header. This API allows two kinds of authorization:


    1. Authorization header containing the VTEX ID authentication token.

    2. VTEX Appkey and Apptoken headers.


    Read [Authentication](https://developers.vtex.com/docs/guides/authentication) for more information about authentication options.


    ## Customer Credit API Index


    ### Invoices


    - `GET` [Search all invoices](https://developers.vtex.com/docs/api-reference/customer-credit-api#get-/api/creditcontrol/invoices)

    - `GET` [Retrieve Invoice by Id](https://developers.vtex.com/docs/api-reference/customer-credit-api#get-/api/creditcontrol/accounts/-creditAccountId-/invoices/-invoiceId-)

    - `PUT` [Change Invoice](https://developers.vtex.com/docs/api-reference/customer-credit-api#put-/api/creditcontrol/accounts/-creditAccountId-/invoices/-invoiceId-)

    - `DELETE` [Cancel Invoice](https://developers.vtex.com/docs/api-reference/customer-credit-api#delete-/api/creditcontrol/accounts/-creditAccountId-/invoices/-invoiceId-)

    - `GET` [Retrieve invoice by creditAccountId](https://developers.vtex.com/docs/api-reference/customer-credit-api#get-/api/creditcontrol/accounts/-creditAccountId-/invoices)

    - `POST` [Mark an invoice as Paid](https://developers.vtex.com/docs/api-reference/customer-credit-api#post-/api/creditcontrol/accounts/-creditAccountId-/invoices/-invoiceId-/payments)

    - `PUT` [Postpone an invoice](https://developers.vtex.com/docs/api-reference/customer-credit-api#put-/api/creditcontrol/accounts/-creditAccountId-/invoices/-invoiceId-/postponement)


    ### Account


    - `GET` [Search all accounts](https://developers.vtex.com/docs/api-reference/customer-credit-api#get-/api/creditcontrol/accounts)

    - `POST` [Open an account](https://developers.vtex.com/docs/api-reference/customer-credit-api#post-/api/creditcontrol/accounts)

    - `GET` [Retrieve an account by Id](https://developers.vtex.com/docs/api-reference/customer-credit-api#get-/api/creditcontrol/accounts/-creditAccountId-)

    - `DELETE` [Close an account](https://developers.vtex.com/docs/api-reference/customer-credit-api#delete-/api/creditcontrol/accounts/-creditAccountId-)

    - `PUT` [Update account information](https://developers.vtex.com/docs/api-reference/customer-credit-api#put-/api/creditcontrol/accounts/-creditAccountId-)

    - `GET` [Account statements](https://developers.vtex.com/docs/api-reference/customer-credit-api#get-/api/creditcontrol/accounts/-creditAccountId-/statements)

    - `PUT` [Change credit limit of an account](https://developers.vtex.com/docs/api-reference/customer-credit-api#put-/api/creditcontrol/accounts/-creditAccountId-/creditlimit)

    - `PUT` [Decrease balance of an account](https://developers.vtex.com/docs/api-reference/customer-credit-api#put-/api/creditcontrol/accounts/-creditAccountId-/statements/-statementId-)

    - `PUT` [Create or Update Settlement](https://developers.vtex.com/docs/api-reference/customer-credit-api#put-/api/creditcontrol/accounts/-creditAccountId-/transactions/-transactionId-/settlement)

    - `POST` [Create a Pre-Authorization](https://developers.vtex.com/docs/api-reference/customer-credit-api#post-/api/creditcontrol/accounts/-creditAccountId-/transactions)

    - `PUT` [Update a Pre-Authorization](https://developers.vtex.com/docs/api-reference/customer-credit-api#put-/api/creditcontrol/accounts/-creditAccountId-/transactions/-transactionId-)

    - `DELETE` [Cancel a Pre-Authorization](https://developers.vtex.com/docs/api-reference/customer-credit-api#delete-/api/creditcontrol/accounts/-creditAccountId-/transactions/-transactionId-)

    - `POST` [Add an account Holder](https://developers.vtex.com/docs/api-reference/customer-credit-api#post-/api/creditcontrol/accounts/-creditAccountId-/holders)

    - `DELETE` [Delete an account holder](https://developers.vtex.com/docs/api-reference/customer-credit-api#delete-/api/creditcontrol/accounts/-creditAccountId-/holders/-holderId-)

    - `PUT` [Change tolerance of an account](https://developers.vtex.com/docs/api-reference/customer-credit-api#put-/api/creditcontrol/accounts/-creditAccountId-/tolerance)

    - `POST` [Partial or Total Refund a Settlement](https://developers.vtex.com/docs/api-reference/customer-credit-api#post-/api/creditcontrol/accounts/-creditAccountId-/transactions/-transactionId-/refunds)


    ### Store Configuration


    - `GET` [Retrieve store configuration](https://developers.vtex.com/docs/api-reference/customer-credit-api#get-/api/creditcontrol/storeconfig)

    - `PUT` [Create or change store configuration](https://developers.vtex.com/docs/api-reference/customer-credit-api#put-/api/creditcontrol/storeconfig)

    '
  contact: {}
  version: '1.0'
servers:
- url: https://{accountName}.{environment}.com.br
  description: VTEX server URL.
  variables:
    accountName:
      description: Name of the VTEX account. Used as part of the URL
      default: apiexamples
    environment:
      description: Environment to use. Used as part of the URL.
      enum:
      - vtexcommercestable
      default: vtexcommercestable
security:
- appKey: []
  appToken: []
- VtexIdclientAutCookie: []
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).


        >ℹ️ Query parameters can be used individually or combined to filter invoice results.


        ### Queries to filter results


        - **By the location of the invoices in the list (quantity of invoices)**: `?from={int}&to={int}`

        - **By creation date**: `?createdDateFrom={dateISO8601}&createDateTo={dateISO8601}`. The dates should be in ISO8601 format.

        - **By due date**: `?dueDateFrom={dateISO8601}&dueDateTo={dateISO8601}`. The dates should be in ISO8601 format.

        - **By value**: `?value={decimal}`

        - **By status**: `?status={string}`

        - **By Id**: `?friendlyId={string}`

        - **By observation**: `?observation={string}`

        - **By creditAccountId**: `?creditAccountId={creditAcountId}`


        ### Combining filters


        You 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`.


        Example:


        For the query `?value=100&status=Paid`, the criteria will build **value = 100 AND status = Paid**.


        For the same query, adding the `op` parameter (`?value=100&status=Paid&op=or`), the criteria will build **value = 100 OR status = Paid**.


        ## Permissions


        Any 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:


        | **Product** | **Category** | **Resource** |

        | --------------- | ----------------- | ----------------- |

        | Credit Control | Main | **Main Access** |

        | Credit Control | Invoices | **Read Invoices** |


        There 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).


        >❗ 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
                          - 'null'
                          description: Invoice closing date.
                        updatedAt:
                          type: string
                          description: Date of the last update made to the invoice.
                        paymentLink:
                          type:
                          - string
                          - 'null'
                          description: Link (URL) created to direct the customer to an invoice payment environment (optional).
                        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
                          - 'null'
                          description: Observation notes about 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.
                  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`.


        ## Permissions


        Any 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:


        | **Product** | **Category** | **Resource** |

        | --------------- | ----------------- | ----------------- |

        | Credit Control | Main | **Main Access** |

        | Credit Control | Invoices | **Read Invoices** |


        There 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).


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


        ## Permissions


        Any 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:


        | **Product** | **Category** | **Resource** |

        | --------------- | ----------------- | ----------------- |

        | Credit Control | Main | **Main Access** |

        | Credit Control | Invoices | **Create Invoices** |


        There 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).


        >❗ 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
                  - 'null'
                  description: Observation notes about the invoice.
                  example: BF 2023 customer invoice.
                paymentLink:
                  type:
                  - string
                  - 'null'
                  description: Link (URL) created to direct the customer to an invoice payment environment (optional).
                  example: https://paymentlink.com
        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`.


        ## Permissions


        Any 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:


        | **Product** | **Category** | **Resource** |

        | --------------- | ----------------- | ----------------- |

        | Credit Control | Main | **Main Access** |

        | Credit Control | Invoices | **Create Invoices** |


        There 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).


        >❗ 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`.


        ## Permissions


        Any 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:


        | **Product** | **Category** | **Resource** |

        | --------------- | ----------------- | ----------------- |

        | Credit Control | Main | **Main Access** |

        | Credit Control | Invoices | **Read Invoices** |


        There 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).


        >❗ To prevent integrations from having excessive permissions

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