Transaction 情報の取得
指定トランザクションの情報を取得します。
備考
Mobage Bank API の使い方
Bank API の詳細な使い方について、下記の各ページをご参照下さい。
ngCore SDK | Native SDK | Unity SDK
URI Fragment
/bank/debit/@app/{-list|,|transactionId}
署名方式
OAuth2
HTTP メソッド
GET
リクエストヘッダー
- Authorization は必須になります。例に示した "Authorization: bearer oauth2_token" を HTTP ヘッダーに追加して下さい。
URL クエリパラメータ
なし
リクエスト本文
なし
レスポンスコード
| HTTP Status Code | HTTP Status Message | Meaning |
|---|---|---|
| 200 | OK | Data successfully acquired |
| 400 | Bad Request | Corrupt request data on the client side |
| 401 | Unauthorized | Authorization error |
| 403 | Forbidden | The resource exists, but access is not possible due to a reason other than an authorization error. |
| 404 | Not Found | The resource does not exist. |
| 500 | Internal Server Error | An error on the API server side |
| 503 | Service Unavailable | The API cannot be used temporarily |
レスポンス本文
- 成功の場合、取得対象のトランザクションが返ってきます。
- Content-Type: application/json; charset=utf-8
| パラメータ名 | 説明 |
|---|---|
| published | トランザクションが作成された時間 |
| comment | トランザクションに対するコメント |
| id | トランザクション ID |
| updated | トランザクションが更新された時間 |
| items | アイテム配列。ただいまアイテムは 1 つだけ指定可能 |
| items[].item | 下記パラメータを持つオブジェクト |
| items[].item.imageUrl | アイテム画像の URL |
| items[].item.name | アイテム名 |
| items[].item.id | 購入対象アイテム ID |
| items[].item.price | アイテム価格 |
| items[].item.description | アイテムの説明文 |
| items[].quantity | 本トランザクションで購入するアイテム個数 |
| state | トランザクションのステート |
実例
トランザクションを 1 つ取得する場合
Base String
// OAuth2 認証では Base String は必要ありません。
Http リクエスト
GET /social/api/restful/v2.02/bank/debit/@app/8B41F75C-7D29-3091-AEF4-D5B4243015EB HTTP/1.1
Host: ssl.sb.sp.mbga-platform.jp
Accept-Encoding: gzip
Authorization: bearer 6d796a30388f217db3dcff0d513e4206
Accept: */*
HTTP レスポンス
HTTP/1.0 200 OK
Content-Type: application/json; charset=utf-8
Content-Length: 348
Connection: close
Date: Sun, 29 Sep 2013 12:57:23 GMT
Server: Unknown
{"published":"2013-09-29T12:57:06","comment":"Purchase of 2 Sample Item(s)","id":"8B41F75C-7D29-3091-AEF4-D5B4243015EB","updated":"2013-09-29T12:57:06","items":[{"item":{"imageUrl":"http://mobage.com/homepage-assets/images/icon.png","name":"Sample Item","id":"item_1","price":100,"description":"This is a sample item"},"quantity":2}],"state":"new"}
複数トランザクションを一度に取得する場合
Base String
// OAuth2 認証では Base String は必要ありません。
Http リクエスト
GET /social/api/restful/v2.02/bank/debit/@app/72FECA23-7E18-3E2B-BF81-305ED540DC39,5E61A3EB-8DCA-385C-94CE-A18294560F4B HTTP/1.1
Host: ssl.sb.sp.mbga-platform.jp
Accept-Encoding: gzip
Authorization: bearer 6d796a30388f217db3dcff0d513e4206
Accept: */*
HTTP レスポンス
HTTP/1.0 200 OK
Content-Type: application/json; charset=utf-8
Content-Length: 811
Connection: close
Date: Sun, 29 Sep 2013 13:02:32 GMT
Server: Unknown
{"entry":[{"published":"2013-09-29T13:02:30","comment":"Purchase of 2 Sample Item(s)","id":"72FECA23-7E18-3E2B-BF81-305ED540DC39","updated":"2013-09-29T13:02:30","items":[{"item":{"imageUrl":"http://mobage.com/homepage-assets/images/icon.png","name":"Sample Item","id":"item_1","price":100,"description":"This is a sample item"},"quantity":2}],"state":"new"},{"published":"2013-09-29T13:01:10","comment":"Purchase of 2 Sample Item(s)","id":"5E61A3EB-8DCA-385C-94CE-A18294560F4B","updated":"2013-09-29T13:01:10","items":[{"item":{"imageUrl":"http://mobage.com/homepage-assets/images/icon.png","name":"Sample Item","id":"item_1","price":100,"description":"This is a sample item"},"quantity":2}],"state":"new"}],"startIndex":1,"sorted":false,"itemsPerPage":2,"updatedSince":false,"totalResults":2,"filtered":false}