API Reference

Complete endpoint documentation for the Gift Card Partners API.

Deposit Account Balance

Your Deposit Account must have sufficient funds to cover an order. To increase your Deposit Account Balance, submit a funding request through the portal.

  • Your balance includes a Pending portion and an Available portion.
  • When a funding request is received, the Pending balance increases.
  • When funds are applied to your account, they move from Pending to Available.

Error Handling

  • If an order request times out or disconnects, retry the order or retrieve previous orders.
  • When retrying an order, use the same PONumber as the original attempt.
  • If the first request succeeded, a retry may return 409 Conflict with the original order ID.

Caching

  • Relatively static endpoints such as Products should be cached for at least one week.
  • Most changes to this data are typically communicated by your account manager.

Asynchrony

  • Once a certain order size is reached, the API may return an order with Pending status and complete it asynchronously.
  • The API supports webhooks through FulfillmentComplete.
  • If you do not use webhooks, poll order status with exponential backoff based on order size.

Typical Resource Flow

  1. Create a bearer token
  2. Browse available products
  3. Create an order

Orders

Use the Orders endpoints to create rewards, retrieve order history, and check the status of a specific order.

POST /v1/Orders

Create an order

Creates a new order for one or more reward line items.

Authentication

Authorization: Bearer YOUR_TOKEN

Required fields

Field Type Required Description
Type string Yes DigitalDelivery, Links, or PhysicalShipment
LineItems array Yes Array of reward line items
PONumber string Yes Caller-defined unique identifier

Example request

{
  "Type": "DigitalDelivery",
  "LineItems": [
    {
      "ProductId": "PRODUCTA",
      "Value": 25.0,
      "Quantity": 1,
      "DigitalDeliveryAddress": {
        "Email": "recipient@example.com"
      },
      "Personalization": {
        "To": "Gift Recipient",
        "FromName": "GiftCard Partners",
        "FromEmail": "sender@example.com",
        "Message": "Enjoy your reward!"
      }
    }
  ],
  "PONumber": "PO-12345"
}

Error responses

Status Description
400 Error in the request
401 Missing or invalid Authorization header
409 Duplicate order. PO number must be unique.
422 Unprocessable order. Insufficient funds.
504 Request timed out

Tokens

Coming next.

AccountBalance

Coming next.

Products

Coming next.

ShippingMethods

Coming next.

Carriers

Coming next.

Brandings

Coming next.

Status

Coming next.

Departments

Coming next.