受注グループタグ更新
PATCH
/order_group_tags/{order_group_tag_id}
const url = 'https://api.smaregi.dev/TARGET-CONTRACT-ID/ec-b2b/order_group_tags/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0';const options = { method: 'PATCH', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"name":"重要","attachOrderGroups":[{"id":"12345678-1234-1234-1234-1234567890ab"}],"detachOrderGroups":[{"id":"12345678-1234-1234-1234-1234567890cd"}]}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PATCH \ --url https://api.smaregi.dev/TARGET-CONTRACT-ID/ec-b2b/order_group_tags/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0 \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "name": "重要", "attachOrderGroups": [ { "id": "12345678-1234-1234-1234-1234567890ab" } ], "detachOrderGroups": [ { "id": "12345678-1234-1234-1234-1234567890cd" } ] }'受注グループタグを更新します。
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”order_group_tag_id
required
string format: uuid
受注グループタグID
Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
OrderGroupTagUpdateRequest
object
name
タグ名
string
attachOrderGroups
紐付けを追加する受注グループ
既に紐付いているIDを指定しても重複は追加されません(冪等)。 指定するIDは既存の受注グループである必要があります(存在しない場合は 400)。
Array<object>
object
id
required
受注グループID
string format: uuid
detachOrderGroups
紐付けを解除する受注グループ
紐付いていないIDを指定しても無視されます。
attachOrderGroups と detachOrderGroups に同一IDを指定した場合、attach → detach の順で処理されるため最終的に解除されます。
Array<object>
object
id
required
受注グループID
string format: uuid
Examples
Exampledefault
{ "name": "重要", "attachOrderGroups": [ { "id": "12345678-1234-1234-1234-1234567890ab" } ], "detachOrderGroups": [ { "id": "12345678-1234-1234-1234-1234567890cd" } ]}Responses
Section titled “Responses”更新成功
Media typeapplication/json
OrderGroupTagResponse
object
id
受注グループタグID
string format: uuid
name
タグ名
string
Examples
Exampledefault
{ "id": "12345678-1234-1234-1234-1234567890ab", "name": "重要"}- 入力チェックエラーの場合
Media typeapplication/json
object
type
required
string
title
required
string
detail
string
status
integer
Example
{ "type": "about:blank", "title": "Bad Request", "detail": "request_json:[name]は必須です。", "status": 400}指定されたIDのリソースが見つからない場合
Media typeapplication/json
object
type
required
string
title
required
string
detail
string
status
integer
Example
{ "type": "about:blank", "title": "Not Found", "detail": "指定されたIDのリソースが見つかりません", "status": 404}