List merchants service

After getting the token or signature in the previous step, the virtual store may consume the store list service

Call details#

  • Resource: /v1/merchants
  • HTTP Method: GET
  • Request format: query string
  • Response format: JSON
  • Header parameters:
ParameterDescriptionFormatMandatory
merchant_idMerchant code on Carat Portal. The production and certification codes will be different.< 15 ANYES
merchant_keyMerchant authentication key on Carat Portal. The production and certification keys will be different.< 80 ANYES
tokenToken obtained on the token creation service. Learn more.= 66 ANNO
AuthorizationThe merchant's signature must be sent in the format Bearer {signature}. Exemple: Bearer JHVGytfdgauygdauiw78264284527852897hagdg.< 2000 ANNO

Example#

Store list using token#

Request:

To use this example, don't forget to define the variable {{url}} to the value
esitef-homologacao.softwareexpress.com.br

curl
--request GET "https://{{url}}/e-sitef/api/v1/merchants?cnpj=12345678901234&merchant_status=A&page=1&limit=1"
--header "Content-Type: application/json"
--header "merchant_id: xxxxxxxx"
--header "merchant_key: xxxxxxxxxxx"
--header "token: 1234567890abcdefghijklmnopqrstuvwxyz1234567890abcdefghijklmnopqr"
--verbose

Store list using signature#

Request:

To use this example, don't forget to define the variable {{url}} to the value
esitef-homologacao.softwareexpress.com.br

curl
--request GET "https://{{url}}/e-sitef/api/v1/merchants?cnpj=12345678901234&merchant_status=A&page=1&limit=1"
--header "Content-Type: application/json"
--header "merchant_id: xxxxxxxx"
--header "merchant_key: xxxxxxxxxxx"
--header "Authorization: Bearer YYYYYYY"
--verbose

Response:

{
"response_code": "0",
"response_message": "OK",
"current_page": "0",
"total_pages": "1",
"count": "1",
"merchants": [
{
"id": "qereIoinsd3d",
"merchant_status": "A",
"fantasy_name": "Teste de Loja",
"corporate_name": "Testes de Loja Ltda.",
"cnpj": "12345678901234"
}
]
}

Request parameters#

ParâmetroDescriçãoFormatoObrigatório
cnpjCNPJ of the merchant. Numbers only.= 14 NNão
merchant_statusStore status. Can assume the following values: A = Active I = Inactive= 1 NNão
pageList Page. The first page value is 0. If not set, defaults to 0.< 4 NNão
limitMax records by page. If not set, defaults to 100.< 3 NNão

Response parameters#

If successful, the HTTP response code will be 200. Any other code must be interpreted as an error.

ParameterDescriptionFormat
response_codeCarat Portal response code. Any code different from 0 means failure.< 4 N
response_messageCarat Portal response message.< 500 AN
current_pageCurrent records page.< 4 N
total_pagesTotal pages number.< 4 N
countTotal register count.< 4 N
merchants[]Store list returned by the query.
idCode of the created merchant.< 15 AN
merchant_statusStore status. Can assume the following values: A = Active I = Inactive= 1 N
fantasy_nameFantasy name of the merchant.< 250 AN
corporate_nameCorporate name of the merchant.< 250 AN
cnpjCNPJ of the merchant. Numbers only.= 14 N