楽天お気に入りブックマーク追加APIは楽天のお気に入りブックマークの情報を追加することが可能なAPIです。 デベロッパーはOAuth2.0(API認可方式)を使用して、 ユーザーにユーザー自身のお気に入りブックマークへ楽天市場商品を追加させることが可能です。 楽天市場商品の取得は楽天市場商品検索APIをご利用ください。
リクエスト方法
- OAuth2.0(API認可方式)で、access_tokenを取得します。
※アプリ登録後に表示されるアプリIDとapplication_secretを使用します。
アプリ未登録の方は登録してください。
※OAuth2.0(API認可方式)を使用したaccess_token取得方法についてはこちらをご覧ください。 - 取得したaccess_tokenを利用して、リクエストします。
※APIテストフォームでテストすることができます。
https://app.rakuten.co.jp/services/api/FavoriteBookmark/Add/20120627?
format=json&
access_token=[access_token]&
itemCode=[item]
※短い時間の間に大量に、同一のリクエストURLへアクセスすると、一定時間利用できなくなる場合がございます。テストの際にはご注意ください。
使用許可scope
rakuten_favoritebookmark_update
入力パラメーター
お気に入り商品追加API 入力パラメータ
ID | 項目名 | パラメーター | 型(括弧内は最大バイト数) | 必須 | デフォルト | 備考 |
---|---|---|---|---|---|---|
1 | アクセストークン | access_token | String | ![]() |
- | アクセストークンの取得方法はこちらを参照してください |
2 | レスポンス形式 | format | String | json | json か xml かどちらかを指定することができます。 | |
3 | 商品コード | itemCode | String | ![]() |
- | 商品コードは楽天市場商品検索APIで取得してください。 現在、追加できるブックマークは楽天市場商品のみです。 楽天プロダクトのブックマークは追加できません。 |
出力パラメーター
お気に入り商品取得API 出力パラメータ
ID | 項目名 | パラメーター | 型(括弧内は最大バイト数) | 備考 |
---|---|---|---|---|
1 | ブックマークID | bookmarkId | String | ブックマークを削除時に使用します |
2 | 登録日時 | registDatetime | String | 登録完了した日時を返却します |
Error
Error messages are displayed in the form of HTTP status code and its response body
HTTP Status Code | Description | Response body example (JSON) |
---|---|---|
400 | Parameter error (or required parameters were insufficient) |
If applicationId is not set
If keyword is not valid (only 1 character given, etc.)
|
401 | access_token is unauthorized (expired or invalid) |
If access_token is expired
If access_token is invalid
|
403 | access_token is forbidden(scope is insufficient) |
Insufficient scope (a required scope name will be display in xxxxx)
|
404 | If data not found. |
|
429 | Too many requests |
This error will be displayed if the number of API requests has been exceeded.
|
500 | Internal error in Rakuten Web Service | An internal system error occured. If you continue seeing this message for a long period, please give your inquiry via this link
|
503 | Unavailable due to maintenance or overloaded |
Maintenance (the API name will be displayed in XXX/XXX)
|
Response body format is display in format.
format | Error output example |
---|---|
json |
|
xml |
|