Update Gift Card

🔒

Requires write_gift_cards access scope. More access scope

The Update Gift Card API updates the details of a specific gift card using its unique ID.

This API is especially useful for:

  1. Updating the expiration date of a gift card.
  2. Modifying notes attached to a gift card.
  3. Changing the template used for rendering a gift card.

Request Parameters

Public Request Parameters

📘

Public Request Parameters

Path Parameters

FieldTypeRequiredDescriptionExample
idstringYesGift card's ID.377006280092433706

Body Parameters

Gift Card Object

FieldTypeRequiredDescriptionExample
expires_onstringNoThe date when the gift card expires in ISO-8601 format.2025-11-01T00:00:00Z
notestringNoAn optional note that a merchant can attach to the gift card.Updated expiration date
template_suffixstringNoThe suffix of the Liquid template used to render the gift card.custom_template_suffix

Response Explanation

Public Response Parameters

📘

Public Response Parameters

Success Response

FieldTypeDescriptionExample
gift_card.idstringUnique identifier for the gift card.377006280092433706
gift_card.last_charactersstringLast characters of the gift card code.ghjg
gift_card.balancestringCurrent balance of the gift card.100.00
gift_card.initial_valuestringInitial value of the gift card.100.00
gift_card.notestringNote attached to the gift card.Updated expiration date
gift_card.expires_onstringExpiration date of the gift card in ISO-8601 format.2025-11-01T00:00:00Z
gift_card.disabled_atstringTimestamp when the gift card was disabled.null
gift_card.enabledbooleanWhether the gift card is currently enabled.true
gift_card.created_atstringTimestamp of when the gift card was created.2024-05-06T10:06:04Z
gift_card.updated_atstringTimestamp of when the gift card was last updated.2024-05-07T02:37:20Z
gift_card.statusstringStatus of the gift card (enable or disable).enable
gift_card.currencystringCurrency in which the gift card is denominated.USD
gift_card.line_item_idstringID of the line item associated with the gift card.null
gift_card.order_idstringID of the order associated with the gift card.null
gift_card.user_idstringUser ID of the creator or owner of the gift card.null
gift_card.template_suffixstringSuffix of the template used to render the gift card online.null
gift_card.customer_idstringCustomer ID associated with the gift card.8b91ccbd-37d0-4897-aac6-5082e64ca374

Error Response

Error responses in the API can be represented using two different fields: errors and error. Both fields provide details about issues encountered during request processing. Below is an explanation of the fields with their respective examples and descriptions.

FieldTypeExampleDescription
errorsArray[ "invalid line_item id"]A list of errors encountered during the request processing.
FieldTypeExampleDescription
errorString "store is not active"Indicates an error encountered during the process

Error Detail

Status CodeMessagePossible ReasonExample Response
400Bad RequestInvalid input format or request structure (e.g., missing required fields or incorrect data types).Bad Request
UnauthorizedThe request is missing valid authentication credentials or the credentials provided are invalid.Unauthorized

API Structure Overview

Language
Credentials
Header
URL
Click Try It! to start a request and see the response here!