商品タグ登録
POST
/product_tags
const url = 'https://api.smaregi.dev/TARGET-CONTRACT-ID/ec-b2b/product_tags';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"name":"特売品"}'};
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/ec-b2b/product_tags \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "name": "特売品" }'商品タグ情報を登録します。
Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
ProductTagRequest
object
name
タグ名
string
Examples
Exampledefault
{ "name": "特売品"}Responses
Section titled “Responses”登録成功
Media typeapplication/json
ProductTagResponse
object
id
商品タグID
string format: uuid
name
タグ名
string
Examples
Exampledefault
{ "id": "11111111-1111-1111-1111-111111111111", "name": "特売品"}- 入力チェックエラーの場合
Media typeapplication/json
object
type
required
string
title
required
string
detail
string
status
integer
Examples
Example入力チェックエラーの場合
{ "type": "about:blank", "title": "Bad Request", "detail": "request_json:[name]は255文字以下で指定してください。", "status": 400}