Open API v2 / eCommerce / eCommerce Gift Vouchers

eCommerce Gift Vouchers

Every request needs a bearer token: Authorization: Bearer <token>. Base URL https://your-site.webinone.com. New to field types? See the type reference.

GET/api/v2/admin/gift-vouchers#

Retrieves a list of gift vouchers by using a "where" filtering

Parameters
Wherestring · query
JSON filter expression. Combine operators ($eq, $contains, $gt, $in, …) with $and / $or.
Order_Bystring · query
Sort field. Prefix with - for descending; comma-separate for tie-breakers.
Semantic_Querystring · query
Natural-language search, ranked by relevance.
Min_Scorenumber · query
Lowest relevance score to include when using Semantic_Query.
Offsetinteger · query
Number of items to skip before returning results. Defaults to 0.
Limitinteger · query
Maximum number of items to return. Defaults to 100.
Response
Idinteger
Unique identifier. Technical record number in the database. Read-only.
Balancenumber
Any remaining value of the voucher(ie:if not used in full with previous order/s). For shop created vouchers, a link will be available here to the related customers Order)
Namestring
Name of the gift voucher.
Amountnumber
The total value of the gift voucher.
Enabledboolean
Uncheck this option to disable the item from being usable in the website shopping cart.
Currencystring · nullable
The currency in which you want the gift voucher created in.
OrderIdinteger
The order ID to which the certificate is linked (if it was purchased through the cart).
Typeenum
For shop created vouchers the value will be 'Via Shop'. Admin created vouchers will have a value of 'Manual'. This can not be edited.Possible values: ManualViaShop
Recipientobject
The person the voucher is issued to, holding their name, email, and personal message.
curl "https://your-site.webinone.com/api/v2/admin/gift-vouchers" \
  -H "Authorization: Bearer <token>"
Response · 200
{
  "Items": [
    {
      "Id": 1,
      "Balance": 0,
      "Name": "Example",
      "Amount": 0,
      "Enabled": false,
      "Currency": "USD",
      "OrderId": 1,
      "Type": "Manual",
      "Recipient": {
        "Name": "Example",
        "Email": "user@example.com",
        "Message": "string"
      }
    }
  ],
  "TotalItemsCount": 0
}
POST/api/v2/admin/gift-vouchers#

Creates a new gift voucher

Body parameters
Namestringrequired
The recipient's name(can be full name or just first name,or even a nickname. It's up to you).
Amountnumber
The total value of the gift voucher. Must be greater than 0.
Enabledboolean
Uncheck this option to disable the item from being usable in the website shopping cart.
Currencystring · nullable
The currency in which you want the gift voucher created in.
OrderIdinteger
The order ID to which the certificate is linked (if it was purchased through the cart).
Typeenum
For shop created vouchers the value will be 'Via Shop'. Admin created vouchers will have a value of 'Manual'. This can not be edited.Possible values: ManualViaShop
Recipientobject
The person the voucher is issued to. Carries the recipient's name, email address, and an optional personal message (which supports Liquid).
Response
Idinteger
Unique identifier. Technical record number in the database. Read-only.
Balancenumber
Any remaining value of the voucher(ie:if not used in full with previous order/s). For shop created vouchers, a link will be available here to the related customers Order)
Namestring
Name of the gift voucher.
Amountnumber
The total value of the gift voucher.
Enabledboolean
Uncheck this option to disable the item from being usable in the website shopping cart.
Currencystring · nullable
The currency in which you want the gift voucher created in.
OrderIdinteger
The order ID to which the certificate is linked (if it was purchased through the cart).
Typeenum
For shop created vouchers the value will be 'Via Shop'. Admin created vouchers will have a value of 'Manual'. This can not be edited.Possible values: ManualViaShop
Recipientobject
The person the voucher is issued to, holding their name, email, and personal message.
curl -X POST "https://your-site.webinone.com/api/v2/admin/gift-vouchers" \
  -H "Authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d '{"Name":"Example","Amount":0,"Enabled":false,"Currency":"USD","OrderId":1,"Type":"Manual","Recipient":{"Name":"Example","Email":"user@example.com","Message":"string"}}'
