v1

latestOpenAPI 3.0.02026-07-2636111249.2 KB
Cart API

Generate Cart Preview

Creates a cart preview that is populated with product and price information and allows you to obtain the Cleverbridge cart as a JSON or XML file. You can use this resource to access what customers see when they use a certain IP address or language. You can also use the response to populate your web page with product and pricing information stored in the Cleverbridge platform. This circumvents the need to maintain duplicate product and pricing information in both your database and on the Cleverbridge platform. In addition, you have the option of generating a session URL (SURL). For more information, see Generate User Session URL. <br />For XML examples and schemas, see the Additional Examples - Generate Cart Preview.

post/cart/generatecartpreview

Headers

Accept'application/json' | 'application/xml'

Expected response format.

Content-Type'application/json' | 'application/xml'

Format of the HTTP post body.

Request body

AcceptLanguagestring

The Accept-Language Header as submitted by the customer's browser.

GenerateSessionUrlboolean

Set to <code>true</code> to receive a session URL (SURL) in the response. A session URL is only valid for one purchase or 72 hours after the last web hit for that session has been requested from the Cleverbridge web servers.

RemoteAddressstring required

The IPv4-Address that corresponds with the country, state, etc. of the customer.

ShoppingCartUrlstring required

The URL you would use to redirect the customer to the checkout process. If the API request is sent in XML, the URL must be encoded. For more information, see the HTML URL Encoding Reference.

Response

OK

SessionUrlstring

The generated session URL.

ResultMessagestring

Optional result or error message.

All 36 operations