REST API Referenceback to overview

Creating a Loyalty Shipment

Below is an example of the calls you would need to make in order to create a shipment with a loyalty card on it. This utilizes the resources listed under the Loyalty Resources section below.

  1. Make a GET request to /ws/merchants using your username and password to get your merchRef
  2. Make a GET request to /ws/merchants/{merchRef}/loyalty to return a list of available loyalty card groups
  3. Create a shipment by making a POST request to /ws/merchants/{merchRef}/loyalty/{groupRef}/shipments?action=create passing any details for the shipment in a JSON object.
  4. Add a card to a shipment by making a POST request with all card info in a JSON object to /ws/merchants/{merchRef}/loyalty/{groupRef}/shipments/{shipmentRef}/cards?action=create
  5. Then finalize the shipment by making a POST request to /ws/merchants/{merchRef}/loyalty/{groupRef}/shipments/{shipmentRef}?action=finalize

Loyalty Resources

These resources support the creation of loyalty fulfillments. You may add a retail fulfillment card to a loyalty shipment as well as being able to add a loyalty card to a retail fulfillment shipment.

You must use the loyalty resources to create a loyalty card. That is not interchangeable with retail fulfillment.

ResourceHTTP MethodsEncodings
/ws/merchants/{merch Ref}/loyalty GET JSON
/ws/merchants/{merch Ref}/loyalty/{Group Ref}/carriers GET JSON
/ws/merchants/{merch Ref}/loyalty/{Group Ref}/shipments GET, POST JSON
/ws/merchants/{merch Ref}/loyalty/{Group Ref}/shipments/methods GET JSON
/ws/merchants/{merch Ref}/loyalty/{Group Ref}/shipments/{shipment Ref} GET, POST, PUT, DELETE JSON
/ws/merchants/{merch Ref}/loyalty/{Group Ref}/shipments/{shipment Ref}/cards GET, POST JSON
/ws/merchants/{merch Ref}/loyalty/{Group Ref}/shipments/{shipment Ref}/cards/{card Ref} PUT, DELETE JSON