REST API Referenceretail-fulfillments overview

/ws/merchants/{merchant ID}/retail-fulfillments/{fulfillment ID}/shipments/{shipment ID}/cards

Methods: GET, POST

GET

Retrieves a list of cards for the given shipment.

POST

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

If you submit JSON, you can create the card and update card details in one step. Also, you can include multiple cards in the JSON object to create more than one card at a time. You must specify a card ID in order to create multiple cards at once.

ParameterTypeDescription
action string One of the following actions: create
CardID string Used in conjunction with the create action. Must be unique for a particular merchant.

Example POST Request

      POST /ws/merchants/48034/retail-fulfillments/W11617/shipments/870/cards?action=create&CardID=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:

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

Multiple cards:

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

    

JSON Format

      [
        {
          "CardID":"BR-394-23264",
          "ShipmentID":"XKJ730450",
          "FulfillmentID":"RMG1",
          "CarrierID":239629,
          "From":"Your dad",
          "To":"Mark",
          "Amount":"$45.00",
          "PersonalNote":"Son, you deserve this.",
          "Phone":"555-555-5555",
          "Email":"bob@example.com",
          "CardNumber":";19307000000001"
        },
        {
          "CardID":"BR-394-23265",
          "ShipmentID":"XKJ730450",
          "FulfillmentID":"RMG1",
          "CarrierID":239629,
          "From":"John",
          "To":"Bill",
          "Amount":"$45.00",
          "PersonalNote":"Happy Birthday!",
          "Phone":"555-555-5555",
          "Email":"john@example.com",
          "CardNumber":null
        }
      ]
    

Fields

Name Type
CardID editable
CarrierID editable
ShipmentID read-only
FulfillmentID editable
From editable
To editable
Amount editable
PersonalNote editable
Phone editable
Email editable
CardNumber read-only