Home      API一覧     お気に入りブックマーク追加API

楽天お気に入りブックマーク追加APIは楽天のお気に入りブックマークの情報を追加することが可能なAPIです。
デベロッパーはOAuth2.0(API認可方式)を使用して、
ユーザーにユーザー自身のお気に入りブックマークへ楽天市場商品を追加させることが可能です。
楽天市場商品の取得は楽天市場商品検索APIをご利用ください。

リクエスト方法


  1. OAuth2.0(API認可方式)で、access_tokenを取得します。
    ※アプリ登録後に表示されるアプリIDとapplication_secretを使用します。
       アプリ未登録の方は登録してください。
    ※OAuth2.0(API認可方式)を使用したaccess_token取得方法についてはこちらをご覧ください。
  2. 取得した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 Affiliate対応あり - アクセストークンの取得方法はこちらを参照してください
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

{
    "error": "wrong_parameter",
    "error_description": "specify valid applicationId"
}

If keyword is not valid (only 1 character given, etc.)

{
    "error": "wrong_parameter",
    "error_description": "keyword parameter is not valid"
}
401 access_token is unauthorized (expired or invalid)

If access_token is expired

{
    "error": "invalid_token",
    "error_description": "specified access token is expired"
}

If access_token is invalid

{
    "error": "invalid_token",
    "error_description": "specify valid access token"
}
403 access_token is forbidden(scope is insufficient)

Insufficient scope (a required scope name will be display in xxxxx)

{
    "error": "insufficient_scope",
    "error_description": "specified access token has no permission for xxxxx"
}
404 If data not found.
{
    "error": "not_found",
    "error_description": "not found"
}
429 Too many requests

This error will be displayed if the number of API requests has been exceeded.
Please try access again after an amount of time.

{
    "error": "too_many_requests",
    "error_description": "number of allowed requests has been exceeded for this API. please try again soon."
}
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

{
    "error": "system_error",
    "error_description": "api logic error"
}
503 Unavailable due to maintenance or overloaded

Maintenance (the API name will be displayed in XXX/XXX)

{
    "error": "service_unavailable",
    "error_description": "XXX/XXX is under maintenance"
}

Response body format is display in format.

format Error output example
json
{
    "error": "wrong_parameter",
    "error_description": "page must be a number"
}
xml
<?xml version="1.0" encoding="UTF-8"?>
<root>
    <error>wrong_parameter</error>
    <error_description>page must be a number</error_description>
</root>
)