> 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/back-in-stock/post-create-submission.md).

# \[POST] Create submission

### \* Authentication&#x20;

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

Limit  `throttle:30,1`

### Request

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

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

```http
POST /shop-api/back-in-stock/create HTTP/1.1
Host: preorder.globo.io
Content-Type: application/json
Authorization: ************
Content-Length: 84
{
"product_id":123456789,
"variant_id":123456789,
"customer_email": "example@gmail.com"
}

```

{% endtab %}

{% tab title="Javascript" %}

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

const raw = JSON.stringify({
  "product_id": 1,
  "variant_id": 1,
  "customer_email": "example@gmail.com"
});
const requestOptions = {  
    method: "POST",  
    headers: myHeaders,  
    body: raw,
    redirect: "follow"
};
fetch("https://preorder.globo.io/shop-api/back-in-stock/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/back-in-stock/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 =>'{
    "product_id": 123456789,
    "variant_id": 987654321,
    "customer_email": "example@gmail.com"
  }',
  CURLOPT_HTTPHEADER => array(
    'Content-Type: application/json',
    'Authorization: ************'
  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;
```

{% endtab %}
{% endtabs %}

Payload body

<table><thead><tr><th width="262.4296875">Params</th><th width="191.5390625">Type</th><th>Required</th></tr></thead><tbody><tr><td>customer_email</td><td>email</td><td><code>yes</code></td></tr><tr><td>product_id</td><td>number</td><td><code>yes</code></td></tr><tr><td>variant_id</td><td>number</td><td><code>yes</code></td></tr><tr><td>customer_phone</td><td>phone <code>+9123456789</code></td><td><code>no</code> </td></tr><tr><td>locale</td><td>string <code>en</code></td><td><code>no</code></td></tr><tr><td>note</td><td>string</td><td><code>no</code></td></tr><tr><td><code>content</code></td><td>object</td><td><code>no</code></td></tr><tr><td><code>content.keyLabel</code></td><td>object</td><td><code>no</code></td></tr></tbody></table>

> 1. `content` : Custom field values. See mapping table below. Any key that doesn't match a field `id` returned by `GET /form` (and isn't `source` or `keyLabel`) is silently dropped before saving.
> 2. `content.keyLabel` Map of `{ fieldId: label }` for the custom fields you're sending. Strongly recommended — without it, the merchant's admin UI and CSV exports will show the raw field `id` instead of a readable label.

### Learn more about the content needed to generate subscribers using full-field forms.

* Go to [\[GET\] Back in stock form fields](/pre-order/app-api/rest-api/back-in-stock/get-back-in-stock-form-fields.md)&#x20;

***

#### Success response `200`

```json
{
  "success": true,
  "message": "Submission created successfully", // "Submission updated successfully" if submission exist
  "data": {
    "id": 12345, // ID submission
    "product_id": 1234567890, // Shopify product ID
    "variant_id": 9876543210, // Shopify variant ID
    "customer_email": "customer@example.com",
    "customer_phone": null,
    "product_title": "Product Name", 
    "variant_title": "Size M / Blue",
    "sku": "SKU-001",
    "inventory_id": "45678901234", // Shopify inventory_item_id
    "status": 0, // 0 => pending 
    "last_sent": null, // => pending 
    "unsubscribe": 0, // 0 => subscribe
    "content": "{\"source\":\"api\"}", // JSON string (nullable)
    "locale": "default",
    "opened": 0, // Chưa mở email
    "clicked": 0, // Chưa click link email
    "note": null,
    "created_at": "2026-07-06T10:00:00.000000Z",
    "updated_at": "2026-07-06T10:00:00.000000Z"
  }
}
```

#### **Failed**&#x20;

```json
// Missing ID
{
  "success": false,
  "message": "product_id and variant_id are required"
}
// Not email
{
  "success": false,
  "message": "customer_email is required"
}
// variant not found
{
  "success": false,
  "message": "Variant not found"
}
// registered
{
  "success": false,
  "message": "Customer is already registered for this variant"
}
// catch 
{
  "success": false,
  "message": "Something went wrong"
}
```
