Requires read_gift_card access scope.
For more info, refer to:
GET https://{handle}.myshopline.com/admin/openapi/v20260301/gift_cards/:gift_card_id.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 .
Path Parameters
  • gift_card_id string required
    Gift card id
    Example: 30157043359245339231360282
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 eyJhbGciOiJIUzUxMiJ9.eyJhcHBLZXkiOiJmMjM3OWQyMTYyOGMzM2QxMWRiMWZkYjY5N2EzZjdjMjZlNGMwYTA5Iiwic2VsbGVySWQiOiIyMDAwMjM0ODgwIiwic3RvcmVJZCI6IjE2NzIzNjk3Mjk2MDYiLCJ2ZXJzaW9uIjoiVjIiLCJkb21haW4iOiJodHRwczovL3NsLW9wZW4tc2cubXlzaG9wbGluZS5jb20iLCJ0aW1lc3RhbXAiOjE2NzUzMTk0OTI0MzksImlzcyI6Inlzb3VsIiwiZXhwIjoxNzY5OTI3NDkyfQ.UwQzomM2veGCUaOZ0paUxq5dpc7DXuhHYFvsQ_uIAKduzWcb_j2E4q_36El83sp145D4cKbpcE5KCeeIz-JNQw
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
  • user_id string
    Administrator account id on the admin interface for users to create gift cards
    Example: 4214250478
  • expires_on string
    Expiration date for present gift card, “null” means never expired
    Example: 2023-08-16T23:59:59+08:00
  • api_client_id string
    Call party id
    Example: 36d2bc4e97af056677b61c529d9e3a3f7396040d
  • initial_value string
    Initial face value of gift card
    Example: 200
  • balance string
    Gift card balance
    Example: 200
  • id string
    Gift card id
    Example: 30157043359245339231360282
  • last_characters string
    The last four characters from code
    Example: d246
  • note string
    Note information for present gift card
    Example: This is a note
  • customer_id string
    Client id for customers assigned to present gift card
    Example: 4200113946
  • disabled_at string
    Gift card disable time
    Example: 2023-08-16T23:59:59+08:00
  • line_item_id string
    Associated order items
    Example: 18060183094426803997483534
  • created_at string
    Gift card creation time
    Example: 2023-08-16T23:59:59+08:00
  • currency string
    Gift card par currency
    Example: CNY
  • order_id string
    Associated order id
    Example: 24060486231247568944830202
  • updated_at string
    Gift card update time
    Example: 2023-08-16T23:59:59+08:00
API Explorer
https://openapiceshidianpu.myshopline.com/admin/openapi/v20260301

ParamOptions

path required
header required

Language

curl --request GET \
--url https://openapiceshidianpu.myshopline.com/admin/openapi/v20260301/gift_cards/gift_card_id.json \
--header 'Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJhcHBLZXkiOiJmMjM3OWQyMTYyOGMzM2QxMWRiMWZkYjY5N2EzZjdjMjZlNGMwYTA5Iiwic2VsbGVySWQiOiIyMDAwMjM0ODgwIiwic3RvcmVJZCI6IjE2NzIzNjk3Mjk2MDYiLCJ2ZXJzaW9uIjoiVjIiLCJkb21haW4iOiJodHRwczovL3NsLW9wZW4tc2cubXlzaG9wbGluZS5jb20iLCJ0aW1lc3RhbXAiOjE2NzUzMTk0OTI0MzksImlzcyI6Inlzb3VsIiwiZXhwIjoxNzY5OTI3NDkyfQ.UwQzomM2veGCUaOZ0paUxq5dpc7DXuhHYFvsQ_uIAKduzWcb_j2E4q_36El83sp145D4cKbpcE5KCeeIz-JNQw' \
--header 'Content-Type: application/json; charset=utf-8' \
--header 'accept: application/json'
Examples
Query
Response
{
"gift_card": {
"created_at": "2023-06-12T15:20:04+08:00",
"id": "30159764855042704752573144",
"updated_at": "2023-06-12T15:20:04+08:00",
"user_id": "2000037074",
"currency": "USD",
"customer_id": "2220108415",
"balance": "10.00",
"initial_value": "10.00",
"last_characters": "8885"
}
}
Was this article helpful to you?