> 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/coming-soon/post-create-rule.md).

# \[POST] Create rule

### \* Authentication&#x20;

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

Limit  `throttle:30,1`

### Request

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

Payload body

<table><thead><tr><th width="188.890625">Params</th><th width="231.94140625">Type</th><th>Required</th></tr></thead><tbody><tr><td><code>name</code></td><td>string</td><td><code>yes</code></td></tr><tr><td><code>status</code></td><td>int <code>0</code> <code>1</code></td><td><code>no</code></td></tr><tr><td><code>start_date</code></td><td>datetime</td><td><code>yes</code> eg. <code>2026-07-01T10:00:00.000000Z</code></td></tr><tr><td><code>end_date</code></td><td>datetime </td><td><code>no</code> </td></tr><tr><td><code>apply_to</code></td><td><code>"all"</code> | <code>"collection"</code> | <code>"product"</code> | <code>"variant"</code></td><td><code>yes</code></td></tr><tr><td><code>product_ids</code></td><td>array <code>[1,2,...]</code></td><td><code>yes</code> <code>min:1|max:50</code> (if apply_to = product)</td></tr><tr><td><code>variant_ids</code></td><td>array <code>[1,2,...]</code></td><td><code>yes</code> <code>min:1|max:50</code> (if apply_to = variant)</td></tr><tr><td><code>collection_id</code> </td><td>number <code>single collection</code></td><td><code>yes</code>  (if apply_to = collection)</td></tr><tr><td><code>translations</code></td><td>object</td><td><code>no</code></td></tr><tr><td><code>show_countdown</code></td><td>boolean <code>true</code> <code>false</code></td><td><code>no</code></td></tr></tbody></table>

> 1. `apply_to` must be one of `"all"` `"collection"` `"product"` `"variant"`
> 2. `product_ids` may not send when `apply_to` not `"product"` and `product_ids`  must be array
> 3. `variant_ids` may not send when `apply_to` not `"variant"` and `variant_ids`  must be array
> 4. `collection_id` may not send when `apply_to` not `"collection"` and `collection_id`  must be signature ID
> 5. `translations` must be object, example:
>
> ```json
> translations: {
>     default: {
>         comingSoonAddToCartText: "Coming Soon" // string
>     }
>     // en: {...}, jp: {...}
> }
> ```

{% tabs %}
{% tab title="HTTP" %}

```http
POST /shop-api/coming-soon/create HTTP/1.1
Host: preorder.globo.io
Content-Type: application/json
Authorization: ************
Content-Length: 347
{
    "name": "Summer launch",
    "status": 1,
    "start_date": "2026-07-01T10:00:00.000000Z",
    "end_date": "2026-07-11T10:00:00.000000Z",
    "apply_to": "product",
    "product_ids": [10076972613912],
    "translations": {
        "default":{
            "comingSoonAddToCartText":"Coming Soon",
            "comingSoonAboveMessage":"Product will available in ...",
            "comingSoonBellowMessage":""
        },
        "jp":{
            "comingSoonAddToCartText":"Coming Soon",
            "comingSoonAboveMessage":"Product will available in ...",
            "comingSoonBellowMessage":""
        }
    }
}
```

{% endtab %}

{% tab title="Javascript" %}

```js
const myHeaders = new Headers();
myHeaders.append("Content-Type", "application/json");
myHeaders.append("Authorization", "************");

const raw = JSON.stringify({
  "name": "Summer launch",
  "status": 1,
  "start_date": "2026-07-01T10:00:00.000000Z",
  "end_date": "2026-07-11T10:00:00.000000Z",
  "apply_to": "product",
  "product_ids": [10076972613912],
  "translations": {
      "default":{
          "comingSoonAddToCartText":"Coming Soon",
          "comingSoonAboveMessage":"Product will available in ...",
          "comingSoonBellowMessage":""
      },
      "jp":{
          "comingSoonAddToCartText":"Coming Soon",
          "comingSoonAboveMessage":"Product will available in ...",
          "comingSoonBellowMessage":""
      }
  }
});

const requestOptions = {
  method: "POST",
  headers: myHeaders,
  body: raw,
  redirect: "follow"
};

fetch("https://preorder.globo.io/shop-api/coming-soon/create", requestOptions)
  .then((response) => response.text())
  .then((result) => console.log(result))
  .catch((error) => console.error(error));
```

{% endtab %}

{% tab title="PHP" %}

