List merchants service
After getting the token or signature in the previous step of the flow, the virtual store can consume the list merchants service.
Call details
- Resource:
/v1/merchants
- HTTP Method:
GET
- Request format:
query string
- Response format:
JSON
- Header parameters:
Parameter | Description | Format | Mandatory |
---|---|---|---|
merchant_id | Merchant code on e-SiTef. The production and certification codes will be different. | < 15 AN | YES |
merchant_key | Merchant authentication key on e-SiTef. The production and certification keys will be different. | < 80 AN | YES |
token | Token obtained on the token creation service. Learn more. | = 66 AN | NO |
Authorization | The merchant's signature must be sent in the Bearer {signature} format. Example: Bearer JHVGytfdgauygdauiw78264284527852897hagdg . Learn more. | < 2000 AN | NO |
Examples
Below are some examples of the query service calls using the cURL tool.
Example call using token
Request:
curl
--request GET "https://esitef-homologacao.softwareexpress.com.br/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
Example call using signature
Request:
curl
--request GET "https://esitef-homologacao.softwareexpress.com.br/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
Parameter | Description | Format | Mandatory |
---|---|---|---|
cnpj | CNPJ of the merchant. Numbers only. | = 14 N | NO |
merchant_status | Merchant's current status. Can take the following values:
| = 1 AN | NO |
page | Listing page. The first page has the value 0 . If it is not sent, we will use the value 0 . | < 4 N | NO |
limit | Maximum number of records per page. If not sent, we will assume the maximum value of 100. | < 3 N | NO |
Response parameters
If successful, the HTTP response code will be 200
. Any other code must be interpreted as an error.
Parameter | Description | Format | |
---|---|---|---|
response_code | e-SiTef response code. | < 4 N | |
response_message | e-SiTef response message. | < 500 AN | |
current_page | Current page of records. | < 4 N | |
total_pages | Total number of pages. | < 4 N | |
count | Total count of records. | < 4 N | |
merchants[] | List of merchants. | ||
id | Code of the merchant. | < 15 AN | |
merchant_status | Merchant's current status. Can take the following values:
| = 1 AN | |
fantasy_name | Fantasy name of the merchant. | < 250 AN | |
corporate_name | Corporate name of the merchant. | < 250 AN | |
cnpj | CNPJ or CPF of the merchant. Numbers only. | < 14 N |