POST voucher
Changed onCreate a new Voucher.
Request
- Base URLhttps://api.bookingexperts.com
- Auth
- API key in header X-API-KEY
- or OAuth 2Authorization code/oauth/authorizeToken URL/oauth/token
- TypeScriptA function with typed inputs. Its response is checked against the schema.
Path parameters
Administration ID
Query parameters
Fieldset. Specify a comma separated list of attributes to return
Includes list. Specify a comma separated list of resources to include.
Headers
Supported languages. A comma separated list with one or more of the following locales: cs, da-DK, de, de-AT, de-CH, en-US, en-GB, es, fr, fr-BE, fr-LU, it, nb, nl, nl-BE, pl, pt, tr, en, da. Default: 'en'.
Request body
Example request
{
"data": {
"type": "voucher",
"attributes": {
"locale": "cs"
},
"relationships": {
"payments": {
"data": [
{
"type": "payment"
}
]
}
}
},
"included": [
{
"id": "1",
"type": "payment",
"relationships": {
"payment_method": {
"data": {
"type": "payment_method"
}
},
"booking": {
"data": {
"type": "booking"
}
},
"invoice": {
"data": {
"type": "invoice"
}
},
"register": {
"data": {
"type": "register"
}
},
"administration": {
"data": {
"type": "administration"
}
},
"receipt": {
"data": {
"type": "receipt"
}
},
"settled_with": {
"data": {
"type": "payment"
}
}
}
}
]
}Response
VoucherResponse
Example response
{
"data": {
"id": "1",
"type": "voucher",
"attributes": {
"locale": "cs",
"masked_code": "********1234"
},
"relationships": {
"payments": {
"data": [
{
"type": "payment"
}
]
}
}
},
"included": [
{
"id": "1",
"type": "payment",
"relationships": {
"payment_method": {
"data": {
"type": "payment_method"
}
},
"booking": {
"data": {
"type": "booking"
}
},
"invoice": {
"data": {
"type": "invoice"
}
},
"register": {
"data": {
"type": "register"
}
},
"administration": {
"data": {
"type": "administration"
}
},
"receipt": {
"data": {
"type": "receipt"
}
},
"settled_with": {
"data": {
"type": "payment"
}
}
}
}
]
}Changes
- warning
added the new
da-DKenum value to the//response property for the response status - warning
added the new
en-GBenum value to the//response property for the response status - warning
added the new
en-USenum value to the//response property for the response status - info
added the new
da-DKenum value to the request property// - info
added the new
en-GBenum value to the request property// - info
added the new
en-USenum value to the request property//
- warning