Vouchers

Lists all vouchers associated with a specific customer

get
Authorizations
Path parameters
customerUidstringRequired
Header parameters
organization-idstringRequired

Organization ID

Responses
200Success
application/json
get
GET /v1/gift-cards/vouchers/by-customer/{customerUid} HTTP/1.1
Host: 
api-key: YOUR_API_KEY
organization-id: text
Accept: */*
200Success
{
  "app": "text",
  "service": "text",
  "warnings": [
    {}
  ],
  "instanceId": "text",
  "requestId": "text",
  "data": {
    "vouchers": [
      {
        "amount": 1,
        "activatedAt": "text",
        "sharedAt": "text",
        "activationEndDate": "text",
        "validity": 1,
        "createdAt": "text",
        "createdVia": "text",
        "updatedAt": "text",
        "updatedVia": "text",
        "uid": "text",
        "productId": "text",
        "customerId": "text",
        "holderId": "text",
        "sharedTo": {},
        "expiresAt": "text",
        "expired": true,
        "balance": 1,
        "accountUid": "text"
      }
    ],
    "next": "text"
  }
}

Returns a specific voucher

get
Authorizations
Path parameters
uidstringRequired
Header parameters
organization-idstringRequired

Organization ID

Responses
200Success
application/json
get
GET /v1/gift-cards/vouchers/{uid} HTTP/1.1
Host: 
api-key: YOUR_API_KEY
organization-id: text
Accept: */*
{
  "app": "text",
  "service": "text",
  "warnings": [
    {}
  ],
  "instanceId": "text",
  "requestId": "text",
  "data": {
    "voucher": {
      "amount": 1,
      "activatedAt": "text",
      "sharedAt": "text",
      "activationEndDate": "text",
      "validity": 1,
      "createdAt": "text",
      "createdVia": "text",
      "updatedAt": "text",
      "updatedVia": "text",
      "uid": "text",
      "productId": "text",
      "customerId": "text",
      "holderId": "text",
      "sharedTo": {},
      "expiresAt": "text",
      "expired": true,
      "balance": 1,
      "accountUid": "text"
    }
  }
}

Activates a specific voucher

patch
Authorizations
Path parameters
uidstringRequired
Header parameters
organization-idstringRequired

Organization ID

Body
Responses
200Success
application/json
patch
PATCH /v1/gift-cards/vouchers/{uid}/activate HTTP/1.1
Host: 
api-key: YOUR_API_KEY
organization-id: text
Content-Type: application/json
Accept: */*
Content-Length: 66

{
  "params": {
    "customerId": "text",
    "orderId": "text",
    "message": "text"
  }
}
{
  "app": "text",
  "service": "text",
  "warnings": [
    {}
  ],
  "instanceId": "text",
  "requestId": "text",
  "data": {
    "succeed": true
  }
}

Initiates a redemption transaction using a specific voucher.

post
Authorizations
Path parameters
uidstringRequired
Header parameters
organization-idstringRequired

Organization ID

Body
Responses
200Success
application/json
post
POST /v1/gift-cards/vouchers/{uid}/redeem HTTP/1.1
Host: 
api-key: YOUR_API_KEY
organization-id: text
Content-Type: application/json
Accept: */*
Content-Length: 42

{
  "params": {
    "amount": 1,
    "reference": "text"
  }
}
{
  "app": "text",
  "service": "text",
  "warnings": [
    {}
  ],
  "instanceId": "text",
  "requestId": "text",
  "data": {
    "transaction": {
      "type": "payment",
      "status": "applied",
      "time": "text",
      "amount": 1,
      "description": "text",
      "reversed": true,
      "reference": "text",
      "createdAt": "text",
      "createdVia": "text",
      "updatedAt": "text",
      "updatedVia": "text",
      "uid": "text",
      "accountUid": "text",
      "transferToAccountUid": "text"
    }
  }
}

Redeem a specific voucher using its voucher code

post
Authorizations
Header parameters
organization-idstringRequired

Organization ID

Body
Responses
200Success
application/json
post
POST /v1/gift-cards/vouchers/redeem-with-code HTTP/1.1
Host: 
api-key: YOUR_API_KEY
organization-id: text
Content-Type: application/json
Accept: */*
Content-Length: 56

{
  "params": {
    "code": "text",
    "amount": 1,
    "reference": "text"
  }
}
{
  "app": "text",
  "service": "text",
  "warnings": [
    {}
  ],
  "instanceId": "text",
  "requestId": "text",
  "data": {
    "transaction": {
      "type": "payment",
      "status": "applied",
      "time": "text",
      "amount": 1,
      "description": "text",
      "reversed": true,
      "reference": "text",
      "createdAt": "text",
      "createdVia": "text",
      "updatedAt": "text",
      "updatedVia": "text",
      "uid": "text",
      "accountUid": "text",
      "transferToAccountUid": "text"
    }
  }
}

Was this helpful?