Your first API call
The quickest way to see 52ViKING actually doing something is to price a basket. It is one call, it is read-only, and the response shows the promotion engine at work.
You will need a chain number, a store number, and credentials from your FiftyTwo consultant.
Get an access token
If that prints a truncated JWT, you are authenticated. If it prints nothing, re-read Authentication.
Price a basket
CalculateBasket takes the chain and store in the path, because promotions
are store-specific.
Basket API accepts either XML or JSON for both request and response.
Set Content-Type and Accept to whichever you prefer. Check the
request schema for the exact line-item field names
your chain’s configuration expects.
Read the discount lines
The response is line-orientated: each line in your request stays its own line in the receipt. Lines are never collapsed or expanded, so a quantity of three is one line, not three.
Discounts arrive as their own lines, referencing the rule that produced them. That reference is the discount group or campaign ID you can look up through Master Data, which is how you explain a price back to a customer.
What to build next
Concepts worth ten minutes
These explain the model the API field names assume: