Account

Search all accounts

Changed on

Retrieves a list of all customer credit accounts in the store.

ℹ️ 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.

ℹ️ Query params can be used individually or combined.

Queries to filter results

  • By the location of the accounts in the list (quantity of accounts): ?from={int}&to={int}
  • By status: ?status={Open, Closed or Cancelled}
  • By email: ?email={string}

Permissions

Any user or API key must have at least one of the appropriate License Manager resources 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:

ProductCategoryResource
Credit ControlMainMain Access
Credit ControlChecking AccountsRead Checking Accounts

There are no applicable predefined roles for this resource list. You must create a custom 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.

❗ To prevent integrations from having excessive permissions, consider the best practices for managing API keys when assigning License Manager roles to integrations.

get/api/creditcontrol/accounts

Request

  • Base URL
    https://apiexamples.vtexcommercestable.com.br
  • URL
    https://apiexamples.vtexcommercestable.com.br/api/creditcontrol/accounts
  • Auth
    • API key in header X-VTEX-API-AppKey and API key in header X-VTEX-API-AppToken
    • or API key in header VtexIdclientAutCookie

Query parameters

fromstring
Example:1

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.

tostring
Example:40

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.

status'Opened' | 'Paid' | 'Cancelled'
Example:Paid

Indicates the status of the accounts to be searched for.

emailstring
Example:test@test.com

Indicates the email registered to the account to be searched.

Headers

Content-Typestring required
Example:application/json

Type of the content being sent.

Acceptstring required
Example:application/json

HTTP Client Negotiation Accept Header. Indicates the types of responses the client can understand.

Response

OK

Changes

    • breaking

      removed the enum value Open from the query request parameter status

    • info

      added the new enum value Opened to the query request parameter status

    • warning

      the optional response header Connection removed for the status 200

    • warning

      the optional response header Content-Length removed for the status 200

    • warning

      the optional response header Date removed for the status 200

    • warning

      the optional response header Server removed for the status 200

    • warning

      the optional response header X-CDNIgnore removed for the status 200

    • warning

      the optional response header X-Powered-by-VTEX-Janus-Edge removed for the status 200

    • warning

      the optional response header X-Track removed for the status 200

    • warning

      the optional response header X-Translate removed for the status 200

    • warning

      the optional response header X-Translate-BackEnd removed for the status 200

    • warning

      the optional response header X-VTEX-Janus-Router-Backend-App removed for the status 200