About Gift Card ​
Access scope
Multiple access scopes needed — refer to each endpoint for access scope requirements.
Gift Card is a crucial component of Genstore's payment solutions, enabling customers to purchase and use prepaid amounts, providing flexible payment options for online stores. Genstore offers a series of RESTful interfaces for comprehensive gift card management, including creation, update, invalidation, and query operations, allowing merchants to efficiently manage and track gift card usage.
Core Features
- Basic Operations: Create gift card, update gift card, invalidate gift card
- Information Query: Get gift card details, list gift cards, count gift cards
Use Cases
- Gift Card Sales: .Store managers can launch digital gift card programs, customize card designs and denominations, and manage promotional rules through the API, expanding payment options while creating new revenue streams.
- Gift Card Lifecycle Operations: Customer service teams can efficiently process gift card issuance, handle balance updates, and manage card status changes, ensuring secure and accurate gift card transactions.
- Gift Card Analytics: Business analysts can track gift card performance metrics, generate usage reports, and analyze purchase patterns through the API, optimizing gift card programs and improving customer engagement.
Endpoints
POST
/api/202412/gift_cards: Create gift cards
POST
/api/202412/gift_cards/{giftCardId}/disable: Disable gift card
PUT
/api/202412/gift_cards/{giftCardId}: Update gift card
GET
/api/202412/gift_cards/search: Searches for gift cards
GET
/api/202412/gift_cards/{giftCardId}: Query gift card details
GET
/api/202412/gift_cards/count: Query the number of gift cards
Object ​
[none:object_desc]
Properties ​
{
"giftCard": {
"note": "this is gift card",
"code": "fehjignfjeingx",
"orderId": "300139485001998",
"lineItemId": "300139485001998",
"updateTime": "2024-12-16T17:04:38.004",
"userId": "20000012584",
"lastCharacters": "ingx",
"expireTime": "2027-12-04",
"balance": "100.00",
"createTime": "2024-12-16T17:04:38.004",
"customerId": "20000012619",
"currency": "USD",
"id": "201462124",
"initialValue": "100.00",
"disableTime": "2024-12-16T17:17:03.017"
}
}
POST
Create gift cards ​
Create gift cards.
Access scope
Requires ANY of the following access scopes: write_gift_card
Endpoint
POST
/api/202412/gift_cards
Request Params
Response Data
curl -X POST \
https://{shop}.genmystore.com/api/202412/gift_cards" \
-H "X-Genstore-Access-Token: {access_token}" \
-H "Content-Type: application/json" \
-d '{
"giftCard":{
"note":"this is gift card",
"code":"fehjignfjeingx",
"expireTime":"2027-12-04T21:20:50+08:00",
"customerId":"20000012619",
"initialValue":"100"
}
}'
HTTP/1.1 200 OK
{
"giftCard": {
"note": "this is gift card",
"code": "fehjignfjeingx",
"orderId": "300139485001998",
"lineItemId": "300139485001998",
"updateTime": "2024-12-16T17:04:38.004",
"userId": "20000012584",
"lastCharacters": "ingx",
"expireTime": "2027-12-04",
"balance": "100.00",
"createTime": "2024-12-16T17:04:38.004",
"customerId": "20000012619",
"currency": "USD",
"id": "201462124",
"initialValue": "100.00",
"disableTime": "2024-12-16T17:17:03.017"
}
}
POST
Disable gift card ​
Disable gift card.
Access scope
Requires ANY of the following access scopes: write_gift_card
Endpoint
POST
/api/202412/gift_cards/{giftCardId}/disable
Request Params
Response Data
curl -X POST \
https://{shop}.genmystore.com/api/202412/gift_cards/{giftCardId}/disable" \
-H "X-Genstore-Access-Token: {access_token}" \
-H "Content-Type: application/json" \
-d '{
"giftCardId":""
}'
HTTP/1.1 200 OK
{
"giftCard": {
"note": "this is gift card",
"code": "fehjignfjeingx",
"orderId": "300139485001998",
"lineItemId": "300139485001998",
"updateTime": "2024-12-16T17:04:38.004",
"userId": "20000012584",
"lastCharacters": "ingx",
"expireTime": "2027-12-04",
"balance": "100.00",
"createTime": "2024-12-16T17:04:38.004",
"customerId": "20000012619",
"currency": "USD",
"id": "201462124",
"initialValue": "100.00",
"disableTime": "2024-12-16T17:17:03.017"
}
}
PUT
Update gift card ​
Update gift card.
Access scope
Requires ANY of the following access scopes: write_gift_card
Endpoint
PUT
/api/202412/gift_cards/{giftCardId}
Request Params
Response Data
curl -X PUT \
https://{shop}.genmystore.com/api/202412/gift_cards/{giftCardId}" \
-H "X-Genstore-Access-Token: {access_token}" \
-H "Content-Type: application/json" \
-d '{
"giftCard":{
"note":"this is gift card",
"expireTime":"2024-12-16T16:33:12.033",
"balance":"100"
}
}'
HTTP/1.1 200 OK
{
"giftCard": {
"note": "this is gift card",
"code": "fehjignfjeingx",
"orderId": "300139485001998",
"lineItemId": "300139485001998",
"updateTime": "2024-12-16T17:04:38.004",
"userId": "20000012584",
"lastCharacters": "ingx",
"expireTime": "2027-12-04",
"balance": "100.00",
"createTime": "2024-12-16T17:04:38.004",
"customerId": "20000012619",
"currency": "USD",
"id": "201462124",
"initialValue": "100.00",
"disableTime": "2024-12-16T17:17:03.017"
}
}
GET
Searches for gift cards ​
Gift card search capability.
Access scope
Requires ANY of the following access scopes: read_gift_card
write_gift_card
Endpoint
GET
/api/202412/gift_cards/search
Request Params
Response Data
curl -X GET \
https://{shop}.genmystore.com/api/202412/gift_cards/search" \
-H "X-Genstore-Access-Token: {access_token}" \
HTTP/1.1 200 OK
{
"giftCards": [
{
"note": "this is gift card",
"code": "fehjignfjeingx",
"orderId": "300139485001998",
"lineItemId": "300139485001998",
"updateTime": "2024-12-16T17:04:38.004",
"userId": "20000012584",
"lastCharacters": "ingx",
"expireTime": "2027-12-04",
"balance": "100.00",
"createTime": "2024-12-16T17:04:38.004",
"customerId": "20000012619",
"currency": "USD",
"id": "201462125",
"initialValue": "100.00",
"disableTime": "2024-12-16T17:17:03.017"
}
]
}
GET
Query gift card details ​
Query the details of a single gift card.
Access scope
Requires ANY of the following access scopes: read_gift_card
write_gift_card
Endpoint
GET
/api/202412/gift_cards/{giftCardId}
Request Params
Response Data
curl -X GET \
https://{shop}.genmystore.com/api/202412/gift_cards/{giftCardId}" \
-H "X-Genstore-Access-Token: {access_token}" \
HTTP/1.1 200 OK
{
"giftCard": {
"note": "this is gift card",
"code": "fehjignfjeingx",
"orderId": "300139485001998",
"lineItemId": "300139485001998",
"updateTime": "2024-12-16T17:04:38.004",
"userId": "20000012584",
"lastCharacters": "ingx",
"expireTime": "2027-12-04",
"balance": "100.00",
"createTime": "2024-12-16T17:04:38.004",
"customerId": "20000012619",
"currency": "USD",
"id": "201462124",
"initialValue": "100.00",
"disableTime": "2024-12-16T17:17:03.017"
}
}
GET
Query the number of gift cards ​
Query the total number of gift cards.
Access scope
Requires ANY of the following access scopes: read_gift_card
write_gift_card
Endpoint
GET
/api/202412/gift_cards/count
Request Params
Response Data
curl -X GET \
https://{shop}.genmystore.com/api/202412/gift_cards/count" \
-H "X-Genstore-Access-Token: {access_token}" \
HTTP/1.1 200 OK
{
"count": "44"
}
About Gift Card
Access scope
Multiple access scopes needed — refer to each endpoint for access scope requirements.
Gift Card is a crucial component of Genstore's payment solutions, enabling customers to purchase and use prepaid amounts, providing flexible payment options for online stores. Genstore offers a series of RESTful interfaces for comprehensive gift card management, including creation, update, invalidation, and query operations, allowing merchants to efficiently manage and track gift card usage.
Core Features
- Basic Operations: Create gift card, update gift card, invalidate gift card
- Information Query: Get gift card details, list gift cards, count gift cards
Use Cases
- Gift Card Sales: .Store managers can launch digital gift card programs, customize card designs and denominations, and manage promotional rules through the API, expanding payment options while creating new revenue streams.
- Gift Card Lifecycle Operations: Customer service teams can efficiently process gift card issuance, handle balance updates, and manage card status changes, ensuring secure and accurate gift card transactions.
- Gift Card Analytics: Business analysts can track gift card performance metrics, generate usage reports, and analyze purchase patterns through the API, optimizing gift card programs and improving customer engagement.
Object
[none:object_desc]
Properties
POST
Create gift cards
Create gift cards.
Access scope
Requires ANY of the following access scopes: write_gift_card
Endpoint
POST
/api/202412/gift_cards
POST
Disable gift card
Disable gift card.
Access scope
Requires ANY of the following access scopes: write_gift_card
Endpoint
POST
/api/202412/gift_cards/{giftCardId}/disable
PUT
Update gift card
Update gift card.
Access scope
Requires ANY of the following access scopes: write_gift_card
Endpoint
PUT
/api/202412/gift_cards/{giftCardId}
GET
Searches for gift cards
Gift card search capability.
Access scope
Requires ANY of the following access scopes: read_gift_card
write_gift_card
Endpoint
GET
/api/202412/gift_cards/search
GET
Query gift card details
Query the details of a single gift card.
Access scope
Requires ANY of the following access scopes: read_gift_card
write_gift_card
Endpoint
GET
/api/202412/gift_cards/{giftCardId}
GET
Query the number of gift cards
Query the total number of gift cards.
Access scope
Requires ANY of the following access scopes: read_gift_card
write_gift_card
Endpoint
GET
/api/202412/gift_cards/count