App reviews, troubleshooting, and recommendations
We are planning to import our historical order data into Shopify using the API via Postman. While our Product and Customer data have already been uploaded to Shopify through CSV, we’re unsure how to proceed with importing the historical orders we currently have.
Can anyone suggest how we can do this and in what format it supports?
Hi @SatishMantri,
To import your historical orders into Shopify via API using Postman, you'll need to work with the Orders API. Shopify doesn't allow direct CSV imports for orders (like it does for products and customers), so you’ll have to use the Shopify API to import these manually.
Here’s a step-by-step guide on how to approach this:
1. Prepare Your Data
Ensure that your historical orders are formatted correctly for Shopify. While Shopify doesn’t offer an official template for orders, the format for the data should align with the Shopify Order API schema. You should include necessary details like:
2. Use Shopify’s Orders API
You can use Shopify’s REST Admin API to create orders programmatically. Here's a basic flow:
Make a POST request to the /admin/api/2023-01/orders.json endpoint.
You’ll need to include the order details in the body of the request. For example:
{
"order": {
"line_items": [
{
"variant_id": 123456789,
"quantity": 1
}
],
"customer": {
"id": 123456
},
"billing_address": {
"first_name": "John",
"last_name": "Doe",
"address1": "123 Main Street",
"city": "Townsville",
"province": "ON",
"country": "CA"
},
"shipping_address": {
"address1": "123 Main Street",
"city": "Townsville",
"province": "ON",
"country": "CA"
},
"financial_status": "paid",
"fulfillment_status": "shipped"
}
}
You can then iterate through your historical order data and use Postman to send these API requests.
3. Handling Large Volumes of Orders
If you have many orders, it’s better to do the import in batches. Shopify’s API has rate limits, so you may need to implement a delay between requests to avoid exceeding the limits.
4. Test and Validate
Before doing the full import, test the process with a few sample orders to ensure the data is coming through as expected. Once everything looks good, you can proceed with the full import.
5. API Authentication
You’ll need a Shopify private app with the necessary API permissions to access the Orders API. Ensure that the API key and password (from the private app) are included in the headers for authentication in Postman.
I hope this helps you get started! Let me know if you need any more guidance.
Through this order API, can we include a date so that the order is created on that specific date during import, rather than it taking today's date?
Hey Community 👋 Did you know that March 15th is National Everything You Think Is W...
By JasonH Apr 1, 2025Discover how to increase the efficiency of commerce operations with Shopify Academy's l...
By Jacqui Mar 26, 2025Shopify and our financial partners regularly review and update verification requiremen...
By Jacqui Mar 14, 2025