Get gift card operation records
GET https://{handle}.myshopline.com/admin/openapi/v20250601/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 call party does not require use and attention to this field , automatically encapsulated by Shopline.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 requiredThe value of this field is fixed to
application/json; charset=utf-8
- Authorization string requiredThe access token for the API. Please refer to App authorization to obtain the access token, and then put the obtained access token into the API request header in Bearer Token.Example:
Bearer eyJhbGciOiJIUzUxMiJ9.eyJhcHBLZXkiOiJmMjM3OWQyMTYyOGMzM2QxMWRiMWZkYjY5N2EzZjdjMjZlNGMwYTA5Iiwic2VsbGVySWQiOiIyMDAwMjM0ODgwIiwic3RvcmVJZCI6IjE2NzIzNjk3Mjk2MDYiLCJ2ZXJzaW9uIjoiVjIiLCJkb21haW4iOiJodHRwczovL3NsLW9wZW4tc2cubXlzaG9wbGluZS5jb20iLCJ0aW1lc3RhbXAiOjE2NzUzMTk0OTI0MzksImlzcyI6Inlzb3VsIiwiZXhwIjoxNzY5OTI3NDkyfQ.UwQzomM2veGCUaOZ0paUxq5dpc7DXuhHYFvsQ_uIAKduzWcb_j2E4q_36El83sp145D4cKbpcE5KCeeIz-JNQw
Response
- 200
- 401
- 429
For more information about status codes, see Http status code.
Response Headers
link
Pagination links set in the response header, formatted as:<https://admin.myshopline.com?pageInfo=xxx&limit=10>; rel=\"next\", <https://admin.myshopline.com?pageInfo=xxx&limit=10>; rel=\"previous\"
.traceId
traceId
Response Body
- count integerTotal number of records.Example:
10
- 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.created_at stringGift card record creation time.Example:2023-08-16T23:59:59+08:00
cur_balance integerPost-change balance.Example:100
id stringGift Card records ID.Example:5504120995916023830
last_balance integerPre-change balance.Example:50
operation_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_DEDUCT
order_id stringAssociated order id.Example:21055050822459866501338306
pay_seq stringAssociated Payment id.Example:23062186831987862878904657
refund_id stringAssociated refund id.Example:2605514230128707114121
- status stringGift card status , enabled : enabled , disabled : not enabled.Example:
enabled
API Explorer
Debugger
Was this article helpful to you?