> ## Documentation Index
> Fetch the complete documentation index at: https://docs.mercurjs.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Create Offer

> Create a listing for a product variant.

Creates the seller's offer for a variant: the seller's SKU, shipping profile, prices, and backing inventory.

> [!NOTE]
>
> A product can be listed by many sellers; the offer is what carries the seller's own price and stock for a variant.

## Query parameters

**fields** `string`

Comma-separated fields to include in the returned offer. Prefix with `+`/`-` to add to or remove from the defaults.

## Body parameters

**sku** `string` *required*

The seller's SKU for this listing.

**variant\_id** `string` *required*

ID of the product variant being listed.

**shipping\_profile\_id** `string` *required*

ID of the seller's shipping profile used to fulfill the offer.

**inventory\_items** `object[]` *required*

Inventory items backing the offer; at least one is required.

**properties**

**title** `string`

Title for the created inventory item.

**sku** `string`

SKU for the created inventory item.

**required\_quantity** `number` (default: 1)

Units of the item consumed per sale; positive integer.

**stock\_levels** `object[]`

**properties**

**location\_id** `string` *required*

Stock location ID.

**stocked\_quantity** `number` *required*

Stocked quantity at the location; non-negative integer.

**prices** `object[]` *required*

Offer prices; at least one is required.

**properties**

**amount** `number` *required*

Price amount.

**currency\_code** `string` *required*

Currency code, e.g. `usd`.

**min\_quantity** `number`

Minimum quantity for the price to apply; positive integer.

**max\_quantity** `number`

Maximum quantity for the price to apply; positive integer.

**rules** `object`

Price rules as attribute-to-value pairs, e.g. `{"region_id": "reg_01..."}`.

**ean** `string`

EAN barcode.

**upc** `string`

UPC barcode.

**manage\_inventory** `boolean` (default: true)

Whether stock is tracked for the offer. Set to `false` to sell without inventory checks.

**allow\_backorder** `boolean` (default: false)

Whether the offer can be purchased when it is out of stock.

**metadata** `object`

Custom key-value pairs.

## Response

**offer** `object`

**properties**

**id** `string`

The offer's ID.

**seller\_id** `string`

ID of the owning seller.

**variant\_id** `string`

ID of the listed product variant.

**product\_id** `string`

ID of the parent product.

**shipping\_profile\_id** `string`

ID of the shipping profile.

**sku** `string`

The seller's SKU for this listing.

**manage\_inventory** `boolean`

Whether stock is tracked for the offer.

**allow\_backorder** `boolean`

Whether the offer can be purchased when it is out of stock.

**prices** `object[]`

Offer prices with `id`, `amount`, `currency_code`, `min_quantity`, `max_quantity`, and `price_rules`.

**inventory\_items** `object[]`

Linked inventory items with `id`, `inventory_item_id`, `required_quantity`, and `sku`.

```bash cURL theme={null}
curl -X POST 'http://localhost:9000/vendor/offers' \
  -H 'Authorization: Bearer <token>' \
  -H 'x-seller-id: <seller_id>' \
  -H 'Content-Type: application/json' \
  -d '{
    "sku": "ACME-SHIRT-M",
    "variant_id": "variant_01HXYZ",
    "shipping_profile_id": "sp_01HXYZ",
    "prices": [{ "amount": 2500, "currency_code": "usd" }],
    "inventory_items": [
      {
        "required_quantity": 1,
        "stock_levels": [{ "location_id": "sloc_01HXYZ", "stocked_quantity": 100 }]
      }
    ]
  }'
```

```ts JS Client theme={null}
const { offer } = await client.vendor.offers.mutate({
  sku: "ACME-SHIRT-M",
  variant_id: "variant_01HXYZ",
  shipping_profile_id: "sp_01HXYZ",
  prices: [{ amount: 2500, currency_code: "usd" }],
  inventory_items: [
    {
      required_quantity: 1,
      stock_levels: [{ location_id: "sloc_01HXYZ", stocked_quantity: 100 }],
    },
  ],
})
```

```json 201 theme={null}
{
  "offer": {
    "id": "offer_01HXYZ",
    "seller_id": "sel_01HXYZ",
    "variant_id": "variant_01HXYZ",
    "product_id": "prod_01HXYZ",
    "shipping_profile_id": "sp_01HXYZ",
    "sku": "ACME-SHIRT-M",
    "manage_inventory": true,
    "allow_backorder": false,
    "prices": [
      { "id": "price_01HXYZ", "amount": 2500, "currency_code": "usd" }
    ],
    "inventory_items": [
      { "inventory_item_id": "iitem_01HXYZ", "required_quantity": 1 }
    ]
  }
}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.