Import voucher codes from Excel/CSV
Token credential sent in the Authorization header, in the form: Token <your-token>. Requires a staff (admin) account.
The payload of a spreadsheet import request.
Identifier of the target basket offer. The offer must be of type bulk_voucher_code.
Base64-encoded Excel or CSV file with exactly the column headers voucher_code and user_email.
The import job was queued.
The status envelope of an asynchronous Excel/CSV import.
The job key used to poll the import status.
Whether the import has finished.
A human-readable error message when the import failed or was not found.
The request contains invalid or missing data.
Authentication credentials were not provided or are invalid.
The authenticated user does not have administrator privileges.
POST /api/remote/1/bulk_voucher_codes/excel_import/ HTTP/1.1
Host: sandbox.akinon.com
Authorization: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 32
{
"basket_offer": 1,
"file": "text"
}{
"cache_key": "123e4567-e89b-12d3-a456-426614174000",
"is_ready": true,
"result": {
"assigned_count": 1,
"errors": [
{
"voucher_code": "text",
"user_email": "text",
"error": "text"
}
],
"summary": {
"total_rows": 1,
"successful": 1,
"failed": 1
}
},
"error_message": null
}Last updated
Was this helpful?

