🚧 Historical orders
This endpoint should only be used to import historical orders into Voucherify. For on-going synchronization, the update order endpoint should be used. This is critical because this endpoint does not store events or launch distributions. The orders will also have a
created_atdate that’s assigned when they’ve been imported to Voucherify. To keep track of the actual order creation date, add an order metadata in ISO 8601 date or date time format to each imported order.
There can be only a single on-going order import per tenant per project at a given time. The user can schedule more imports but those extra imports will be scheduled to run in sequence one by one.
There is a 2000 limit of orders per one request.
There are no notifications on the Dashboard because this import is launched via the API.
If you import orders with customers, then a logic will be scheduled responsible for placing these customers into segments and refreshing the segment’s summary. Consequently, this update will trigger
No webhooks are triggered during the import of orders - for both orders and upserted products / SKUs.
Distributions based on Order Update, Order Paid, Order Created and Order Cancelled. In other words if you have a distribution based on Order Paid and you import an order with a PAID status, the distribution is not going to be triggered.
No events are created during the import of orders - for both orders and upserted products / SKUs. In other words you won’t see any events in the Activity tab in the Dashboard such as Order created or Order paid. If you are additionally upserting products / SKUs, then you won’t see the Product created events listed, etc.
Earning rules based on Order Paid won’t be triggered.
This API request starts a process that affects Voucherify data in bulk.
In case of small jobs (like bulk update) the request is put into a queue and processed once every other bulk request placed in the queue prior to this request is finished. However, when the job takes a longer time (like vouchers generation) then it is processed in small portions in a round-robin fashion. When there is a list of vouchers generation scheduled, then they will all have the IN_PROGRESS status shortly. This way, small jobs added just after scheduling big jobs of the same type will be processed in a short time window.
The result will return the async ID. You can verify the status of your request with GET Async Action endpoint.
The access token received from the authorization server in the OAuth 2.0 flow.
The request body is sent in the form of an array of order objects.
Unique ID assigned by Voucherify of an existing order that will be linked to the redemption of this request.
Unique source ID of an existing order that will be linked to the redemption of this request.
The order status.
CREATED, PAID, CANCELED, FULFILLED A positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the total amount of the order. This is the sum of the order items' amounts.
A positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the total amount of the order. This is the sum of the order items' amounts.
Sum of all order-level discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).
Array of items applied to the order. It can include up to 500 items.
A set of custom key/value pairs that you can attach to an order. It can be useful for storing additional information about the order in a structured format. It can be used to define business validation rules or discount formulas.
Unique referrer ID.
"cust_nM4jqPiaXUvQdVSA6vTRUnix"
Returns the ID of the scheduled asynchronous action, informing you that your request has been accepted and the order(s) will be added to the repository asynchronously. To check the status and result, copy the async_action_id from the response and pass it using Get Async Action endpoint.
Response body schema for POST v1/orders/import.
Response to requests that are processed asynchronously.
The ID of the scheduled asynchronous action.
"aa_0a875d56c805df6601"