Historical order import API (v0)
Download OpenAPI specification:Download
Past orders which have already been fulfilled, outside or before implementation on NewStore are called Historical orders.
Following are the few APIs that can be used to import past orders while on-boarding tenants or setting up a new fulfillment location.
Import historical orders
Use this API to import complete
historical orders into NewStore.
This API can only be called 500 times in a minute and each request can handle not more than 250 orders.
Notes:
The imported historical orders are placed in a queue that is shared between all NewStore tenants and processed based on the timestamp when they entered the queue. Depending on the number of historical orders imported it can take some time to process the queue. The imported historical orders are processed from the queue with a rate of upto 250 orders per minute.
The product_ids inside
shipments
->items
are currently not validated against the catalog and the historical order import will work even if the product does not exist in the catalog. Please make sure to have your products imported before starting the import.When creating the customer profile, we will use the phone number that is stored inside the billing address. If this phone number does not have a country calling code, the platform will attempt to use the billing address country code to derive the calling code while formatting the phone number to the E.164 standard. If the phone number cannot be formatted, it will be placed in the extended attribute
injected-invalid-phone-number
on customer profile. It can be updated later, if needed.When creating a shipping or billing address for a customer profile, we will attempt to convert the provided phone number to E.164 format using the country code from the address. If the conversion fails, we will retain and use the original phone number as provided in the address. It can be updated later, if needed.
Any imported historical order is marked as
Complete
in NOM.
Authorizations:
Request Body schema: application/json
required | Array of objects <= 250 items | ||||||||||||||||||||||||||||||
Array (<= 250 items)
|
Responses
Request samples
- Payload
{- "orders": [
- {
- "external_id": "HISTORIC_ORDER_123",
- "placed_at": "2018-10-08T07:06:08.067Z",
- "channel_type": "mobile",
- "channel_name": "android app",
- "currency": "USD",
- "customer_email": "jw@example.com",
- "shop_locale": "en-US",
- "shop": "storefront-catalog-en",
- "shipping_address": {
- "first_name": "Jay",
- "last_name": "Doubleyou",
- "country": "US",
- "zip_code": "02111",
- "city": "Boston",
- "state": "Massachusetts",
- "address_line_1": "601 South Street",
- "address_line_2": "",
- "phone": "202-555-0140"
}, - "billing_address": {
- "first_name": "Jay",
- "last_name": "Doubleyou",
- "country": "US",
- "zip_code": "02111",
- "city": "Boston",
- "state": "Massachusetts",
- "address_line_1": "601 South Street",
- "phone": "202-555-0140"
}, - "payments": [
- {
- "instrument_id": "ch_1DIsE9GMCeo3G7b40EbEjfZX",
- "amount": 68.66,
- "method": "credit_card",
- "wallet": "apple_pay",
- "metadata": { },
- "processed_at": "2018-10-08T07:06:08.067Z",
- "adyen_merchant_account": "NewStorePOS",
- "card_details": {
- "brand": "visa",
- "last_four_digits": "1234"
}
}, - {
- "instrument_id": "asdgretesg3tgdfAASdasd",
- "amount": 126.11,
- "method": "gift_card",
- "processed_at": "2018-10-08T07:06:08.067Z"
}
], - "shipments": [
- {
- "items": [
- {
- "product_id": "1000011",
- "product_name": "Short sleeve T-Shirt blue",
- "status": "complete",
- "external_item_id": "GD-10000001",
- "price": {
- "item_price": 100.21,
- "item_list_price": 100.21,
- "item_tax_lines": [
- {
- "amount": 68.78,
- "rate": 0.0758,
- "name": "Custom Tax",
- "country_code": "DE"
}
]
}
}
], - "shipping_option": {
- "service_level_identifier": "GROUND",
- "shipping_type": "traditional_carrier",
- "fulfillment_node_id": "DC01",
- "shipping_carrier": "FedEx",
- "display_name": "In store handover",
- "price": 19,
- "tax": 6.78,
- "zip_code": "81379",
- "country_code": "DE"
}
}
], - "price_method": "tax_excluded"
}
]
}
Response samples
- 200
- 400
- 405
- 415
- 500
{- "status": "success"
}
Fetch historical order status
Use this API to fetch the status of an order that has been imported using the Import historical orders api.
Authorizations:
query Parameters
order_id | string The external id of the imported order |
Responses
Response samples
- 200
- 500
{- "status": "pending"
}