Response · 200
{
  "Id": 1,
  "Balance": 0,
  "Name": "Example",
  "Amount": 0,
  "Enabled": false,
  "Currency": "USD",
  "OrderId": 1,
  "Type": "Manual",
  "Recipient": {
    "Name": "Example",
    "Email": "user@example.com",
    "Message": "string"
  }
}
GET/api/v2/admin/gift-vouchers/{id}#

Retrieves a single gift voucher

Parameters
idinteger · pathrequired
Gift voucher id.
Response
Idinteger
Unique identifier. Technical record number in the database. Read-only.
Balancenumber
Any remaining value of the voucher(ie:if not used in full with previous order/s). For shop created vouchers, a link will be available here to the related customers Order)
Namestring
Name of the gift voucher.
Amountnumber
The total value of the gift voucher.
Enabledboolean
Uncheck this option to disable the item from being usable in the website shopping cart.
Currencystring · nullable
The currency in which you want the gift voucher created in.
OrderIdinteger
The order ID to which the certificate is linked (if it was purchased through the cart).
Typeenum
For shop created vouchers the value will be 'Via Shop'. Admin created vouchers will have a value of 'Manual'. This can not be edited.Possible values: ManualViaShop
Recipientobject
The person the voucher is issued to, holding their name, email, and personal message.
curl "https://your-site.webinone.com/api/v2/admin/gift-vouchers/1" \
  -H "Authorization: Bearer <token>"
Response · 200
{
  "Id": 1,
  "Balance": 0,
  "Name": "Example",
  "Amount": 0,
  "Enabled": false,
  "Currency": "USD",
  "OrderId": 1,
  "Type": "Manual",
  "Recipient": {
    "Name": "Example",
    "Email": "user@example.com",
    "Message": "string"
  }
}
PUT/api/v2/admin/gift-vouchers/{id}#

Updates an existing gift voucher

Parameters
idinteger · pathrequired
Existent gift voucher id.
Body parameters
Namestringrequired
The recipient's name(can be full name or just first name,or even a nickname. It's up to you).
Amountnumber
The total value of the gift voucher. Must be greater than 0.
Enabledboolean
Uncheck this option to disable the item from being usable in the website shopping cart.
Currencystring · nullable
The currency in which you want the gift voucher created in.
OrderIdinteger
The order ID to which the certificate is linked (if it was purchased through the cart).
Typeenum
For shop created vouchers the value will be 'Via Shop'. Admin created vouchers will have a value of 'Manual'. This can not be edited.Possible values: ManualViaShop
Recipientobject
The person the voucher is issued to. Carries the recipient's name, email address, and an optional personal message (which supports Liquid).
Response
Idinteger
Unique identifier. Technical record number in the database. Read-only.
Balancenumber
Any remaining value of the voucher(ie:if not used in full with previous order/s). For shop created vouchers, a link will be available here to the related customers Order)
Namestring
Name of the gift voucher.
Amountnumber
The total value of the gift voucher.
Enabledboolean
Uncheck this option to disable the item from being usable in the website shopping cart.
Currencystring · nullable
The currency in which you want the gift voucher created in.
OrderIdinteger
The order ID to which the certificate is linked (if it was purchased through the cart).
Typeenum
For shop created vouchers the value will be 'Via Shop'. Admin created vouchers will have a value of 'Manual'. This can not be edited.Possible values: ManualViaShop
Recipientobject
The person the voucher is issued to, holding their name, email, and personal message.
curl -X PUT "https://your-site.webinone.com/api/v2/admin/gift-vouchers/1" \
  -H "Authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d '{"Name":"Example","Amount":0,"Enabled":false,"Currency":"USD","OrderId":1,"Type":"Manual","Recipient":{"Name":"Example","Email":"user@example.com","Message":"string"}}'
Response · 200
{
  "Id": 1,
  "Balance": 0,
  "Name": "Example",
  "Amount": 0,
  "Enabled": false,
  "Currency": "USD",
  "OrderId": 1,
  "Type": "Manual",
  "Recipient": {
    "Name": "Example",
    "Email": "user@example.com",
    "Message": "string"
  }
}
DELETE/api/v2/admin/gift-vouchers/{id}#

Deletes an existing gift voucher

Parameters
idinteger · pathrequired
Existent gift voucher id.
curl -X DELETE "https://your-site.webinone.com/api/v2/admin/gift-vouchers/1" \
  -H "Authorization: Bearer <token>"