Afriqiua Gaz Vouchers
3.5 Verifiy Afriquia Gaz Voucher Status:
This endpoint allows to retrieve the status of an Afriquia Gaz Voucher by its unique code.
GET /api/v1/shops/<shop_uuid>/vouchers/<voucher_code>
Response Parameters:
| Parameter | Type | Description |
|---|---|---|
status | string | The status of the voucher (available|burned|canceled) |
code | string | Unique code ID of the voucher |
points_amount | float | Voucher's points worth |
customer | string | E.164 format mobile number of the voucher owner |
Sample Response:
[{
"status": "available",
"code": "dF54GFd7",
"points_amount": 10.55,
"customer": "+212612345678",
"created_at": "2022-01-21T10:16:57.131872+01:00"
},
{
"status": "available",
"code": "dF54GFd6",
"points_amount": 12.55,
"customer": "+212612475678",
"created_at": "2022-01-20T10:16:57.131872+01:00"
}]
3.6 Burn Afriquia Gaz Voucher(s)
This endpoint is somewhat similar to a Payment Request. It allows to burn one or more valid voucher(s) within a transaction by providing an array of the voucher(s) code(s) called vouchers alongside the other sale-related attributes (amount, order_id, terminal_id ...)
POST /api/v1/shops/<shop_uuid>/vouchers-burn
Request Parameters:
| Parameter | Type | Description |
|---|---|---|
terminal_id | string | A unique ID for the POS/terminal/till |
agent_id | string | (optional) ID of the agent/cashier performing the transaction |
agent_mobile_number | string | (optional) E.164 format or national (06/07xxxxxxxx) mobile number of the agent |
amount | float | The total amount of the sale |
currency | string | ISO 4217 code of the currency of the completed sale (e.g. MAD for Moroccan dirham) |
order_id | string | A unique ID representing the completed sale that can be used later on to refund or for reconciliation |
time | string | ISO 8601 string representing the time the sale was completed |
customer | string | E.164 format or national (06/07xxxxxxxx) mobile number of the voucher(s) owner |
vouchers | array | Non-empty array containing valid voucher(s) code(s) |
Sample Request:
{
"terminal_id": "POS_123456789",
"amount": 100.00,
"currency": "MAD",
"order_id": "TX_123456789",
"time": "2021-02-12T19:20:30+01:00",
"customer": "+212611223344",
"vouchers": [
"abcd0001",
"abcd0002",
"abcd0003"
]
}
Response Parameters:
| Parameter | Type | Description |
|---|---|---|
order_id | string | The unique ID representing this sale |
Sample Response:
{
"order_id": "TX_123456789",
}