Manage Shopify stores — products, orders, customers, inventory, and fulfillments via the Admin REST API.
Manage products, orders, customers, and inventory via the Shopify Admin API.
SHOPIFY_STORE_URL - Store URL (e.g. https://my-store.myshopify.com)SHOPIFY_ACCESS_TOKEN - Admin API access tokencurl -s -H "X-Shopify-Access-Token: $SHOPIFY_ACCESS_TOKEN" \
"$SHOPIFY_STORE_URL/admin/api/2024-01/products.json?limit=10" | jq '.products[] | {id, title, status, variants: [.variants[] | {id, price, inventory_quantity}]}'
curl -s -H "X-Shopify-Access-Token: $SHOPIFY_ACCESS_TOKEN" \
"$SHOPIFY_STORE_URL/admin/api/2024-01/products/PRODUCT_ID.json" | jq '.product | {id, title, body_html, vendor, product_type, tags}'
curl -s -X POST -H "X-Shopify-Access-Token: $SHOPIFY_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
"$SHOPIFY_STORE_URL/admin/api/2024-01/products.json" \
-d '{"product":{"title":"New Product","body_html":"<p>Description</p>","vendor":"My Store","variants":[{"price":"29.99","sku":"WIDGET-001"}]}}' | jq '.product | {id, title}'
curl -s -H "X-Shopify-Access-Token: $SHOPIFY_ACCESS_TOKEN" \
"$SHOPIFY_STORE_URL/admin/api/2024-01/orders.json?status=any&limit=10" | jq '.orders[] | {id, order_number, financial_status, fulfillment_status, total_price, customer: .customer.email}'
curl -s -H "X-Shopify-Access-Token: $SHOPIFY_ACCESS_TOKEN" \
"$SHOPIFY_STORE_URL/admin/api/2024-01/customers.json?limit=10" | jq '.customers[] | {id, email, first_name, last_name, orders_count, total_spent}'
curl -s -X POST -H "X-Shopify-Access-Token: $SHOPIFY_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
"$SHOPIFY_STORE_URL/admin/api/2024-01/inventory_levels/set.json" \
-d '{"location_id":LOCATION_ID,"inventory_item_id":ITEM_ID,"available":100}' | jq '.'
2024-01 used; update as needed.