The REST Admin API is a legacy API as of October 1, 2024. All apps and integrations should be built with the GraphQL Admin API. For details and migration steps, visit our migration guide.

Requires gift_card_adjustments access scope.

A gift card adjustment is a way to adjust the balance of a gift card. Balances cannot be adjusted to below $0. Balances are updated as soon as you receive a successful response.

When creating a gift card adjustment, you may also set note, remote_transaction_ref, and remote_transaction_url.

Was this section helpful?

Properties

id
->id
A unique numeric identifier for the adjustment.

number
deprecated
A numeric sequence number for this adjustment with respect to the gift card.

amount
A number (signed) representing the value of the adjustment.

note
The text of an optional note that can be attached to the adjustment. This value is not visible to customers.

remote_transaction_ref
The text of an optional reference note that can be attached to the adjustment. This value is not visible to customers.

remote_transaction_url
An optional reference URL that can be attached to the adjustment. This value is not visible to customers.

api_client_id
deprecated
A unique numeric identifier of the application that issued the adjustment (if it was issued by an application).

user_id
deprecated
A unique numeric identifier of the user that issued the adjustment (if it was issued by a user).

order_transaction_id
deprecated
A unique numeric identifier of the order transaction that issued the adjustment (if it was caused by an application of a gift card to an order).

created_at
The date and time when the adjustment was created. The API returns this value in ISO 8601 format.

processed_at
The date and time when the adjustment was imported, in ISO 8601 format. This value can be set to dates in the past when importing from other systems. If no value is provided, it will be auto-generated.

Was this section helpful?
{}The Gift Card Adjustment resource
{
  "id": 989034056,
  "number": 1,
  "amount": -20,
  "note": "External debit of gift card",
  "remote_transaction_ref": "external-ref-230923",
  "remote_transaction_url": "http://example.com/external-gift-card-app/external-ref-230923",
  "api_client_id": 431223487,
  "user_id": 241253183,
  "order_transaction_id": 203972033,
  "created_at": "2015-06-31T19:00:00-05:00",
  "processed_at": "2015-06-31T19:00:00-05:00"
}

Was this section helpful?
Path parameters
giftcardid=1035197676
string
required
Was this section helpful?
post
/admin/api/2024-07/gift_cards/1035197676/adjustments.json
Copy
curl -d '{"adjustment":{"amount":10.0,"remote_transaction_ref":"gift_card_app_transaction_193402","remote_transaction_url":"http://example.com/my-gift-card-app/gift_card_adjustments/193402"}}' \
-X POST "https://your-development-store.myshopify.com/admin/api/2024-07/gift_cards/1035197676/adjustments.json" \
-H "X-Shopify-Access-Token: {access_token}" \
-H "Content-Type: application/json"
{}Response
JSON
HTTP/1.1 201 Created
{
  "adjustment": {
    "id": 1064273913,
    "gift_card_id": 1035197676,
    "api_client_id": 755357713,
    "user_id": null,
    "order_transaction_id": null,
    "number": 1,
    "amount": "10.00",
    "processed_at": "2024-09-19T10:51:48-04:00",
    "created_at": "2024-09-19T10:51:48-04:00",
    "updated_at": "2024-09-19T10:51:48-04:00",
    "note": null,
    "remote_transaction_ref": "gift_card_app_transaction_193402",
    "remote_transaction_url": "http://example.com/my-gift-card-app/gift_card_adjustments/193402"
  }
}

Was this section helpful?
Path parameters
giftcardid=1035197676
string
required
Was this section helpful?
get
/admin/api/2024-07/gift_cards/1035197676/adjustments.json
Copy
curl -X GET "https://your-development-store.myshopify.com/admin/api/2024-07/gift_cards/1035197676/adjustments.json" \
-H "X-Shopify-Access-Token: {access_token}"
{}Response
JSON
HTTP/1.1 200 OK
{
  "adjustments": [
    {
      "id": 1064273908,
      "gift_card_id": 1035197676,
      "api_client_id": null,
      "user_id": null,
      "order_transaction_id": null,
      "number": null,
      "amount": "10.00",
      "processed_at": null,
      "created_at": "2024-09-19T10:50:00-04:00",
      "updated_at": "2024-09-19T10:50:00-04:00",
      "note": "Customer refilled gift card by $10",
      "remote_transaction_ref": null,
      "remote_transaction_url": null
    }
  ]
}


adjustment_id
string
required

api_version
string
required

gift_card_id
string
required

Was this section helpful?
Was this section helpful?
get
/admin/api/2024-07/gift_cards/1035197676/adjustments/1064273908.json
Copy
curl -X GET "https://your-development-store.myshopify.com/admin/api/2024-07/gift_cards/1035197676/adjustments/1064273908.json" \
-H "X-Shopify-Access-Token: {access_token}"
{}Response
JSON
HTTP/1.1 200 OK
{
  "adjustment": {
    "id": 1064273908,
    "gift_card_id": 1035197676,
    "api_client_id": null,
    "user_id": null,
    "order_transaction_id": null,
    "number": null,
    "amount": "10.00",
    "processed_at": null,
    "created_at": "2024-09-19T10:50:00-04:00",
    "updated_at": "2024-09-19T10:50:00-04:00",
    "note": "Customer refilled gift card by $10",
    "remote_transaction_ref": null,
    "remote_transaction_url": null
  }
}