GET /v1/orders/:order_id
Overview
任意の ID に紐づく注文を返します。ステータスが pending の場合は当選商品が未確定状態のためorder_detailsは存在しません
Sample
info
ユーザ認証についてはこちら。この API はユーザ認証必須です。
curl -X GET http://localhost:3000/api/v1/orders/9ec014a0-8845-4b32-8ec6-e2c34069f605/
ResponseBody
{
"id": "9ec014a0-8845-4b32-8ec6-e2c34069f605",
"gacha_id": "dd7ca1e0-b746-4b1b-9f46-e0a6997cc672",
"status": "assigned",
"created_at": "2022-04-08T09:26:51.262Z",
"order_details": [
{
"id": "34bacdfb-8ff1-4baf-8a80-8df8987f6238",
"order_id": "9ec014a0-8845-4b32-8ec6-e2c34069f605",
"prize_id": "b8db0f2a-6151-4f27-9b09-2be695d96f5f",
"delivered_at": null,
"created_at": "2022-04-08T09:26:51.262Z",
"updated_at": "2022-04-08T09:26:51.263Z",
"deleted_at": null
}
],
"delivery_info": {
"fullname": "tbtarou",
"phone_number": "0363020561",
"zip_code": "1600022",
"country": "JP",
"prefecture": "東京都",
"city": "新宿区",
"address1": "2−8−5",
"address2": "東弥鋼業ビル 4階"
},
"gacha": {
"id": "9b7c1606-1e88-4556-b023-2862a5633cc8",
"name": "よじごんじガチャ",
"price": 100,
"maximum": 0,
"has_limit": false,
"status": "selling",
"thumbnail_image_url": "https://dev-507-assets.s3.ap-northeast-1.amazonaws.com/01G2N6VT96687QK0JJ67PKPJ5G.jpeg",
"lineup_image_url": "https://dev-507-assets.s3.ap-northeast-1.amazonaws.com/01G2N6VXRMETRE0K9HVEWPVCJ7.jpeg",
"web_url": "",
"probability_provision": "",
"start_at": "2022-05-09T20:06:33.000Z",
"end_at": "2022-05-19T15:00:17.000Z",
"created_at": "2022-05-09T20:06:34.598Z",
"updated_at": "2022-05-17T13:17:40.810Z",
"deleted_at": null,
"redeem_detail": {
"id": "3ff88ff2-633f-4f8a-ba0b-4458c658a329",
"gacha_id": "9b7c1606-1e88-4556-b023-2862a5633cc8",
"rule": "fds",
"place_url": "https://devdoc.3barc.space",
"place_text": "原宿YURINAN",
"call_number": "現在はお呼び出ししておりません"
}
},
"payment": {
"id": "ce1e5284-6ef7-4121-a652-01060e3f3595",
"order_id": "5ac7ae0f-45b4-4a7b-99d2-785e4a4c314e",
"payment_id": "d3a-kTdG8uHVLwXBxUmHECs7UH",
"status": "captured",
"access_id": "0bf1b89165ed78aa17aac78057e1a452",
"access_pass": "ba4f750e887745797d7fbc8e2e58483b",
"type": "credit",
"tran_id": "2205191905111111111111807849",
"tran_date": "20220519195020",
"approve": "0154996",
"forward": "2a99662",
"created_at": "2022-05-19T10:50:19.712Z",
"updated_at": "2022-05-19T10:50:20.814Z"
},
"item_count": 10
}
| カラム名 | データ型 | 詳細 |
|---|---|---|
| order_details | OrderDetail[] | 注文に紐づく商品の配列です |
| delivery_info | DeliveryInfo | ガチャの配送タイプが郵送の場合のみ存在します |
| gacha | Gacha |