Get gift card operation records
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 requiredGift Card ID.Example:
30157043359245339231360282
Query Parameters
- createtime_at_max stringCreate 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 stringCreate 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 stringLimit of query , default 50 , can not exceed 100.Example:
100 - operation_type stringGift Card Operation Types, separate multiple values with commas ",". If left blank, all types will be returned.
Value Description OPERATE_ACTION_DEDUCT Deduction from gift card payment. OPERATE_ACTION_REFUND Refund returned to gift card. OPERATE_ACTION_ADJUST_BALANCE Balance adjustment by third-party applications. Example:OPERATE_ACTION_DEDUCT,OPERATE_ACTION_REFUND - page_info stringThe unique identifier for pagination queries, used to locate a specific page.This parameter value is obtained from the
linkvalue in the response header of this API after you have queried the pagination information.For example, if thelinkvalue 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 ofpage_infoiseyJzaW5jZUlkIjoiMTYwNTc1OTAxNTM4OTA4Mjk1MjExMTI3ODgiLCJkaXJlY3Rpb24iOiJuZXh0IiwibGltaXQiOjF9. For more information on how to use pagination, refer to Paging Mechanism.Example:eyJzaW5jZUlkIjoiMzAxNTcwNDMzNTkyNDUzMzkyMzEzNjAyODIiLCJkaXJlY3Rpb24iOiJwcmV2Iiwic3RhdHVzIjoiZW5hYmxl - sort_order stringSorted by usage time
Value Description asc Sorted in ascending order of usage time. desc Sorted in ascending order of usage time, is default. Example:desc
Request Headers
- Content-Type string requiredThe field must be set to the fixed value
application/json; charset=utf-8. - Authorization string requiredThe 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
- 200
- 401
- 429
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 obtainpage_infofrom 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 stringGift card creation time.Example:
2023-08-16T23:59:59+08:00 - customer_id stringClient id for customers assigned to present gift card.Example:
4200113946 - gift_card_id stringGift Card ID.Example:
30157043359245339231360282 gift_card_recordsobject[]
List of gift card operation records.id stringGift Card records ID.Example:5504120995916023830last_balance integerPre-change balance.Example:50operation_type stringGift card operation type.Value Description OPERATE_ACTION_DEDUCT Deduction from gift card payment. OPERATE_ACTION_REFUND Refund returned to gift card. OPERATE_ACTION_ADJUST_BALANCE Balance adjustment by third-party applications. Example:OPERATE_ACTION_DEDUCTorder_id stringAssociated order id.Example:21055050822459866501338306pay_seq stringAssociated Payment id.Example:23062186831987862878904657refund_id stringAssociated refund id.Example:2605514230128707114121created_at stringGift card record creation time.Example:2023-08-16T23:59:59+08:00cur_balance integerPost-change balance.Example:100- status stringGift card status , enabled : enabled , disabled : not enabled.Example:
enabled - count integerTotal number of records.Example:
10
API Explorer
Debugger
Was this article helpful to you?