> For the complete documentation index, see [llms.txt](https://docs.globo.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.globo.io/pre-order/app-api/rest-api/pre-order/post-create-offer.md).

# \[POST] Create offer

### \* Authentication&#x20;

<mark style="color:red;">Required</mark> `Authorization Bearer •••••••••••`

Limit  `throttle:30,1`

Endpoint <mark style="background-color:green;">\[POST]</mark> - `/shop-api/pre-order/create`

### Headers

<table><thead><tr><th width="216.11328125">Header</th><th width="110.125">Required</th><th>Description</th></tr></thead><tbody><tr><td><code>Authorization</code></td><td>Yes</td><td>Shop public API key <code>Bearer token</code></td></tr><tr><td><code>Content-Type</code></td><td>Yes</td><td><code>application/json</code></td></tr></tbody></table>

### 1. Request Payload

#### Required fields

<table><thead><tr><th width="269.76953125">Field</th><th>Type</th><th>Required</th><th>Description</th></tr></thead><tbody><tr><td><code>offer_name</code></td><td>string</td><td>Yes</td><td>Offer name (max 255 characters)</td></tr><tr><td><code>start_date</code></td><td>date</td><td>Yes</td><td>Pre-order start date/time</td></tr><tr><td><code>apply_to</code></td><td>string</td><td>Yes</td><td>Target scope: <code>product</code>, <code>collection</code>, or <code>all</code></td></tr><tr><td><code>products</code></td><td>array</td><td><code>apply_to = product</code></td><td>min:1 | max:50 item</td></tr><tr><td><code>products.*.product_id</code></td><td>number</td><td>with <code>products</code></td><td>Shopify product ID</td></tr><tr><td><code>products.*.variant_id</code></td><td>number</td><td>with <code>products</code></td><td>Shopify variant ID</td></tr><tr><td><code>products.*.limit</code></td><td>number | null</td><td>No</td><td>min:1</td></tr><tr><td><code>collection_id</code></td><td>number</td><td><code>apply_to = collection</code></td><td>Shopify collection ID</td></tr><tr><td></td><td></td><td></td><td></td></tr></tbody></table>

#### Optional fields

<table><thead><tr><th width="271.03515625">Field</th><th width="136.53125">Type</th><th width="121.0625">Default / Notes</th><th>Description</th></tr></thead><tbody><tr><td><code>end_date</code></td><td>date | null</td><td>—</td><td>Must be after <code>start_date</code> if provided</td></tr><tr><td><code>countdown_before_preorder_start</code></td><td>boolean</td><td><code>false</code></td><td>Show countdown before start</td></tr><tr><td><code>countdown_before_preorder_end</code></td><td>boolean</td><td><code>false</code></td><td>Show countdown before end</td></tr><tr><td><code>preorder_condition_inventory</code></td><td>string</td><td><code>now</code></td><td>Inventory trigger: <code>now</code>, <code>outofstock</code>, <code>instock</code></td></tr><tr><td><code>fulfillment_status</code></td><td>string</td><td>—</td><td><code>ON_HOLD</code>, <code>UNFULFILLMENT</code>, <code>SCHEDULED</code></td></tr><tr><td><code>fulfillment_shipping_date</code></td><td>date</td><td>—</td><td>Exact shipping/fulfillment date</td></tr><tr><td><code>fulfillment_after_checkout</code></td><td>number</td><td>—</td><td>Days after checkout (max <code>60</code>)</td></tr><tr><td><code>turn_on_continue_selling_when_preorder_start</code></td><td>boolean</td><td><code>false</code></td><td>Auto-enable continue selling when offer starts</td></tr><tr><td><code>turn_off_continue_selling_when_preorder_end</code></td><td>boolean</td><td><code>false</code></td><td>Auto-disable continue selling when offer ends</td></tr><tr><td><code>full_payment_discount_type</code></td><td>string</td><td><code>percentage</code></td><td><code>percentage</code> or <code>fixed</code></td></tr><tr><td><code>full_payment_discount_value</code></td><td>number</td><td><code>0</code></td><td>Required with type; max <code>100</code> (percentage) or <code>1000000</code> (fixed); min <code>1</code> when sent</td></tr><tr><td><code>partial_payment_value</code></td><td>number</td><td>—</td><td>Deposit/partial amount; enables partial payment when <code>> 0</code></td></tr><tr><td><code>partial_payment_type</code></td><td>string</td><td>—</td><td>Create validation field: <code>percentage</code> or <code>fixed</code> (see note below)</td></tr><tr><td><code>partial_payment_value_type</code></td><td>string</td><td><code>percentage</code></td><td>Used when mapping to selling plan / response shape</td></tr><tr><td><code>partial_payment_discount_type</code></td><td>string</td><td><code>percentage</code></td><td><code>percentage</code> or <code>fixed</code></td></tr><tr><td><code>partial_payment_discount_value</code></td><td>number</td><td><code>0</code></td><td>Discount on partial payment</td></tr><tr><td><code>partial_payment_remaining_balance_charge_date</code></td><td>date</td><td>—</td><td>Remaining balance charge date (exact time)</td></tr></tbody></table>

#### Important rules

1. `apply_to`
   * `product` → send `products` (1–50 items). Variants are validated against Shopify; only found variants are kept.
   * `collection` → send `collection_id` (must exist).
   * `all` → no `products` / `collection_id`.
2. Fulfillment timing is mutually exclusive:
   * If `fulfillment_shipping_date` is set → exact-date fulfillment.
   * Else if `fulfillment_after_checkout` is set → days-after-checkout fulfillment.
3. Partial payment is enabled when any partial-payment field is present and `partial_payment_value > 0`.
4. New offers are created with `status = 1` (active). Product sync / selling-plan setup may run asynchronously (`processing`).

> Field name note: Create validation currently uses `partial_payment_type`, while list/get/update and internal mapping use `partial_payment_value_type`. Prefer aligning with `partial_payment_value_type` for consistency with other endpoints.

#### Example — apply to products

```json
{
    "status": 1, // 1 is active, 0 is draft
    "offer_name": "Summer Pre-order",
    "start_date": "2026-08-01 00:00:00",
    "end_date": "2026-09-30 23:59:59",
    "countdown_before_preorder_start": true,
    "countdown_before_preorder_end": false,
    "apply_to": "product",
    "products": [
        {"product_id": 7890123456789,"variant_id": 4567890123456,"limit": 100}
    ],
    "preorder_condition_inventory": "outofstock",
    "fulfillment_status": "ON_HOLD",
    "fulfillment_shipping_date": "2026-10-15",
    "turn_on_continue_selling_when_preorder_start": true,
    "turn_off_continue_selling_when_preorder_end": true,
    "full_payment_discount_type": "percentage",
    "full_payment_discount_value": 10,
    "partial_payment_value": 30,
    "partial_payment_value_type": "percentage",
    "partial_payment_discount_type": "percentage",
    "partial_payment_discount_value": 5,
    "partial_payment_remaining_balance_charge_date": "2026-10-01"
}
```

#### Example — apply to collection

```json
{
    "offer_name": "Collection Pre-order",
    "start_date": "2026-08-01",
    "apply_to": "collection",
    "collection_id": 123456789,
    "preorder_condition_inventory": "now"
}
```

#### Example — apply to all products

```json
{"offer_name": "Storewide Pre-order","start_date": "2026-08-01","apply_to": "all"}
```

### 2. Success Response `200`

```json
{
"success": true,
"message": "Pre-order offer created",
"data": 
    {
    "id": 123,
    "offer_name": "Summer Pre-order",
    "start_date": "2026-08-01 00:00:00",
    "end_date": "2026-09-30 23:59:59",
    "countdown_before_preorder_start": true,
    "countdown_before_preorder_end": false,
    "apply_to": "product",
    "preorder_condition_inventory": "outofstock",
    "fulfillment_status": "ON_HOLD",
    "fulfillment_shipping_date": "2026-10-15",
    "turn_on_continue_selling_when_preorder_start": true,
    "turn_off_continue_selling_when_preorder_end": true,
    "status": 1,
    "products": [
        {
            "product_id": 7890123456789,
            "variant_id": 4567890123456,
            "limit": 100
        }
    ],
    "full_payment_discount_type": "percentage",
    "full_payment_discount_value": 10,
    "partial_payment_value": 30,
    "partial_payment_value_type": "percentage",
    "partial_payment_discount_value": 5,
    "partial_payment_discount_type": "percentage",
    "partial_payment_remaining_balance_charge_date": "2026-10-01"
    }
}
```

***

### 3. Response Keys & Fields

#### Top-level

| Key       | Type    | Description                                         |
| --------- | ------- | --------------------------------------------------- |
| `success` | boolean | `true` when the offer is created                    |
| `message` | string  | `"Pre-order offer created"`                         |
| `data`    | object  | Created offer (same shape as Get Offer / List item) |

#### `data` offer object

| Field                                          | Type           | Description                                 |
| ---------------------------------------------- | -------------- | ------------------------------------------- |
| `id`                                           | integer        | Newly created offer ID                      |
| `offer_name`                                   | string         | Offer name                                  |
| `start_date`                                   | string \| null | Start datetime                              |
| `end_date`                                     | string \| null | End datetime; `null` if not set             |
| `countdown_before_preorder_start`              | boolean        | Countdown before start                      |
| `countdown_before_preorder_end`                | boolean        | Countdown before end                        |
| `apply_to`                                     | string         | `product` \| `collection` \| `all`          |
| `preorder_condition_inventory`                 | string         | `now` \| `outofstock` \| `instock`          |
| `fulfillment_status`                           | string \| null | `ON_HOLD` \| `UNFULFILLMENT` \| `SCHEDULED` |
| `fulfillment_shipping_date`                    | string         | Present when exact-date fulfillment is used |
| `fulfillment_after_checkout`                   | number         | Present when days-after-checkout is used    |
| `turn_on_continue_selling_when_preorder_start` | boolean        | Auto continue-selling on start              |
| `turn_off_continue_selling_when_preorder_end`  | boolean        | Auto turn-off continue-selling on end       |
| `status`                                       | integer        | `1` (active) for newly created offers       |
| `products`                                     | array          | Only when `apply_to = product`              |
| `collection_id`                                | integer        | Only when `apply_to = collection`           |
| `collection_name`                              | string         | Collection title (when available)           |
| `full_payment_discount_type`                   | string         | Full payment discount type                  |
| `full_payment_discount_value`                  | number         | Full payment discount value                 |
| `partial_payment_*`                            | mixed          | Present when partial payment is enabled     |

#### `products[]` item

| Field        | Type            | Description          |
| ------------ | --------------- | -------------------- |
| `product_id` | integer         | Shopify product ID   |
| `variant_id` | integer         | Shopify variant ID   |
| `limit`      | integer \| null | Pre-order unit limit |

### 4. Failed Response

Validation error — HTTP `200`

```json
{
    "success": false,
    "message": {
        "offer_name": ["The offer name field is required."],
        "apply_to": ["The selected apply to is invalid."],
        "end_date": ["The end date must be a date after start date."]
    }
}
```

| Condition                                         | Response                                                        |
| ------------------------------------------------- | --------------------------------------------------------------- |
| `apply_to = product` but products empty           | `{ "success": false, "message": "Products are required" }`      |
| No variants exist on Shopify                      | `{ "success": false, "message": "Product variants not found" }` |
| `apply_to = collection` but `collection_id` empty | `{ "success": false, "message": "Collection is required" }`     |
| Collection not found on Shopify                   | `{ "success": false, "message": "Collection not found" }`       |

Unexpected server error — HTTP `200`

```json
{"success": false,"message": "Pre-order offer not created"}
```
