Sample Basket Usage Scenario in Digital Commerce

You can add an offer without any configured attribute values to a basket.

  1. Follow the prerequisites.

  2. Ensure you have run the appropriate batch jobs and configured the appropriate custom settings. See Preparing Digital Commerce API Caching.

  3. Execute a call to the Get Offer Details API.

  4. After successfully running GetOfferDetails, copy and save the entire contents of the OfferDetails node. For example:

    {"result:{"offerDetails":{"offer"...}}}

    To configure the offer before adding it to the basket, modify the offerDetails JSON result.

  5. Paste the result node from the previous step into the body of the Basket API request.

  6. Execute the Create Basket API call: