Update a bulk voucher code
Token credential sent in the Authorization header, in the form: Token <your-token>. Requires a staff (admin) account.
The unique identifier of the bulk voucher code.
The payload accepted when creating or updating a bulk voucher code.
The voucher code value. Must be unique across all bulk voucher codes.
Identifier of the parent basket offer.
The lifecycle status of a voucher code.
active— the code can be redeemed; new codes always start herepassive— the code is disabledused— the code has been redeemed and can no longer be updatedrevoked— the code has been withdrawn
Identifier of the user the code is assigned to, when any. A user can hold at most one code per basket offer.
The updated voucher code.
A bulk voucher code as returned by the API.
Unique voucher code identifier.
The voucher code value.
Identifier of the parent basket offer.
The lifecycle status of a voucher code.
active— the code can be redeemed; new codes always start herepassive— the code is disabledused— the code has been redeemed and can no longer be updatedrevoked— the code has been withdrawn
Identifier of the user the code is assigned to, when any.
Email address of the assigned user, when any.
The request contains invalid or missing data, or violates a business rule — for example a code that already exists (promotion_100_2), an attempt to update a used code (promotion_100_5), or a user who already holds a code for the offer (promotion_100_6).
Authentication credentials were not provided or are invalid.
The authenticated user does not have administrator privileges.
The requested bulk voucher code does not exist.
PUT /api/remote/1/bulk_voucher_codes/{id}/ HTTP/1.1
Host: sandbox.akinon.com
Authorization: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 62
{
"code": "text",
"basket_offer": 1,
"status": "active",
"user": null
}{
"pk": 1041,
"code": "KOTON9AB3FF76",
"basket_offer": 35763,
"status": "active",
"user": 20518,
"user_email": "customer@example.com"
}Last updated
Was this helpful?

