Requires write_gift_card access scope.
For more info, refer to:
POST https://{handle}.myshopline.com/admin/openapi/v20270301/gift_cards/:gift_card_id/disable.json
handle : The store's unique identifier, which is the prefix of the store's domain name. For example, if a store's domain name is open001.myshopline.com , the store handle is open001 .
Disable a gift card in the store.
Path Parameters
  • gift_card_id string required
    The unique identifier for the gift card.
    Maximum length:64
    Example: 30171274557691301804060045
Request Headers
  • Content-Type string required
    The field must be set to the fixed value application/json; charset=utf-8.
  • Authorization string required
    The access token for the API resource. Refer to App authorization to obtain the access token, and then pass the obtained token in the Bearer format.
    Example:
    Bearer eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJhcHBJZCI6MCwiYXBwS2V5IjoiNzU2ZjI1NWE2NjdlZTcwNTk1MzM0ZjVjYzk4NzU5MzBmN2E3NGZjMSIsImV4cCI6MTg3OTQ4MjA3NiwiaXNzIjoieXNvdWwiLCJzZWxsZXJJZCI6IjIwMDAyMzQ4ODAiLCJzdG9yZUlkIjoiMTY3MjM2OTcyOTYwNiIsInRpbWVzdGFtcCI6MTc4NDc4NzY3NjY2MSwidmVyc2lvbiI6IlYyIn0.3ZzbGAH4cLU1QR2VPEvMOQInUDvus-C4amkINSQIPuNVlXsFKj0sAt1c0KnUy9MWUOFV9cHlkf7J90r2y1FzpA
Status Codes
For the complete list of codes and messages, see Http status code.

Response Headers
  • traceId
    A globally unique identifier for the request. It is used to track the request flow throughout the system, allowing for easy location and debugging when issues arise.
Response Body
  • gift_cardobject
    Gift card information.
  • id string
    The unique identifier for the gift card .
    Example: 30171274557691301804060045
  • note string
    The note content of the gift card.
    Example: This is a note
  • user_id string
    The ID of the SHOPLINE Admin user who disabled the gift card.
    Example: 4214250478
  • recipient_attributesobject
    The recipient information for the gift card.
  • nickname string
    Recipient nickname for the gift card.
    Example: nickname
  • send_around string
    The scheduled delivery date and time of the gift card. Format: ISO 8601.
    Example: 2025-06-28T23:59:59+08:00
  • email string
    Recipient email address for the gift card.
    Example: recipient@example.com
  • message string
    Message for the gift card.
    Example: This is a message
  • api_client_id string
    The unique identifier for the calling API client.
    Example: 36d2bc4e97af056677b61c529d9e3a3f7396040d
  • created_at string
    The date and time when the gift card was created. Format: ISO 8601.
    Example: 2023-08-16T23:59:59+08:00
  • disabled_at string
    The date and time when the gift card was disabled. Format: ISO 8601.
    Example: 2023-08-16T23:59:59+08:00
  • last_characters string
    The last four characters of the gift card code.
    Example: d246
  • line_item_id string
    The associated order line item ID.
    Example: 18060183094426803997483534
  • order_id string
    The associated order ID.
    Example: 24060486231247568944830202
  • balance string
    The current balance of the gift card. The value is rounded to two decimal places. The currency unit is the base unit of the store's current settlement currency.
    Example: 299.99
  • currency string
    A three-letter currency code that follows the ISO 4217 standard.
    Example: USD
  • customer_id string
    The ID of the customer who owns the gift card.
    Example: 4200113946
  • expires_on string
    The current expiration date and time of the gift card. Format: ISO 8601. Returns null if the card never expires.
    Example: 2023-08-16T23:59:59+08:00
  • initial_value string
    The initial amount of the gift card. The value is rounded to two decimal places. The currency unit is the base unit of the store's current settlement currency.
    Example: 299.99
  • updated_at string
    The date and time when the gift card was last updated. Format: ISO 8601.
    Example: 2025-06-28T23:59:59+08:00
API Explorer
https://openapiceshidianpu.myshopline.com/admin/openapi/v20270301

ParamOptions

path required
header required

Language

curl --request POST \
--url https://openapiceshidianpu.myshopline.com/admin/openapi/v20270301/gift_cards/gift_card_id/disable.json \
--header 'Authorization: Bearer eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJhcHBJZCI6MCwiYXBwS2V5IjoiNzU2ZjI1NWE2NjdlZTcwNTk1MzM0ZjVjYzk4NzU5MzBmN2E3NGZjMSIsImV4cCI6MTg3OTQ4MjA3NiwiaXNzIjoieXNvdWwiLCJzZWxsZXJJZCI6IjIwMDAyMzQ4ODAiLCJzdG9yZUlkIjoiMTY3MjM2OTcyOTYwNiIsInRpbWVzdGFtcCI6MTc4NDc4NzY3NjY2MSwidmVyc2lvbiI6IlYyIn0.3ZzbGAH4cLU1QR2VPEvMOQInUDvus-C4amkINSQIPuNVlXsFKj0sAt1c0KnUy9MWUOFV9cHlkf7J90r2y1FzpA' \
--header 'Content-Type: application/json; charset=utf-8' \
--header 'accept: application/json'
Examples
Disable a gift card
Response
{
"gift_card": {
"updated_at": "2026-06-14T03:51:36-11:00",
"user_id": null,
"currency": "USD",
"customer_id": "2605118091",
"id": "30175685282753764489900045",
"initial_value": "200.00",
"recipient_attributes": {
"email": "giftcarttest@shopline.com",
"message": "This is a message",
"nickname": "giftcarttest",
"send_around": "2026-06-28T04:59:59-11:00"
},
"api_client_id": "1133d7c99428f83aa3c8d155e0efbb6f71e198c9",
"created_at": "2026-06-14T03:32:28-11:00",
"expires_on": "2026-08-16T23:59:59-11:00",
"line_item_id": null,
"order_id": null,
"balance": "200.00",
"last_characters": "0611",
"disabled_at": "2026-06-14T03:51:36-11:00",
"note": "This is a note"
}
}
Was this article helpful to you?