客層登録
POST
/customer_groups
const url = 'https://api.smaregi.dev/TARGET-CONTRACT-ID/pos/customer_groups';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"customerGroupSectionId":"12345","label":"string","displayFlag":"0","displaySequence":"12345"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.smaregi.dev/TARGET-CONTRACT-ID/pos/customer_groups \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "customerGroupSectionId": "12345", "label": "string", "displayFlag": "0", "displaySequence": "12345" }'客層情報を登録します。
対象プラン
- スタンダード
- プレミアム
- プレミアムプラス
- フードビジネス
- リテールビジネス
Authorizations
Section titled “Authorizations”Request Body
Section titled “Request Body”Media typeapplication/json
object
customerGroupSectionId
required
客層セクションID
string format: int
label
required
ラベル
string
displayFlag
表示フラグ
端末で表示するか判定 (0:表示しない、1:表示する)
string
displaySequence
required
表示順
string format: int
Example
{ "customerGroupSectionId": "12345", "label": "string", "displayFlag": "0", "displaySequence": "12345"}Responses
Section titled “Responses”更新成功
Media typeapplication/json
object
customerGroupId
客層ID:
string
customerGroupSectionId
客層セクションID:
string
label
ラベル:
string
displayFlag
表示フラグ:端末で表示するか判定 (0:表示しない、1:表示する)
string
displaySequence
表示順:
string
insDateTime
作成日時:登録時の日時。[YYYY-MM-DDThh:mm:ssTZD]
string
updDateTime
更新日時:登録時・更新時の日時。[YYYY-MM-DDThh:mm:ssTZD]
string
Example
{ "customerGroupId": "string", "customerGroupSectionId": "string", "label": "string", "displayFlag": "0", "displaySequence": "string", "insDateTime": "string", "updDateTime": "string"}- 入力チェックエラーの場合
- 指定された客層セクションIDのリソースが見つからない場合
Media typeapplication/json
object
type
required
string
title
required
string
detail
string
status
integer
Examples
Example指定された客層セクションIDのリソースが見つからない場合
{ "type": "about:blank", "title": "Bad Request", "detail": "[customerGroupSectionId] 客層セクションIDは存在しません", "status": 400}