Tutorial: Import and Update Products
Before you can sell, count, or fulfill anything, the product has to exist in your catalog. This tutorial covers getting products in and keeping them current: create, look up by SKU, and update. You'll need a token with products:read and products:write.
1. Create a product
Create one with POST /api/products. At minimum a product needs a sku and a name:
curl -X POST "https://acme.sku.io/api/products" \
-H "Authorization: Bearer $SKU_TOKEN" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{
"sku": "WDG-003",
"name": "Green Widget",
"type": "standard",
"unit_cost": 4.75,
"barcode": "0123456789013"
}'
The response returns the created product with its assigned id. For a large catalog, loop this call — or use the dedicated bulk Product Import endpoints, which take a file and process asynchronously.
sku is your natural key. Before creating, check whether the SKU already exists (step 2) so a re-run of your importer updates instead of erroring on a duplicate.
2. Look up by SKU
To resolve a SKU to a product (and its id) without knowing the id, use GET /api/products/by-sku:
curl "https://acme.sku.io/api/products/by-sku?sku=WDG-003" \
-H "Authorization: Bearer $SKU_TOKEN" \
-H "Accept: application/json"
A 404 means the SKU isn't in the catalog yet — create it. A 200 returns the product, including its id for the next step.
3. Update a product
Change a product with PUT /api/products/{id}, using the id from step 1 or 2:
curl -X PUT "https://acme.sku.io/api/products/501" \
-H "Authorization: Bearer $SKU_TOKEN" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{
"name": "Green Widget (v2)",
"unit_cost": 5.10
}'
Send only the fields you're changing. The full editable field set is on the Update Product reference.
4. List and verify
Confirm the catalog with GET /api/v2/products — a paginated, filterable, sortable list:
curl "https://acme.sku.io/api/v2/products?filter[search]=widget&sort=sku&per_page=25" \
-H "Authorization: Bearer $SKU_TOKEN" \
-H "Accept: application/json"
See Filtering & Sorting for the available filter keys and Pagination for walking the full list.
Where to next
- Sync Inventory Levels — set on-hand quantities once products exist
- Create & Fulfill an Order — sell what you just imported
- Products reference — variations, images, pricing, and bulk import