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
string
Comma-separated fields to include in the returned offers. Prefix with
+/- to add to or remove from the defaults.Body parameters
object[]
required
Between 1 and 100 offers to create.
Show properties
Show properties
string
required
The seller’s SKU for the listing.
string
required
ID of the product variant being listed.
string
required
ID of the shipping profile used to fulfill the offer.
object[]
required
object[]
required
At least one inventory item.
string
EAN barcode.
string
UPC barcode.
boolean
default:"true"
Whether stock is tracked for the offer. Set to
false to sell without inventory checks.boolean
default:"false"
Whether the offer can be purchased when it is out of stock.
object
Custom key-value pairs.
Response
object[]
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"
}
]
}