VTEX Account API

The Account API from VTEX — 13 operation(s) for account.

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

Other Resources

OpenAPI Specification

vtex-account-api-openapi.yml Raw ↑
openapi: 3.0.0
info:
  title: VTex Anti-fraud Provider Account 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: Account
paths:
  /api/creditcontrol/accounts:
    get:
      tags:
      - Account
      summary: VTex Search all accounts
      description: "Retrieves a list of all [customer credit accounts](https://help.vtex.com/en/tracks/customer-credit-getting-started--1hCRg21lXYy2seOKgqQ2CC/7FHLd0cmxqqGeEUuc8uioU) in the store.\r\n\r\n>ℹ️ You can use the queries below (individually or combined) to obtain a more accurate search result. If your store has more than 20 customer credit accounts and you do not use any queries in the call, only the first 20 account records will appear in the response body.\r\n\r\n>ℹ️ Query params can be used individually or combined.\r\n\r\n### Queries to filter results\r\n\r\n- **By the location of the accounts in the list (quantity of accounts)**: `?from={int}&to={int}`\r\n- **By status**: `?status={Open, Closed or Cancelled}`\r\n- **By email**: `?email={string}`\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 | Checking Accounts | **Read Checking Accounts** |\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: Searchallaccounts
      parameters:
      - $ref: '#/components/parameters/Content-Type'
      - $ref: '#/components/parameters/Accept'
      - name: from
        in: query
        description: Indicates the starting position of the credit customer account to be searched in the account list. Example, value `1` indicates that the first account 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 credit customer account to be searched in the account list. Example, if the value of `from` is equal to `1` and `to` is `40`, information from 40 accounts will be displayed in the response body of the request.
        required: false
        style: form
        schema:
          type: string
          example: '40'
      - name: status
        in: query
        description: Indicates the status of the accounts to be searched for.
        required: false
        style: form
        schema:
          type: string
          enum:
          - Open
          - Paid
          - Cancelled
          example: Paid
      - name: email
        in: query
        description: Indicates the email registered to the account to be searched.
        required: false
        style: form
        schema:
          type: string
          example: test@test.com
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                required:
                - data
                - summary
                type: object
                properties:
                  data:
                    type: array
                    description: Data information.
                    items:
                      type: object
                      description: Object with information about each account.
                      required:
                      - id
                      - balance
                      - document
                      - status
                      - documentType
                      - creditLimit
                      - updatedAt
                      - createdAt
                      - availableCredit
                      - preAuthorizedCredit
                      - email
                      - tolerance
                      - availableBalance
                      properties:
                        id:
                          type: string
                          description: Credit customer account identification.
                        balance:
                          type: number
                          description: Account balance value. If this number is negative, it means that the account has a debit instead of a credit to be used.
                        document:
                          type: string
                          description: Account owner document.
                        status:
                          type: string
                          description: Credit customer account status. This value will always come as `Open`. If an account is closed (`Closed`), it will not be displayed in the response body of this endpoint.
                          enum:
                          - Open
                          - Closed
                        documentType:
                          type: string
                          description: Document type.
                          enum:
                          - CPF
                          - CNPJ
                          - Other
                        creditLimit:
                          type: number
                          description: Maximum credit amount on the account.
                        updatedAt:
                          type: string
                          description: Date of the last update made to the account.
                        createdAt:
                          type: string
                          description: Account creation date.
                        description:
                          type: string
                          description: This field is deprecated.
                        availableCredit:
                          type: number
                          description: Credit amount available on the account.
                        preAuthorizedCredit:
                          type: number
                          description: Credit value that can only be used by the account owner after the merchant releases a specific purchase transaction.
                        email:
                          type: string
                          description: Account owner email.
                        tolerance:
                          type: number
                          description: Account credit tolerance (in decimals). This value represents the increase in credit on an account. For example, a value of `0.30` indicates that the account owner can use up to 30% above the account's original maximum credit amount.
                        availableBalance:
                          type: number
                          description: Balance available for use on the account.
                  summary:
                    required:
                    - count
                    type: object
                    description: Summary information.
                    properties:
                      count:
                        type: integer
                        description: Number of customer credit accounts in the store.
              example:
                data:
                - id: 39f5f920-149f-11ha-b5b0-2vb896d3212f
                  balance: 0
                  document: '4354353453454'
                  status: Open
                  documentType: CPF
                  creditLimit: 2000
                  updatedAt: '2020-01-02T15:26:40.3425717Z'
                  createdAt: '2019-12-04T14:06:02.7905117Z'
                  description: ''
                  availableCredit: 2000
                  preAuthorizedCredit: 0
                  email: wtest@gmail.com
                  tolerance: 20
                  availableBalance: 2000
                - id: 71d3f4e5-9164-11ea-918f-93b2a93cb9ba
                  balance: 0
                  document: '10120312'
                  status: Open
                  documentType: CPF
                  creditLimit: 1
                  updatedAt: '2020-05-08T19:16:40.7202156Z'
                  createdAt: '2020-05-08T19:16:40.5951631Z'
                  description: ''
                  availableCredit: 1
                  preAuthorizedCredit: 0
                  email: etest@yahoo.com
                  tolerance: 0
                  availableBalance: 1
                - id: 111111111_CPF
                  balance: 0
                  document: '111111111'
                  status: Open
                  documentType: CPF
                  creditLimit: 500
                  updatedAt: '2020-06-30T18:35:25.5793275Z'
                  createdAt: '2020-06-30T18:35:25.5011788Z'
                  description: ''
                  availableCredit: 500
                  preAuthorizedCredit: 0
                  email: atest@test.com
                  tolerance: 1
                  availableBalance: 500
                - id: 2222222222_CPF
                  balance: 0
                  document: '2222222222'
                  status: Open
                  documentType: CPF
                  creditLimit: 100
                  updatedAt: '2020-07-07T21:08:07.1796362Z'
                  createdAt: '2020-06-30T19:57:50.4832597Z'
                  description: ''
                  availableCredit: 100
                  preAuthorizedCredit: 0
                  email: dtest@hotmail.com
                  tolerance: 0
                  availableBalance: 100
                - id: 91d1f2e5-8169-11ea-728f-53b2a03cb8bc
                  balance: 0
                  document: '0000000000'
                  status: Open
                  documentType: CPF
                  creditLimit: 5000
                  updatedAt: '2020-07-28T18:50:46.7315579Z'
                  createdAt: '2020-06-30T18:49:35.424369Z'
                  description: ''
                  availableCredit: 5000
                  preAuthorizedCredit: 0
                  email: test@test.com
                  tolerance: 0
                  availableBalance: 5000
                summary:
                  count: 5
      deprecated: false
    post:
      tags:
      - Account
      summary: VTex Open an account
      description: "Opens a [customer credit account](https://help.vtex.com/en/tracks/customer-credit-getting-started--1hCRg21lXYy2seOKgqQ2CC/7FHLd0cmxqqGeEUuc8uioU) on your store.\r\n\r\n>⚠️ This request should only be used if you do not have an account yet registered. If you already have an account (open or closed) and want to create or modify an account, go to [Open or Change Account](https://developers.vtex.com/docs/api-reference/customer-credit-api#put-/api/creditcontrol/accounts/-accountId-) endpoint.\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 | Checking Accounts | **Create Checking Accounts** |\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: OpenanAccount
      parameters:
      - $ref: '#/components/parameters/Content-Type'
      - $ref: '#/components/parameters/Accept'
      requestBody:
        content:
          application/json:
            schema:
              required:
              - document
              - documentType
              - email
              - creditLimit
              - description
              - tolerance
              type: object
              properties:
                document:
                  type: string
                  description: Account owner document.
                  example: '11111111111'
                documentType:
                  type: string
                  description: Document type.
                  enum:
                  - CPF
                  - CNPJ
                  - Other
                  example: CPF
                email:
                  type: string
                  description: Account owner email.
                  example: test@test.com
                creditLimit:
                  type: string
                  description: Maximum credit amount on the account.
                  example: '1100'
                description:
                  type: string
                  description: This field is deprecated.
                  example: Not applicable.
                  deprecated: true
                tolerance:
                  type: string
                  description: Account credit tolerance (in decimals). This value represents the increase in credit on an account. For example, a value of `0.30` indicates that the account owner can use up to 30% above the account's original maximum credit amount.
                  example: '0.2'
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                required:
                - id
                - balance
                - document
                - status
                - documentType
                - creditLimit
                - updatedAt
                - createdAt
                - availableCredit
                - preAuthorizedCredit
                - email
                - tolerance
                - availableBalance
                type: object
                properties:
                  id:
                    type: string
                    description: Credit customer account identification.
                  balance:
                    type: number
                    description: Account balance value. If this number is negative, it means that the account has a debit instead of a credit to be used.
                  document:
                    type: string
                    description: Account owner document.
                  status:
                    type: string
                    description: Credit customer account status.
                  documentType:
                    type: string
                    description: 'Document type. Possible values: `CPF`, `CNPJ` or `Other`.'
                  creditLimit:
                    type: number
                    description: Maximum credit amount on the account.
                  updatedAt:
                    type: string
                    description: Date of the last update made to the account.
                  createdAt:
                    type: string
                    description: Account creation date.
                  description:
                    type: string
                    description: This field is deprecated.
                  availableCredit:
                    type: number
                    description: Credit amount available on the account.
                  preAuthorizedCredit:
                    type: number
                    description: Credit value that can only be used by the account owner after the merchant releases a specific purchase transaction.
                  email:
                    type: string
                    description: Account owner email.
                  tolerance:
                    type: number
                    description: Account credit tolerance (in decimals). This value represents the increase in credit on an account. For example, a value of `0.30` indicates that the account owner can use up to 30% above the account's original maximum credit amount.
                  availableBalance:
                    type: number
                    description: Balance available for use on the account.
              example:
                id: 11111111111_CPF
                balance: 0
                document: '11111111111'
                status: Open
                documentType: CPF
                creditLimit: 1100
                updatedAt: '2023-11-09T13:29:01.2505088Z'
                createdAt: '2023-11-09T13:29:01.1567887Z'
                description: ''
                availableCredit: 1100
                preAuthorizedCredit: 0
                email: ricardo@teste.com.br
                tolerance: 0.2
                availableBalance: 1100
      deprecated: false
  /api/creditcontrol/accounts/{creditAccountId}:
    get:
      tags:
      - Account
      summary: VTex Retrieve an account by ID
      description: "Retrieves a [customer credit account](https://help.vtex.com/en/tracks/customer-credit-getting-started--1hCRg21lXYy2seOKgqQ2CC/7FHLd0cmxqqGeEUuc8uioU) by the credit account identification.\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 | Checking Accounts | **Read Checking Accounts** |\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: RetrieveaAccountbyId
      parameters:
      - $ref: '#/components/parameters/Content-Type'
      - $ref: '#/components/parameters/Accept'
      - $ref: '#/components/parameters/creditAccountId'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                required:
                - id
                - balance
                - document
                - status
                - documentType
                - creditLimit
                - updatedAt
                - createdAt
                - availableCredit
                - preAuthorizedCredit
                - email
                - tolerance
                - availableBalance
                type: object
                properties:
                  id:
                    type: string
                    description: Credit customer account identification.
                  balance:
                    type: number
                    description: Account balance value. If this number is negative, it means that the account has a debit instead of a credit to be used.
                  document:
                    type: string
                    description: Account owner document.
                  status:
                    type: string
                    description: Credit customer account status.
                  documentType:
                    type: string
                    description: 'Document type. Possible values: `CPF`, `CNPJ` or `Other`.'
                  creditLimit:
                    type: number
                    description: Maximum credit amount on the account.
                  updatedAt:
                    type: string
                    description: Date of the last update made to the account.
                  createdAt:
                    type: string
                    description: Account creation date.
                  description:
                    type: string
                    description: This field is deprecated.
                  availableCredit:
                    type: number
                    description: Credit amount available on the account.
                  preAuthorizedCredit:
                    type: number
                    description: Credit value that can only be used by the account owner after the merchant releases a specific purchase transaction.
                  email:
                    type: string
                    description: Account owner email.
                  tolerance:
                    type: number
                    description: Account credit tolerance (in decimals). This value represents the increase in credit on an account. For example, a value of `0.30` indicates that the account owner can use up to 30% above the account's original maximum credit amount.
                  availableBalance:
                    type: number
                    description: Balance available for use on the account.
              example:
                id: 11111111111_CPF
                balance: 0
                document: '11111111111'
                status: Open
                documentType: CPF
                creditLimit: 1100
                updatedAt: '2023-11-09T13:29:01.2505088Z'
                createdAt: '2023-11-09T13:29:01.1567887Z'
                description: ''
                availableCredit: 1100
                preAuthorizedCredit: 0
                email: ricardo@teste.com.br
                tolerance: 0.2
                availableBalance: 1100
      deprecated: false
    delete:
      tags:
      - Account
      summary: VTex Close an account
      description: "Closes a [customer credit account](https://help.vtex.com/en/tracks/customer-credit-getting-started--1hCRg21lXYy2seOKgqQ2CC/7FHLd0cmxqqGeEUuc8uioU).\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 | Checking Accounts | **Create Checking Accounts** |\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: CloseanAccount
      parameters:
      - $ref: '#/components/parameters/Content-Type'
      - $ref: '#/components/parameters/Accept'
      - $ref: '#/components/parameters/creditAccountId'
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                document:
                  type: string
                  description: Account owner document.
                  example: '32222222222'
                documentType:
                  type: string
                  description: Document type.
                  enum:
                  - CPF
                  - CNPJ
                  - Other
                  example: CPF
                email:
                  type: string
                  description: Account owner email.
                  example: email@domain.com
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                required:
                - id
                - balance
                - document
                - status
                - documentType
                - creditLimit
                - updatedAt
                - createdAt
                - availableCredit
                - preAuthorizedCredit
                - email
                - tolerance
                - availableBalance
                type: object
                properties:
                  id:
                    type: string
                    description: Credit customer account identification.
                  balance:
                    type: number
                    description: Account balance value. If this number is negative, it means that the account has a debit instead of a credit to be used.
                  document:
                    type: string
                    description: Account owner document.
                  status:
                    type: string
                    description: Credit customer account status.
                  documentType:
                    type: string
                    description: Document type.
                    enum:
                    - CPF
                    - CNPJ
                    - Other
                  creditLimit:
                    type: number
                    description: Maximum credit amount on the account.
                  updatedAt:
                    type: string
                    description: Date of the last update made to the account.
                  createdAt:
                    type: string
                    description: Account creation date.
                  description:
                    type: string
                    description: This field is deprecated.
                    deprecated: true
                  availableCredit:
                    type: number
                    description: Credit amount available on the account.
                  preAuthorizedCredit:
                    type: number
                    description: Credit value that can only be used by the account owner after the merchant releases a specific purchase transaction.
                  email:
                    type: string
                    description: Account owner email.
                  tolerance:
                    type: number
                    description: Account credit tolerance (in decimals). This value represents the increase in credit on an account. For example, a value of `0.30` indicates that the account owner can use up to 30% above the account's original maximum credit amount.
                  availableBalance:
                    type: number
                    description: Balance available for use on the account.
              example:
                id: 32222222222_CPF
                balance: 0
                document: '32222222222'
                status: Closed
                documentType: CPF
                creditLimit: 500
                updatedAt: '2023-11-09T14:36:09.0201326Z'
                createdAt: '2023-11-09T14:31:27.0775349Z'
                description: ''
                availableCredit: 500
                preAuthorizedCredit: 0
                email: test3@teste.com
                tolerance: 1
                availableBalance: 500
      deprecated: false
    put:
      tags:
      - Account
      summary: VTex Update account information
      description: "Updates information on a [customer credit account](https://help.vtex.com/en/tracks/customer-credit-getting-started--1hCRg21lXYy2seOKgqQ2CC/7FHLd0cmxqqGeEUuc8uioU).\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 le

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