Requires read_gift_card access scope.
For more info, refer to:
GET https://{handle}.myshopline.com/admin/openapi/v20260301/gift_cards/:gift_card_id/operation_records.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 .
Retrieve a list of operation records for a specific gift card.
Path Parameters
  • gift_card_id string required
    Gift Card ID.
    Example: 30157043359245339231360282
Query Parameters
  • createtime_at_max string
    Create time before xxx ( format see ISO8601 ), up to 180 days of data can be queried.
    Example: 2021-09-04T14:11:54+00:00
  • createtime_at_min string
    Create time starts with xxx ( format see ISO8601 ), up to 180 days of data can be queried.
    Example: 2021-09-02T14:11:54+00:00
  • limit string
    Limit of query , default 50 , can not exceed 100.
    Example: 100
  • operation_type string
    Gift Card Operation Types, separate multiple values with commas ",". If left blank, all types will be returned.
    ValueDescription
    OPERATE_ACTION_DEDUCTDeduction from gift card payment.
    OPERATE_ACTION_REFUNDRefund returned to gift card.
    OPERATE_ACTION_ADJUST_BALANCEBalance adjustment by third-party applications.
    Example: OPERATE_ACTION_DEDUCT,OPERATE_ACTION_REFUND
  • page_info string
    The unique identifier for pagination queries, used to locate a specific page.
    This parameter value is obtained from the link value in the response header of this API after you have queried the pagination information.
    For example, if the link value you obtained is <https://{handle}.myshopline.com/admin/openapi/{version}/gift_cards/:gift_card_id/operation_records.json?limit=1&page_info=eyJzaW5jZUlkIjoiMTYwNTc1OTAxNTM4OTA4Mjk1MjExMTI3ODgiLCJkaXJlY3Rpb24iOiJuZXh0IiwibGltaXQiOjF9>; rel="next" , the value of page_info is eyJzaW5jZUlkIjoiMTYwNTc1OTAxNTM4OTA4Mjk1MjExMTI3ODgiLCJkaXJlY3Rpb24iOiJuZXh0IiwibGltaXQiOjF9 . For more information on how to use pagination, refer to Paging Mechanism.
    Example: eyJzaW5jZUlkIjoiMzAxNTcwNDMzNTkyNDUzMzkyMzEzNjAyODIiLCJkaXJlY3Rpb24iOiJwcmV2Iiwic3RhdHVzIjoiZW5hYmxl
  • sort_order string
    Sorted by usage time
    ValueDescription
    ascSorted in ascending order of usage time.
    descSorted in ascending order of usage time, is default.
    Example: desc
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
  • link
    The URL link that provides the pagination data. You can obtain page_info from this parameter for subsequent pagination requests.
    This parameter is returned when the requested page has a previous or next page.
    For more information on how to use pagination, refer to Paging Mechanism.
  • 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
  • created_at string
    Gift card creation time.
    Example: 2023-08-16T23:59:59+08:00
  • customer_id string
    Client id for customers assigned to present gift card.
    Example: 4200113946
  • gift_card_id string
    Gift Card ID.
    Example: 30157043359245339231360282
  • gift_card_recordsobject[]
    List of gift card operation records.
  • id string
    Gift Card records ID.
    Example: 5504120995916023830
  • last_balance integer
    Pre-change balance.
    Example: 50
  • operation_type string
    Gift card operation type.
    ValueDescription
    OPERATE_ACTION_DEDUCTDeduction from gift card payment.
    OPERATE_ACTION_REFUNDRefund returned to gift card.
    OPERATE_ACTION_ADJUST_BALANCEBalance adjustment by third-party applications.
    Example: OPERATE_ACTION_DEDUCT
  • order_id string
    Associated order id.
    Example: 21055050822459866501338306
  • pay_seq string
    Associated Payment id.
    Example: 23062186831987862878904657
  • refund_id string
    Associated refund id.
    Example: 2605514230128707114121
  • created_at string
    Gift card record creation time.
    Example: 2023-08-16T23:59:59+08:00
  • cur_balance integer
    Post-change balance.
    Example: 100
  • status string
    Gift card status , enabled : enabled , disabled : not enabled.
    Example: enabled
  • count integer
    Total number of records.
    Example: 10
API Explorer
https://openapiceshidianpu.myshopline.com/admin/openapi/v20260301

ParamOptions

path required
header required
query
query
query
query
query
query

Language

curl --request GET \
--url https://openapiceshidianpu.myshopline.com/admin/openapi/v20260301/gift_cards/gift_card_id/operation_records.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?