Activate Status
GET https://api.e-guma.ch/v1/depot_vouchers/`{code}`/activate_status.json?apikey=`{api-key}`Parameters
| Parameter | Description |
|---|---|
code required | The alphanumeric code of the voucher. The code has 12 characters. You can pass the code with (e.g. ABCD-ABCD-ABCD) or without (e.g. ABCDABCDABCD) dashes. |
api-key required |
Return
| code | The same voucher code as you provided as parameter |
| can_be_activated | If the voucher is not yet sold it is equal true. If the voucher is already sold it is false |
| free_amount | If this value is true, the user can choose the value of the voucher in your system. If false, the value of the voucher is returned in the field amount_in_cents |
| amount_in_cents | The value of the voucher |
| currency | The set currency |
| product_id | The ID of the voucher type. |
| message | If the voucher can not be activated, the message contains the reason. The message is returned in the client's default language. |
Example
GET https://api.e-guma.ch/v1/depot_vouchers/VX2V5ATBMSJ6/activate_status.json?apikey=510e32c594d84816a4af9df0{
"code":"VX2V5ATBMSJ6",
"can_be_activated": true,
"free_amount": false,
"amount_in_cents": 10000,
"currency": "CHF",
"product_id": "ce5070b4-af5e-4471-8bb4-591744da4da6",
"message": ""
}Updated 10 months ago
