API

Update voucher template

Updates a voucher template at enterprise.

POST/v1/hq/voucher_templates/{voucher_template_id}
AuthorizationBearer <token>

The 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

Path Parameters

voucher_template_id*string

Voucher Template ID

Query Parameters

unset?array<VoucherTemplateField>
select?array<string>

Request Body

application/json

type?string
Value in"amount" | "service"
Example"amount"
title?string
Example"Voucher for the men's haircut"
title_translations?

A map of translations for a given attribute.

The key is the language code, and the value is the translated string.

Example{ "is": "King Accounting tenging", "fr": "Connexion King Accounting" }
description?string
Example"Please note that the voucher is only valid between 10:00 and 14:00, Monday to Friday."
description_translations?

A map of translations for a given attribute.

The key is the language code, and the value is the translated string.

Example{ "is": "King Accounting tenging", "fr": "Connexion King Accounting" }
marketplace_description?string
Example"A short form description displayed on the Noona marketplace."
marketplace_description_translations?

A map of translations for a given attribute.

The key is the language code, and the value is the translated string.

Example{ "is": "King Accounting tenging", "fr": "Connexion King Accounting" }
event_type?string|
variation_id?string

The ID of the event type variation that the value of the voucher should be calculated from.

Example"7awdXwZoedakjad37a"
company?string
Example"7awdXwZoedakjad37a"
number_of_guests?integer

The number of people this voucher is valid for.

Default1
Formatint32
Example2
currency?string
Example"ISK"
amount?number
Formatdouble
Range1 <= value
Example10000
value?number
Formatdouble
Example12500
sessions_total?integer
Formatint32
Example5
marketplace?boolean

If true, voucher is visible on the marketplace.

Exampletrue
expiration_months_after_purchase?integer
Default48
Formatint32
Example12
images?
primary_color?string
Example"#0f0f0f"

Response Body

application/json

curl -X POST "https://api.noona.is/v1/hq/voucher_templates/string" \  -H "Content-Type: application/json" \  -d '{}'
{
  "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"
}
Empty