Offers
Retrieve Offer
Retrieve an offer by ID.
GET
/
admin
/
offers
/
{id}
curl 'http://localhost:9000/admin/offers/offer_01HXYZ8Q2M4N6P8R0T2V4W6X8Y' \
-H 'Authorization: Bearer <token>'
const { offer } = await client.admin.offers.$id.query({
$id: "offer_01HXYZ8Q2M4N6P8R0T2V4W6X8Y",
})
{
"offer": {
"id": "offer_01HXYZ8Q2M4N6P8R0T2V4W6X8Y",
"seller_id": "sel_01HXYZ",
"variant_id": "variant_01HXYZ",
"product_id": "prod_01HXYZ",
"shipping_profile_id": "sp_01HXYZ",
"sku": "SHIRT-M-BLUE",
"ean": null,
"upc": null,
"created_by": "user_01HXYZ",
"variant_count": 3,
"metadata": null,
"seller": { "id": "sel_01HXYZ", "name": "Acme Store", "handle": "acme-store" },
"product_variant": { "id": "variant_01HXYZ", "title": "M / Blue", "sku": "SHIRT-M-BLUE" },
"shipping_profile": { "id": "sp_01HXYZ", "name": "Default" },
"prices": [
{ "id": "price_01HXYZ", "amount": 2500, "currency_code": "usd", "min_quantity": null, "max_quantity": null }
],
"inventory_items": [
{ "id": "iitem_01HXYZ", "inventory_item_id": "iitem_01HXYZ", "required_quantity": 1, "sku": "SHIRT-M-BLUE" }
]
}
}
Returns a single offer with its seller, variant, shipping profile, prices, and inventory items.
Path parameters
Query parameters
Response
Show properties
Show properties
Offer prices, each with
id, amount, currency_code, min_quantity, max_quantity, and price_rules.curl 'http://localhost:9000/admin/offers/offer_01HXYZ8Q2M4N6P8R0T2V4W6X8Y' \
-H 'Authorization: Bearer <token>'
const { offer } = await client.admin.offers.$id.query({
$id: "offer_01HXYZ8Q2M4N6P8R0T2V4W6X8Y",
})
{
"offer": {
"id": "offer_01HXYZ8Q2M4N6P8R0T2V4W6X8Y",
"seller_id": "sel_01HXYZ",
"variant_id": "variant_01HXYZ",
"product_id": "prod_01HXYZ",
"shipping_profile_id": "sp_01HXYZ",
"sku": "SHIRT-M-BLUE",
"ean": null,
"upc": null,
"created_by": "user_01HXYZ",
"variant_count": 3,
"metadata": null,
"seller": { "id": "sel_01HXYZ", "name": "Acme Store", "handle": "acme-store" },
"product_variant": { "id": "variant_01HXYZ", "title": "M / Blue", "sku": "SHIRT-M-BLUE" },
"shipping_profile": { "id": "sp_01HXYZ", "name": "Default" },
"prices": [
{ "id": "price_01HXYZ", "amount": 2500, "currency_code": "usd", "min_quantity": null, "max_quantity": null }
],
"inventory_items": [
{ "id": "iitem_01HXYZ", "inventory_item_id": "iitem_01HXYZ", "required_quantity": 1, "sku": "SHIRT-M-BLUE" }
]
}
}
⌘I
curl 'http://localhost:9000/admin/offers/offer_01HXYZ8Q2M4N6P8R0T2V4W6X8Y' \
-H 'Authorization: Bearer <token>'
const { offer } = await client.admin.offers.$id.query({
$id: "offer_01HXYZ8Q2M4N6P8R0T2V4W6X8Y",
})
{
"offer": {
"id": "offer_01HXYZ8Q2M4N6P8R0T2V4W6X8Y",
"seller_id": "sel_01HXYZ",
"variant_id": "variant_01HXYZ",
"product_id": "prod_01HXYZ",
"shipping_profile_id": "sp_01HXYZ",
"sku": "SHIRT-M-BLUE",
"ean": null,
"upc": null,
"created_by": "user_01HXYZ",
"variant_count": 3,
"metadata": null,
"seller": { "id": "sel_01HXYZ", "name": "Acme Store", "handle": "acme-store" },
"product_variant": { "id": "variant_01HXYZ", "title": "M / Blue", "sku": "SHIRT-M-BLUE" },
"shipping_profile": { "id": "sp_01HXYZ", "name": "Default" },
"prices": [
{ "id": "price_01HXYZ", "amount": 2500, "currency_code": "usd", "min_quantity": null, "max_quantity": null }
],
"inventory_items": [
{ "id": "iitem_01HXYZ", "inventory_item_id": "iitem_01HXYZ", "required_quantity": 1, "sku": "SHIRT-M-BLUE" }
]
}
}