Documentation
Feedback
Guides
API Reference

Guides
CheckoutRegion
Get sellers by region or address

When customers access your store, they expect to view products that can be delivered to their location. To guarantee item availability in the window display, the VTEX platform selects the sellers linked to the marketplace.

This guide will describe how to obtain a list of White label sellers in your store serving a given delivery region or address.

The sellers shown in the list are only a reference of those that would be able to attend an order placed to a delivery location. From this filter, only sellers with stock and delivery methods available to that specific address will be shown to the customer in the store and considered able to fulfill the order.

Accessing the list of sellers

To access the list of sellers serving a specific region or address, you need to use the Get sellers by region or address endpoint. In this request, you must choose one of the following methods:

  1. Send the identification of the list of sellers (regionId) through the URL address.

https://{accountName}.{environment}.com.br/api/checkout/pub/regions/v2.1DC18HE648C5111C0933734FE83EC783

  1. Send the country (3-digit ISO code) and at least one of the two values ​​(postal Code or geoCoordinates) as query parameters through the URL. If you wish, you can send both values (postalCode or geoCoordinates) ​​in the same request.

https://{accountName}.{environment}.com.br/api/checkout/pub/regions?country=BRA&postalCode=22050040

After sending the request, the endpoint will return the response body containing the regionId, id and name of stores able to deliver in the selected address region, as shown in the example below:


_32
[
_32
{
_32
"id": "v2.1DC18HE648C5111C0933734DD83ED783",
_32
"sellers": [
_32
{
_32
"id": "partnerchallenge9",
_32
"name": "partnerchallenge9",
_32
"logo": ""
_32
},
_32
{
_32
"id": "qastorees",
_32
"name": "qastorees",
_32
"logo": ""
_32
},
_32
{
_32
"id": "qastoremg",
_32
"name": "qastoremg",
_32
"logo": ""
_32
},
_32
{
_32
"id": "qastorerj",
_32
"name": "qastorerj",
_32
"logo": ""
_32
},
_32
{
_32
"id": "qastoresp",
_32
"name": "qastoresp",
_32
"logo": ""
_32
}
_32
]
_32
}
_32
]

Error codes

The following errors may appear as a message in the response body.

200 - OK

Despite the code 200 (which indicates the success of the request), if there are no White label sellers allocated in the regionId informed, the response body will not contain any seller information.


_10
[
_10
{
_10
"id": "v2.1BB18CE648B5111D0933734ED83EC783",
_10
"sellers": []
_10
}
_10
]

400 - Bad Request

  • Message error example (code 001): "O campo CEP (220500) nos dados de entrega é inválido" (Postal code (220500) in delivery data is invalid): the postalCode information is not valid.

_10
{
_10
"fields": {},
_10
"error": {
_10
"code": "001",
_10
"message": "O campo CEP (220500) nos dados de entrega é inválido",
_10
"exception": null
_10
},
_10
"operationId": "f2b8107f-e5d5-4b7c-b719-344d1b05d1fa"
_10
}

  • Message error example (code CHK0119): "Endereços devem ter código postal ou geocoordenadas" (Addresses must have postal code or geocoordinates): this message can be displayed in two situations:
      1. postalCode was not informed in the request, or;
      1. geoCoordinates information is not valid or was not informed in the request.

_10
{
_10
"fields": {},
_10
"error": {
_10
"code": "CHK0119",
_10
"message": "Endereços devem ter código postal ou geocoordenadas",
_10
"exception": null
_10
},
_10
"operationId": "e144a38c-2e7c-40fa-bd71-12d0ceaa2517"
_10
}

  • Message error example (code CHK0127): "País inválido" (invalid country): the country code was not informed in the request.

_10
{
_10
"fields": {},
_10
"error": {
_10
"code": "CHK0127",
_10
"message": "País inválido",
_10
"exception": null
_10
},
_10
"operationId": "d0119920-aa3e-4295-a063-6d85ba34a400"
_10
}

Contributors
1
Photo of the contributor
+ 1 contributors
Was this helpful?
Yes
No
Suggest edits (Github)
Contributors
1
Photo of the contributor
+ 1 contributors
On this page