商品属性更新
PUT
/products/attributes/{no}
const url = 'https://api.smaregi.dev/TARGET-CONTRACT-ID/pos/products/attributes/example';const options = { method: 'PUT', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"name":"string"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PUT \ --url https://api.smaregi.dev/TARGET-CONTRACT-ID/pos/products/attributes/example \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "name": "string" }'商品属性を更新します。
URI指定した項目番号が存在しなければ登録処理、存在すれば更新処理を行います。
対象プラン
- スタンダード
- プレミアム
- プレミアムプラス
- フードビジネス
- リテールビジネス
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”no
required
string
項目番号
Request Body
Section titled “Request Body”Media typeapplication/json
object
name
required
属性名
商品属性の名称
string format: string
Example
{ "name": "string"}Responses
Section titled “Responses”取得成功
Media typeapplication/json
object
no
商品属性に付与されている連番
string
name
商品属性の名称
string
Example
{ "no": "string", "name": "string"}- URI指定の項目番号が1未満である場合
- URI指定の項目番号が4以上である場合
- URI指定の項目番号が文字列である場合
Media typeapplication/json
object
type
required
string
title
required
string
detail
string
status
integer
Examples
{ "type": "about:blank", "title": "Bad Request", "detail": "[項目番号] 1以上で入力して下さい", "status": 400}{ "type": "about:blank", "title": "Bad Request", "detail": "[項目番号] 3以下で入力して下さい", "status": 400}{ "type": "about:blank", "title": "Bad Request", "detail": "[項目番号] 半角数字(整数)で入力して下さい", "status": 400}