Offers
Batch Create Offers
Create up to 100 offers in a single request.
POST
/
vendor
/
offers
/
batch
curl -X POST 'http://localhost:9000/vendor/offers/batch' \
-H 'Authorization: Bearer <token>' \
-H 'x-seller-id: <seller_id>' \
-H 'Content-Type: application/json' \
-d '{
"offers": [
{
"sku": "ACME-SHIRT-S",
"variant_id": "variant_01HABC",
"shipping_profile_id": "sp_01HXYZ",
"prices": [{ "amount": 2500, "currency_code": "usd" }],
"inventory_items": [{ "required_quantity": 1 }]
},
{
"sku": "ACME-SHIRT-M",
"variant_id": "variant_01HXYZ",
"shipping_profile_id": "sp_01HXYZ",
"prices": [{ "amount": 2500, "currency_code": "usd" }],
"inventory_items": [{ "required_quantity": 1 }]
}
]
}'
const { offers } = await client.vendor.offers.batch.mutate({
offers: [
{
sku: "ACME-SHIRT-M",
variant_id: "variant_01HXYZ",
shipping_profile_id: "sp_01HXYZ",
prices: [{ amount: 2500, currency_code: "usd" }],
inventory_items: [{ required_quantity: 1 }],
},
],
})
{
"offers": [
{
"id": "offer_01HABC",
"variant_id": "variant_01HABC",
"sku": "ACME-SHIRT-S"
},
{
"id": "offer_01HXYZ",
"variant_id": "variant_01HXYZ",
"sku": "ACME-SHIRT-M"
}
]
}
Creates multiple offers at once; the whole batch is validated and processed together.
Query parameters
Comma-separated fields to include in the returned offers. Prefix with
+/- to add to or remove from the defaults.Body parameters
Between 1 and 100 offers to create.
Show properties
Show properties
At least one inventory item.
Whether stock is tracked for the offer. Set to
false to sell without inventory checks.Response
curl -X POST 'http://localhost:9000/vendor/offers/batch' \
-H 'Authorization: Bearer <token>' \
-H 'x-seller-id: <seller_id>' \
-H 'Content-Type: application/json' \
-d '{
"offers": [
{
"sku": "ACME-SHIRT-S",
"variant_id": "variant_01HABC",
"shipping_profile_id": "sp_01HXYZ",
"prices": [{ "amount": 2500, "currency_code": "usd" }],
"inventory_items": [{ "required_quantity": 1 }]
},
{
"sku": "ACME-SHIRT-M",
"variant_id": "variant_01HXYZ",
"shipping_profile_id": "sp_01HXYZ",
"prices": [{ "amount": 2500, "currency_code": "usd" }],
"inventory_items": [{ "required_quantity": 1 }]
}
]
}'
const { offers } = await client.vendor.offers.batch.mutate({
offers: [
{
sku: "ACME-SHIRT-M",
variant_id: "variant_01HXYZ",
shipping_profile_id: "sp_01HXYZ",
prices: [{ amount: 2500, currency_code: "usd" }],
inventory_items: [{ required_quantity: 1 }],
},
],
})
{
"offers": [
{
"id": "offer_01HABC",
"variant_id": "variant_01HABC",
"sku": "ACME-SHIRT-S"
},
{
"id": "offer_01HXYZ",
"variant_id": "variant_01HXYZ",
"sku": "ACME-SHIRT-M"
}
]
}
⌘I
curl -X POST 'http://localhost:9000/vendor/offers/batch' \
-H 'Authorization: Bearer <token>' \
-H 'x-seller-id: <seller_id>' \
-H 'Content-Type: application/json' \
-d '{
"offers": [
{
"sku": "ACME-SHIRT-S",
"variant_id": "variant_01HABC",
"shipping_profile_id": "sp_01HXYZ",
"prices": [{ "amount": 2500, "currency_code": "usd" }],
"inventory_items": [{ "required_quantity": 1 }]
},
{
"sku": "ACME-SHIRT-M",
"variant_id": "variant_01HXYZ",
"shipping_profile_id": "sp_01HXYZ",
"prices": [{ "amount": 2500, "currency_code": "usd" }],
"inventory_items": [{ "required_quantity": 1 }]
}
]
}'
const { offers } = await client.vendor.offers.batch.mutate({
offers: [
{
sku: "ACME-SHIRT-M",
variant_id: "variant_01HXYZ",
shipping_profile_id: "sp_01HXYZ",
prices: [{ amount: 2500, currency_code: "usd" }],
inventory_items: [{ required_quantity: 1 }],
},
],
})
{
"offers": [
{
"id": "offer_01HABC",
"variant_id": "variant_01HABC",
"sku": "ACME-SHIRT-S"
},
{
"id": "offer_01HXYZ",
"variant_id": "variant_01HXYZ",
"sku": "ACME-SHIRT-M"
}
]
}