Gift Certificates
Get a Gift Certificate
GET https://api.bigcommerce.com/stores/{store_hash}/v2/gift_certificates/{id}Request
Authentication
- X-Auth-Token in header
Parameters
- store_hash in path - string
- Accept in header with default of application/json - stringrequiredThe MIME type of the response body.
- id in path - integerrequiredID of the gift certificate.
example
Response
Body
to_namestring
requiredName of the recipient.Example: John Doeto_emailstring
requiredEmail of the recipient.Example: johndoe@example.comfrom_namestring
requiredName of the customer who purchased the gift certificate.Example: Jane Doefrom_emailstring
requiredEmail of the customer who purchased the gift certificate.Example: janedoe@example.comamountstring
requiredValue of the gift certificate.Example: 10idinteger
The ID of the gift certificate. This is a READ-ONLY field; do not set or modify its value in a POST or PUT request.Example: 1customer_idinteger
The ID of the customer placing the order.Example: 5order_idinteger
The ID of the order.Example: 116balancestring
Remaining value of the gift certificate. If not set, will default to the amount.Example: 0purchase_datestring
Date the gift certificate was purchased. If not assigned, this will be set to today’s date. Date displays in the Unix timestamp format.Example: 1603306expiry_datestring
Date on which the gift certificate is set to expire. Date displays in the Unix timestamp format.Example: 1694738templatestring
The email theme to use in the message sent to the recipient.Allowed: birthday.html | girl.html | boy.html | celebration.html | christmas.html | general.html
Example: celebration.htmlcodestring
<= 255 charactersA unique string that a customer can input to redeem a gift certificate. Values greater than 20 characters will be trimmed down to the first 20 characters and returned in the response. If this field is not set, a value will be autogenerated.
Example: FFZ-5N4-C7M-S78statusstring
Allowed: active | pending | disabled | expired
Example: activecurrency_codestring
A currency code, following the ISO 4217 standard. The currency has to exist in the store first.
Gift Certificates can only be used if the transactional currency of the cart is the same as the one defined in the gift certificate. If this value is not provided, the gift certificate is created using the store's default transactional currency.
Example: USD
example
Update a Gift Certificate
PUT https://api.bigcommerce.com/stores/{store_hash}/v2/gift_certificates/{id}Request
Updates a Gift Certificate.
Read Only Fields
- id
- order_id
Authentication
- X-Auth-Token in header
Parameters
- store_hash in path - string
- Accept in header with default of application/json - stringrequiredThe MIME type of the response body.
- id in path - integerrequiredID of the gift certificate.
- Content-Type in header with default of application/json - stringrequiredThe MIME type of the request body.
Body
to_namestring
requiredName of the recipient.Example: John Doeto_emailstring
requiredEmail of the recipient.Example: johndoe@example.comfrom_namestring
requiredName of the customer who purchased the gift certificate.Example: Jane Doefrom_emailstring
requiredEmail of the customer who purchased the gift certificate.Example: janedoe@example.comamountstring
requiredValue of the gift certificate.Example: 10balancestring
The remaining value of the gift certificate. If not set, will default to the amount.Example: 0purchase_datestring
Date the gift certificate was purchased. If not assigned, this will be set to today’s date. Enter date in RFC-2822 format.Example: Mon, 19 Jan 1970 07:21:46 CSTexpiry_datestring
Date on which the gift certificate is set to expire.Example: Mon, 02 Jan 2023 08:45:38 CSTcustomer_idinteger
The ID of the customer placing the order.Example: 5templatestring
The email theme to use in the message sent to the recipient.Allowed: birthday.html | boy.html | girl.html | celebration.html | christmas.html | general.html
Example: celebration.htmlcodestring
<= 255 charactersA unique string that a customer can input to redeem a gift certificate. Values greater than 20 characters will be trimmed down to the first 20 characters and returned in the response. If this field is not set, a value will be autogenerated.
Example: FFZ-5N4-C7M-S78statusstring
Allowed: active | pending | expired | disabled
Example: activecurrency_codestring
A currency code, following the ISO 4217 standard. The currency has to exist in the store first.
Gift Certificates can only be used if the transactional currency of the cart is the same as the one defined in the gift certificate. If this value is not provided, the gift certificate is created using the store's default transactional currency.
Example: USD
example
Response
Body
to_namestring
requiredName of the recipient.Example: John Doeto_emailstring
requiredEmail of the recipient.Example: johndoe@example.comfrom_namestring
requiredName of the customer who purchased the gift certificate.Example: Jane Doefrom_emailstring
requiredEmail of the customer who purchased the gift certificate.Example: janedoe@example.comamountstring
requiredValue of the gift certificate.Example: 10idinteger
The ID of the gift certificate. This is a READ-ONLY field; do not set or modify its value in a POST or PUT request.Example: 1customer_idinteger
The ID of the customer placing the order.Example: 5order_idinteger
The ID of the order.Example: 116balancestring
Remaining value of the gift certificate. If not set, will default to the amount.Example: 0purchase_datestring
Date the gift certificate was purchased. If not assigned, this will be set to today’s date. Date displays in the Unix timestamp format.Example: 1603306expiry_datestring
Date on which the gift certificate is set to expire. Date displays in the Unix timestamp format.Example: 1694738templatestring
The email theme to use in the message sent to the recipient.Allowed: birthday.html | girl.html | boy.html | celebration.html | christmas.html | general.html
Example: celebration.htmlcodestring
<= 255 charactersA unique string that a customer can input to redeem a gift certificate. Values greater than 20 characters will be trimmed down to the first 20 characters and returned in the response. If this field is not set, a value will be autogenerated.
Example: FFZ-5N4-C7M-S78statusstring
Allowed: active | pending | disabled | expired
Example: activecurrency_codestring
A currency code, following the ISO 4217 standard. The currency has to exist in the store first.
Gift Certificates can only be used if the transactional currency of the cart is the same as the one defined in the gift certificate. If this value is not provided, the gift certificate is created using the store's default transactional currency.
Example: USD
example
Delete a Gift Certificate
DELETE https://api.bigcommerce.com/stores/{store_hash}/v2/gift_certificates/{id}Request
Authentication
- X-Auth-Token in header
Parameters
- store_hash in path - string
- Accept in header with default of application/json - stringrequiredThe MIME type of the response body.
- id in path - integerrequiredID of the gift certificate.
example
Response
Get All Gift Certificates
GET https://api.bigcommerce.com/stores/{store_hash}/v2/gift_certificatesRequest
Returns a list of Gift Certificates. Optional filter parameters can be passed in.
Default sorting is by gift-certificate id, from lowest to highest.
The maximum limit is 250. If a limit isn’t provided, up to 50 gift_certificates are returned by default.
Authentication
- X-Auth-Token in header
Parameters
- store_hash in path - string
- Accept in header with default of application/json - stringrequiredThe MIME type of the response body.
- min_id in query - integer
- max_id in query - integer
- code in query - string
- order_id in query - integer
- to_name in query - string
- to_email in query - string
- from_name in query - string
- from_email in query - string
- page in query - number
- limit in query - number
example
Response
Body
to_namestring
requiredName of the recipient.Example: John Doeto_emailstring
requiredEmail of the recipient.Example: johndoe@example.comfrom_namestring
requiredName of the customer who purchased the gift certificate.Example: Jane Doefrom_emailstring
requiredEmail of the customer who purchased the gift certificate.Example: janedoe@example.comamountstring
requiredValue of the gift certificate.Example: 10idinteger
The ID of the gift certificate. This is a READ-ONLY field; do not set or modify its value in a POST or PUT request.Example: 1customer_idinteger
The ID of the customer placing the order.Example: 5order_idinteger
The ID of the order.Example: 116balancestring
Remaining value of the gift certificate. If not set, will default to the amount.Example: 0purchase_datestring
Date the gift certificate was purchased. If not assigned, this will be set to today’s date. Date displays in the Unix timestamp format.Example: 1603306expiry_datestring
Date on which the gift certificate is set to expire. Date displays in the Unix timestamp format.Example: 1694738templatestring
The email theme to use in the message sent to the recipient.Allowed: birthday.html | girl.html | boy.html | celebration.html | christmas.html | general.html
Example: celebration.htmlcodestring
<= 255 charactersA unique string that a customer can input to redeem a gift certificate. Values greater than 20 characters will be trimmed down to the first 20 characters and returned in the response. If this field is not set, a value will be autogenerated.
Example: FFZ-5N4-C7M-S78statusstring
Allowed: active | pending | disabled | expired
Example: activecurrency_codestring
A currency code, following the ISO 4217 standard. The currency has to exist in the store first.
Gift Certificates can only be used if the transactional currency of the cart is the same as the one defined in the gift certificate. If this value is not provided, the gift certificate is created using the store's default transactional currency.
Example: USD
example
Create a Gift Certificate
POST https://api.bigcommerce.com/stores/{store_hash}/v2/gift_certificatesRequest
Creates a Gift Certificate.
Required Fields
- to_name
- to_email
- from_name
- from_email
- amount
Read Only Fields
- id
- order_id
Notes
When a gift certificate is created through the API, no email notification is triggered to the specified recipient.
Authentication
- X-Auth-Token in header
Parameters
- store_hash in path - string
- Accept in header with default of application/json - stringrequiredThe MIME type of the response body.
- Content-Type in header with default of application/json - stringrequiredThe MIME type of the request body.
Body
to_namestring
requiredName of the recipient.Example: John Doeto_emailstring
requiredEmail of the recipient.Example: johndoe@example.comfrom_namestring
requiredName of the customer who purchased the gift certificate.Example: Jane Doefrom_emailstring
requiredEmail of the customer who purchased the gift certificate.Example: janedoe@example.comamountstring
requiredValue of the gift certificate.Example: 10balancestring
Remaining value of the gift certificate. If not set, will default to the amount.Example: 0purchase_datestring
Date the gift certificate was purchased. If not assigned, this will be set to today’s date. Enter date in RFC-2822 format.Example: Mon, 19 Jan 1970 07:21:46 CSTexpiry_datestring
Date on which the gift certificate is set to expire. The date must be in RFC 2822 format.Example: Tue, 20 Jan 1970 08:45:38 CSTcustomer_idinteger
The ID of the customer placing the order.Example: 5templatestring
The email theme to use in the message sent to the recipient.Allowed: birthday.html | boy.html | girl.html | celebration.html | christmas.html | general.html
Example: celebration.htmlcodestring
<= 255 charactersA unique string that a customer can input to redeem a gift certificate. Values greater than 20 characters will be trimmed down to the first 20 characters and returned in the response. If this field is not set, a value will be autogenerated.
Example: FFZ-5N4-C7M-S78statusstring
Allowed: active | pending | expired | disabled
Example: activecurrency_codestring
A currency code, following the ISO 4217 standard. The currency has to exist in the store first.
Gift Certificates can only be used if the transactional currency of the cart is the same as the one defined in the gift certificate. If this value is not provided, the gift certificate is created using the store's default transactional currency.
Example: USD
example
Response
Body
to_namestring
requiredName of the recipient.Example: John Doeto_emailstring
requiredEmail of the recipient.Example: johndoe@example.comfrom_namestring
requiredName of the customer who purchased the gift certificate.Example: Jane Doefrom_emailstring
requiredEmail of the customer who purchased the gift certificate.Example: janedoe@example.comamountstring
requiredValue of the gift certificate.Example: 10idinteger
The ID of the gift certificate. This is a READ-ONLY field; do not set or modify its value in a POST or PUT request.Example: 1customer_idinteger
The ID of the customer placing the order.Example: 5order_idinteger
The ID of the order.Example: 116balancestring
Remaining value of the gift certificate. If not set, will default to the amount.Example: 0purchase_datestring
Date the gift certificate was purchased. If not assigned, this will be set to today’s date. Date displays in the Unix timestamp format.Example: 1603306expiry_datestring
Date on which the gift certificate is set to expire. Date displays in the Unix timestamp format.Example: 1694738templatestring
The email theme to use in the message sent to the recipient.Allowed: birthday.html | girl.html | boy.html | celebration.html | christmas.html | general.html
Example: celebration.htmlcodestring
<= 255 charactersA unique string that a customer can input to redeem a gift certificate. Values greater than 20 characters will be trimmed down to the first 20 characters and returned in the response. If this field is not set, a value will be autogenerated.
Example: FFZ-5N4-C7M-S78statusstring
Allowed: active | pending | disabled | expired
Example: activecurrency_codestring
A currency code, following the ISO 4217 standard. The currency has to exist in the store first.
Gift Certificates can only be used if the transactional currency of the cart is the same as the one defined in the gift certificate. If this value is not provided, the gift certificate is created using the store's default transactional currency.
Example: USD
example
Delete All Gift Certificates
DELETE https://api.bigcommerce.com/stores/{store_hash}/v2/gift_certificatesRequest
Authentication
- X-Auth-Token in header
Parameters
- store_hash in path - string
- Accept in header with default of application/json - stringrequiredThe MIME type of the response body.