콘텐츠로 이동
앱 설치
한국어

[POST] 신청 생성

AI 개요

고객과 이형 상품에 대한 재입고 알림 신청을 만드는 엔드포인트를 설명합니다.

  • POST /shop-api/back-in-stock/create를 호출합니다. 속도 제한은 throttle:30,1입니다.
  • customer_email, product_id, variant_id는 필수이며, customer_phone, locale, note, content는 선택 사항입니다.
  • 양식 필드 ID와 일치하지 않는 content 키는 삭제됩니다. 관리자 화면과 내보내기에 읽기 쉬운 레이블이 표시되도록 content.keyLabel을 추가하세요.
  • 신청이 이미 있으면 메시지는 "Submission updated successfully"이며, 해당 이형 상품에 이미 등록한 고객에게는 오류가 반환됩니다.

AI가 생성한 요약입니다. 오류가 있을 수 있으니 아래 전체 가이드를 확인하세요.

* 인증

필수 Authorization

제한 throttle:30,1

요청

엔드포인트 POST - /shop-api/back-in-stock/create

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": "[email protected]"
}
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": "[email protected]"
});
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));
$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": "[email protected]"
}',
CURLOPT_HTTPHEADER => array(
'Content-Type: application/json',
'Authorization: ************'
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;

페이로드 본문

매개변수유형필수
customer_emailemailyes
product_idnumberyes
variant_idnumberyes
customer_phonephone +9123456789no
localestring enno
notestringno
contentobjectno
content.keyLabelobjectno
  1. content : 사용자 지정 필드 값입니다. 아래 매핑 표를 참고하세요. GET /form에서 반환된 필드 id와 일치하지 않는 키(source 또는 keyLabel 제외)는 저장 전에 알림 없이 삭제됩니다.
  2. content.keyLabel 전송하는 사용자 지정 필드에 대한 { fieldId: label } 맵입니다. 사용을 강력히 권장합니다. 이 값이 없으면 판매자의 관리자 UI와 CSV 내보내기에 읽기 쉬운 레이블 대신 원래 필드 id가 표시됩니다.

전체 필드 양식을 사용하여 구독자를 생성하는 데 필요한 content에 대해 자세히 알아보기


성공 응답 200

{
"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": "[email protected]",
"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"
}
}

실패

// 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"
}

도움이 되었나요?

문제 신고