REST API Referenceloyalty fulfillments overview

/ws/merchants/{merchRef}/loyalty/{FulfillmentID}/shipments/{ ShipmentRef }/cards

Methods: GET, POST

GET

Retrieves a list of cards for the given shipment. Note that a card will return NULL for the CardNum field until a card has been processed and the number assigned.

POST

Acts upon the resource using the action parameter in the URI query string.

You can include multiple cards in the JSON object to create more than one card at a time. You must specify a FulfillCardRef in order to create multiple cards at once.

If you are only creating one card per call, you do not have to specify a FulfillCardRef as the system will generate a unique Ref automatically and send it to you.

Parameter Type Description
action string One of the following actions: create
FulfillCardRef string Used in conjunction with the create action. Must be unique for a particular merchant.
Only required when creating multiple cards within a single call.

Example POST Request

      POST /ws/merchants/48034/retail-fulfillments/W11617/shipments/870/cards?action=create&FulfillCardRef=BR-9931
                

Example POST Response

A JSON object will be returned containing the success or fail messages for creating a card or cards. Upon success, the message field will be blank.

One Card:

      {
      	"FulfillCardRef":5555,
      	"status":"fail",
      	"message":"Order Finalized"
      }
                

Multiple cards:

      [
        {
      	  "FulfillCardRef":9999,
      	  "status":"success",
      	  "message":""
        },
        {
      	  "FulfillCardRef":8888,
      	  "status":"success",
      	  "message":""
        },
        {
      	  "FulfillCardRef":7777,
      	  "status":"fail",
      	  "message":"Duplicate reference value"
        }
      ]

                

JSON Format

[
   {
      "ActvStat":0,
      "ActvDate":null,
      "ActvValue":0,
      "CardNum":null,
      "ShipmentRef":"W117823",
      "CarrierRef":"carr01",
      "GroupRef":"loyalty1",
      "FulfillCardRef":"z4"
   },
   {
      "ActvStat":0,
      "ActvDate":null,
      "ActvValue":0,
      "CardNum":null,
      "ShipmentRef":"W117823",
      "CarrierRef":"carr01",
      "GroupRef":"loyalty1",
      "FulfillCardRef":"z5"
   }
]
                

Fields

Name Data Type Type Description
ActvStat TINYINT(1) read-only Activation status of a card
1: not activated
2: error activating
3: activated
ActvDate DATE read-only The date the card was activated on
ActvValue INT read-only Any value that has been assigned to the card
(only shows up after the card was activated)
CardNum INT read-only The actual number on the card itself
ShipmentRef VARCHAR(50) read-only The shipment the card is assigned to
CarrierRef VARCHAR(50) editable The carrier for the card
GroupRef VARCHAR(50) editable The fulfillment group for the card (Ref of the card type/design)
FulfillFrom VARCHAR(45) editable Who the card is being sent from
FulfillNote VARCHAR(255) editable A note that will be printed on the carrier
NOTE: only use if your carrier has a place to print a note
FulfillAmt VARCHAR(15) editable The value to be assigned to the card
PhoneNumber VARCHAR(25) editable The phone number of the member
OtherPhoneNumber VARCHAR(25) editable Secondary phone number for the member
SenderPhone VARCHAR(25) editable Phone number of the sender
SenderEmail VARCHAR(25) editable Email address of the sender
EmailAddress VARCHAR(100) editable Email of the member
MemberAccountID INT editable The account ID for the member
MemberFirstName VARCHAR(50) editable First name of the member
MemberLastName VARCHAR(50) editable last name of the member
Company VARCHAR(50) editable Company the member belongs to
DateofBirth DATE - yyyy-mm-dd editable Date of birth for the member
AnniversaryDate DATE - yyyy-mm-dd editable Anniversary data for the member
DriverLicense VARCHAR(50) editable Driver license number for the member
Address1 VARCHAR(50) editable Address 1 for the member
Address2 VARCHAR(50) editable Address 2 for the member
City VARCHAR(50) editable City for the member
State VARCHAR(50) editable State for the member
Country VARCHAR(50) editable Country for the member
Zip VARCHAR(15) editable Zip code for the member
UserDefined1 VARCHAR(50) editable A user defined field that can hold up to 50 characters
UserDefined2 VARCHAR(50) editable A user defined field that can hold up to 50 characters
UserDefined3 VARCHAR(50) editable A user defined field that can hold up to 50 characters
UserDefined4 VARCHAR(50) editable A user defined field that can hold up to 50 characters
UserDefined5 VARCHAR(50) editable A user defined field that can hold up to 50 characters
UserDefined6 VARCHAR(50) editable A user defined field that can hold up to 50 characters
UserDefined7 VARCHAR(50) editable A user defined field that can hold up to 50 characters
UserDefined8 VARCHAR(50) editable A user defined field that can hold up to 50 characters
UserDefined9 VARCHAR(50) editable A user defined field that can hold up to 50 characters
UserDefined10 VARCHAR(50) editable A user defined field that can hold up to 50 characters
UserDefined11 VARCHAR(50) editable A user defined field that can hold up to 50 characters
UserDefined12 VARCHAR(50) editable A user defined field that can hold up to 50 characters
UserDefined13 VARCHAR(50) editable A user defined field that can hold up to 50 characters
UserDefined14 VARCHAR(50) editable A user defined field that can hold up to 50 characters
UserDefined15 VARCHAR(50) editable A user defined field that can hold up to 50 characters
UserDefined16 VARCHAR(50) editable A user defined field that can hold up to 50 characters
UserDefined17 VARCHAR(50) editable A user defined field that can hold up to 50 characters
UserDefined18 VARCHAR(50) editable A user defined field that can hold up to 50 characters
UserDefined19 VARCHAR(50) editable A user defined field that can hold up to 50 characters
UserDefined20 VARCHAR(50) editable A user defined field that can hold up to 50 characters
UserDefined21 VARCHAR(50) editable A user defined field that can hold up to 50 characters
UserDefined22 VARCHAR(50) editable A user defined field that can hold up to 50 characters
UserDefined23 VARCHAR(50) editable A user defined field that can hold up to 50 characters
UserDefined24 VARCHAR(50) editable A user defined field that can hold up to 50 characters
UserDefined25 VARCHAR(50) editable A user defined field that can hold up to 50 characters
UserDefined26 VARCHAR(50) editable A user defined field that can hold up to 50 characters
UserDefined27 VARCHAR(50) editable A user defined field that can hold up to 50 characters
UserDefined28 VARCHAR(50) editable A user defined field that can hold up to 50 characters
UserDefined29 VARCHAR(50) editable A user defined field that can hold up to 50 characters
UserDefined30 VARCHAR(50) editable A user defined field that can hold up to 50 characters