クーポン商品登録
POST /coupons/{coupon_id}/products
POST
/coupons/{coupon_id}/products
クーポン商品を登録します。
対象プラン
- スタンダード
- プレミアム
- プレミアムプラス
- フードビジネス
- リテールビジネス
Authorizations
Section titled “Authorizations ”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters ” coupon_id
required
string
クーポンID
※ ユーザーアクセストークンを利用する場合、ユーザーの所属する店舗で販売している商品のみをクーポン商品として持つクーポンのIDを指定してください。
Request Body
Section titled “Request Body ”object
division
required
クーポンアイテム区分
クーポンアイテム区分:itemId の値が何を示すものかを指定します。(1:部門ID、2:商品ID、3:グループコード)
※クーポンアイテムタイプが 2.商品付与 の場合、商品IDのみ指定できます。
string
itemId
required
アイテムID
アイテムID:クーポンに紐づくアイテムを特定するための、その区分におけるID。
※ ユーザーアクセストークンを利用する場合で商品IDを指定する場合、ユーザーの所属する店舗で販売している商品IDを指定してください。
string format: int
type
required
クーポンアイテムタイプ
クーポンアイテムタイプ(1:適用条件、2:商品付与)
string
salesPrice
販売価格
販売価格:商品付与する際の価格を指定します。
※クーポンアイテムタイプが 2.商品付与 の場合必須です。
string format: int
Example
{ "division": "1", "itemId": "1234567890123456789012345678901234567890123456789012345678901234567890123456789012345", "type": "1", "salesPrice": "1234567890"}
Responses
Section titled “ Responses ”更新成功
object
couponId
クーポンID
string
division
クーポンアイテム区分:itemId の値が何を示すものかを指定します。(1:部門ID、2:商品ID、3:グループコード)
string
itemId
アイテムID:クーポンに紐づくアイテムを特定するための、その区分におけるID。
string
type
クーポンアイテムタイプ(1:適用条件、2:商品付与)
string
salesPrice
販売価格:商品付与する際の価格を指定します。
string
Example
{ "couponId": "string", "division": "string", "itemId": "string", "type": "string", "salesPrice": "string"}
- 指定したアイテムIDが存在しない場合
- クーポンアイテムタイプが 2.商品付与 指定で、クーポンアイテム区分が 2.商品ID 以外を指定した場合
- クーポンアイテムタイプが 1.適用条件 指定で、販売価格を指定した場合
- クーポンアイテムタイプが 2.商品付与 指定で、販売価格を指定しなかった場合
- 指定されたクーポンアイテム区分、アイテムID、クーポンアイテムタイプの組み合わせが存在する場合
- 適用条件区分が 指定商品 でないクーポンを指定して、クーポンアイテムタイプが 1.適用条件 を指定した場合
- 特典タイプが 商品付与 でないクーポンを指定して、クーポンアイテムタイプが 2.商品付与 を指定した場合
object
type
required
string
title
required
string
detail
string
status
integer
Examples
{ "type": "about:blank", "title": "Bad Request", "detail": "[division] [itemId] 指定されたクーポンアイテム区分のアイテムIDは存在しません。", "status": 400}
{ "type": "about:blank", "title": "Bad Request", "detail": "[division] [type] クーポンアイテムタイプが 2.商品付与 の場合、クーポンアイテム区分は 2.商品ID のみ指定できます。", "status": 400}
{ "type": "about:blank", "title": "Bad Request", "detail": "[type] [salesPrice] クーポンアイテムタイプが 1.適用条件 の場合、販売価格は指定できません。", "status": 400}
{ "type": "about:blank", "title": "Bad Request", "detail": "[type] [salesPrice] クーポンアイテムタイプが 2.商品付与 の場合、販売価格は必須です。", "status": 400}
{ "type": "about:blank", "title": "Bad Request", "detail": "[division] [itemId] [type] 指定されたデータはすでに存在しています。", "status": 400}
{ "type": "about:blank", "title": "Bad Request", "detail": "[type] 適用条件区分が [指定商品] でないクーポンに、クーポンアイテムタイプが [1.適用条件] のクーポン商品は紐付けられません。", "status": 400}
{ "type": "about:blank", "title": "Bad Request", "detail": "[type] 特典タイプが [商品付与] でないクーポンに、クーポンアイテムタイプが [2.商品付与] のクーポン商品は紐付けられません。", "status": 400}
- 指定されたクーポンIDが存在しない場合
object
type
required
string
title
required
string
detail
string
status
integer
Examples
{ "type": "about:blank", "title": "NotFound", "detail": "指定されたクーポンIDのリソースが見つかりません。", "status": 404}