Create voucher template
Creates a voucher template for company.
/v1/hq/voucher_templatesThe Noona HQ API uses Bearer token for authentication.
Endpoints that return generic information that does not contain sensitive data do not require authentication. Endpoints that require authentication are specifically marked in the documentation.
Authorization: Bearer your-token
In: header
Query Parameters
Request Body
application/json
"amount" | "service""amount""Voucher for the men's haircut"A map of translations for a given attribute.
The key is the language code, and the value is the translated string.
{
"is": "King Accounting tenging",
"fr": "Connexion King Accounting"
}"Please note that the voucher is only valid between 10:00 and 14:00, Monday to Friday."A map of translations for a given attribute.
The key is the language code, and the value is the translated string.
{
"is": "King Accounting tenging",
"fr": "Connexion King Accounting"
}"A short form description displayed on the Noona marketplace."A map of translations for a given attribute.
The key is the language code, and the value is the translated string.
{
"is": "King Accounting tenging",
"fr": "Connexion King Accounting"
}The ID of the event type variation that the value of the voucher should be calculated from.
"7awdXwZoedakjad37a""7awdXwZoedakjad37a"The number of people this voucher is valid for.
1int322"ISK"double1 <= value10000double12500int325If true, voucher is visible on the marketplace.
true48int3212"#0f0f0f"Response Body
application/json
curl -X POST "https://api.noona.is/v1/hq/voucher_templates" \ -H "Content-Type: application/json" \ -d '{ "company": "7awdXwZoedakjad37a", "currency": "ISK", "amount": 10000 }'{
"id": "7awdXwZoedakjad37a",
"type": "amount",
"title": "Voucher for the men's haircut",
"title_translations": {
"is": "King Accounting tenging",
"fr": "Connexion King Accounting"
},
"description": "Please note that the voucher is only valid between 10:00 and 14:00, Monday to Friday.",
"description_translations": {
"is": "King Accounting tenging",
"fr": "Connexion King Accounting"
},
"marketplace_description": "A short form description displayed on the Noona marketplace.",
"marketplace_description_translations": {
"is": "King Accounting tenging",
"fr": "Connexion King Accounting"
},
"event_type": "string",
"variation_id": "7awdXwZoedakjad37a",
"company": "7awdXwZoedakjad37a",
"number_of_guests": 2,
"currency": "ISK",
"amount": 10000,
"value": 12500,
"sessions_total": 5,
"marketplace": true,
"expiration_months_after_purchase": 12,
"images": [
{
"thumb": "https://placekitten.com/200/200",
"image": "https://placekitten.com/200/300",
"public_id": "https://placekitten.com/200/300",
"type": "thumbnail",
"provider": "cloudinary",
"width": 200,
"height": 300,
"bytes": 95849
}
],
"primary_color": "#0f0f0f",
"created_at": "2019-08-24T14:15:22Z",
"updated_at": "2019-08-24T14:15:22Z"
}