Documentation
Feedback
Guides
API Reference

Guides
Orders
Change seller

Marketplaces have the autonomy to change a seller that has been designated to fulfill an order. This can only be done under specific circumstances described in this article on the Change seller feature.

There are a few different APIs that can be useful to execute a seller change. Here we will see which are they and how to use them to perform this task.

Make sure you are aware of the limitations for using this, as described in this article on the Change Seller feature. Also, note that this can only be done while the order's status is window-to-change-seller, payment-pending or waiting-for-authorization as seen on the API.

Seller listing

In the case of a seller change, the marketplace is responsible for choosing the new seller. VTEX does not have any automated system to make this choice, but we do suggest you use the Get seller list API request to see the list of sellers associated with your marketplace. It is also possible to filter sellers returned by this call using query params.

Cart simulation

With the information of the sellers in hand, you can simulate carts to check the availability of the products. To do this, you may use our Fulfillment simulation endpoint.

Window to change seller

When a seller cancels an order, the marketplace has a limited period of time to choose a new seller to fulfill that order. This period of time is the window to change seller, and the default is of two days.

This value can be checked using the Get window to change seller request and configured with the Update window to change seller endpoint.

Change seller

Once you have all the information you need and are ready to actually change the seller responsible for shipping a given order, you can make a PUT call to this endpoint: {marketplace_host}/api/checkout/pvt/orders/{marketplace_order_id}/sellers

This is an example of what the body of this request should look like:


_15
{
_15
"marketplacePaymentValue": 1000,
_15
"newSellerId":"{id_do_seller_no_mkt}",
_15
"shippingData":
_15
{
_15
"logisticsInfo":
_15
[
_15
{
_15
"itemIndex": 0,
_15
"selectedSla": "PAC",
_15
"selectedDeliveryChannel": "delivery"
_15
}
_15
]
_15
}
_15
}

When a change of seller is successfully completed, the marketplace order loses courier information, since the array in shippingData.logisticsInfo.deliveryIds is now empty. In order to get the updated information, it is necessary to make a Get order request to the new seller's endpoint, such as https://{newSeller}.{environment}.com.br/api/oms/pvt/orders/{orderId}.

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