Requires write_gift_card access scope.
For more info, refer to:
PUT 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
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
Request Body
  • balance string
    Gift card balance
    Example: 200
  • expires_on string
    Expiration date on current gift card
    Example: 2023-08-16T23:59:59+08:00
  • note string
    The note information of the current gift card , the number of characters limited to 500
    Example: This is a note
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
  • created_at string
    Gift card creation time
    Example: 2023-08-16T23:59:59+08:00
  • id string
    Gift card id
    Example: 30157043359245339231360282
  • balance string
    Gift card balance
    Example: 200
  • last_characters string
    The last four characters from code
    Example: d246
  • currency string
    Gift card par currency
    Example: CNY
  • expires_on string
    The expiration date of the current gift card , lol is never expired
    Example: 2023-08-16T23:59:59+08:00
  • initial_value string
    Initial amount of gift card
    Example: 200
  • note string
    Note information for present gift card
    Example: This is a note
  • disabled_at string
    Gift card disable time
    Example: 2023-08-16T23:59:59+08:00
  • user_id string
    Administrator account id on the admin interface for users to create gift cards
    Example: 4214250478
  • updated_at string
    Gift card update time
    Example: 2023-08-16T23:59:59+08:00
  • customer_id string
    Client id for customers assigned to present gift card
    Example: 4200113946
  • api_client_id string
    Call party id
    Example: 30157043359245339231360282
  • order_id string
    Associated order id
    Example: 24060486231247568944830202
  • line_item_id string
    Associated order items
    Example: 18060183094426803997483534
API Explorer
https://openapiceshidianpu.myshopline.com/admin/openapi/v20260301

ParamOptions

path required
header required

Body

required
{
  "balance": "200",
  "expires_on": "2023-08-16T23:59:59+08:00",
  "note": "This is a note"
}

Language

curl --request PUT \
--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'
Was this article helpful to you?