```php
$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => 'https://preorder.globo.io/shop-api/coming-soon/create',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'POST',
  CURLOPT_POSTFIELDS =>'{
      "name": "coming soon 1",
      "status": 0,
      "start_date": "2026-07-01T10:00:00.000000Z",
      "apply_to": "product",
      "product_ids": [10076972613912],
      "translations": {
          "default":{
              "comingSoonAddToCartText":"Coming Soon",
              "comingSoonAboveMessage":"Product will available in ...",
              "comingSoonBellowMessage":""
          },
          "jp":{
              "comingSoonAddToCartText":"Coming Soon",
              "comingSoonAboveMessage":"Product will available in ...",
              "comingSoonBellowMessage":""
          }
      }
  }',
  CURLOPT_HTTPHEADER => array(
    'Content-Type: application/json',
    'Authorization: ************'
  ),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;

```

{% endtab %}
{% endtabs %}

#### Success response `200`

```json
{
  "success": true,
  "message": "Coming soon product created",
  "data": {
    "id": 1,
    "name": "Summer launch",
    "start_date": "2026-07-01 10:00:00",
    "end_date": null,
    "show_countdown": null,
    "apply_to": "product",
    "product_ids": [10076972613912],
    "variant_ids": null,
    "collection_id": null,
    "translations": { "default": { "comingSoonAddToCartText": "Coming soon" } },
    "status": 1,
    "created_at": "2026-07-16T07:00:00.000000Z",
    "updated_at": "2026-07-16T07:00:00.000000Z"
  }
}
```

#### **Validate**&#x20;

<table><thead><tr><th width="249.2265625">Field</th><th>Rules</th><th>Possible error messages</th></tr></thead><tbody><tr><td><sub>name</sub></td><td><sub>required, string, max:255</sub></td><td><sub>The name field is required.</sub><br><sub>The name may not be greater than 255 characters.</sub></td></tr><tr><td><sub>status</sub></td><td><sub>required, in:0,1</sub></td><td><sub>The status field is required.</sub><br><sub>The selected status is invalid.</sub></td></tr><tr><td><sub>start_date</sub></td><td><sub>required, date</sub></td><td><sub>The start date field is required.</sub><br><sub>The start date is not a valid date.</sub></td></tr><tr><td><sub>end_date</sub></td><td><sub>nullable, date, after:start_date</sub></td><td><sub>The end date is not a valid date.</sub><br><sub>The end date must be a date after start date.</sub></td></tr><tr><td><sub>show_countdown</sub></td><td><sub>nullable, boolean</sub></td><td><sub>The show countdown field must be true or false.</sub></td></tr><tr><td><sub>apply_to</sub></td><td><sub>product,variant,collection,all</sub></td><td><sub>The apply to field is required.</sub><br><sub>The selected apply to is invalid.</sub></td></tr><tr><td><sub>product_ids</sub></td><td><sub>required_if:apply_to,product, array</sub></td><td><sub>The product ids field is required when apply to is product.</sub><br><sub>The product ids must be an array.</sub></td></tr><tr><td><sub>variant_ids</sub></td><td><sub>required_if:apply_to,variant, array</sub></td><td><sub>The variant ids field is required when apply to is variant.</sub><br><sub>The variant ids must be an array.</sub></td></tr><tr><td><sub>collection_id</sub></td><td><sub>required_if:apply_to,collection</sub></td><td><sub>The collection id field is required when apply to is collection.</sub></td></tr><tr><td><sub>translations</sub></td><td><sub>nullable, array</sub></td><td><sub>The translations must be an array.</sub></td></tr><tr><td><sub>translations.{lang}</sub></td><td><sub>array</sub></td><td><sub>Each translation entry must be an array.</sub></td></tr><tr><td><sub>translations.{lang}.comingSoonAddToCartText</sub></td><td><sub>string</sub></td><td><sub>The translations.{lang}.comingSoonAddToCartText must be a string.</sub></td></tr><tr><td><sub>translations.{lang}.comingSoonAboveMessage</sub></td><td><sub>string</sub></td><td><sub>The translations.{lang}.comingSoonAboveMessage must be a string.</sub></td></tr><tr><td><sub>translations.{lang}.comingSoonBellowMessage</sub></td><td><sub>string</sub></td><td><sub>The translations.{lang}.comingSoonBellowMessage must be a string.</sub></td></tr></tbody></table>
