Skip to main content
POST
Create a voucher upload

Authorizations

Authorization
string
header
required

Partner API key: Authorization: Bearer vk_live_…. Use vk_test_… keys against the sandbox. See Authentication.

Headers

Idempotency-Key
string

Optional on every POST: 1-255 printable ASCII characters without spaces (a UUID is recommended). The same key with the same request replays the stored response for 24 hours. See Idempotency.

Required string length: 1 - 255
Pattern: ^[\x21-\x7E]{1,255}$

Path Parameters

voucherSetId
integer<uint64>
required

Numeric id (voucherSetId). A non-numeric id is a 400 data-failed-validation; an unknown id or one of another partner is a 404. Unsigned 64-bit integer. May exceed 2^53; parse with a BigInt-safe JSON parser in JavaScript.

Required range: 0 <= x <= 18446744073709552000

Body

application/json

Create an upload and get a signed upload URL.

fileName
string
required

1-255 characters; metadata only.

Maximum string length: 255
format
enum<string>
required

File format. Treat as an open set: new values may be added.

Available options:
csv,
xlsx
sizeBytes
integer
required

1-104,857,600.

Required range: 1 <= x <= 104857600
sha256
string
required

Lower-case hex SHA-256 of the file.

Pattern: ^[0-9a-f]{64}$
defaults
object

Values for fields an item or row leaves empty.

Response

Success.

Single-object envelope around VoucherUpload.

data
object
required

An asynchronous CSV or XLSX import (job resource).