Requires read_gift_card access scope.
For more info , refer to:
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 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 call party does not require use and attention to this field , automatically encapsulated by Shopline.
    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 required
    The value of this field is fixed to application/json; charset=utf-8
  • Authorization string required
    The 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
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 integer
    Total number of records.
    Example: 10
  • 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.
  • created_at string
    Gift card record creation time.
    Example: 2023-08-16T23:59:59+08:00
  • cur_balance integer
    Post-change balance.
    Example: 100
  • 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
  • status string
    Gift card status , enabled : enabled , disabled : not enabled.
    Example: enabled
API Explorer
https://openapiceshidianpu.myshopline.com/admin/openapi/v20250601

ParamOptions

path required
header required
query
query
query
query
query
query

Language

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