Dev GuideAPI Reference
Dev GuideAPI ReferenceUser GuideGitHubNuGetDev CommunitySubmit a ticketLog In
GitHubNuGetDev CommunitySubmit a ticket

Create an alternate cart endpoint

Describes how to create an alternate cart endpoint.

To create an alternate cart, perform a post request to /api/v1/carts.

Additional configuration options:

  • You can include a VmiLocationId in the request body (if Vmi is enabled). This changes your context to the BillTo and ShipTo for that Vmi Location.
  • If you do not include a VmiLocationId, you can include a BillToId and ShipToId in the request body. This changes your context to that BillTo and ShipTo.
  • If you do not include a BillToId and ShipToId, your current context BillTo and ShipTo are used for the alternate cart.
  • You can also include optional Notes in the request body, which will be added to the alternate cart.

This request creates an alternate cart with a status of “AlternateCart” and creates a cookie with the name set to the current website id, an underscore and the string “AlternateCart”. As long as this cookie exists, calls to /api/v1/carts/current returns the alternate cart instead of the normal cart.

The alternate cart can be submitted or deleted using the normal cart apis, which will remove the cookie and requests to /api/v1/carts/current will go back to the normal cart.