エンドポイント
POST | https://api.iglobalstores.com/v1/orderNumbers
HTTPSリクエスト
| フィールド↕ | 備考↕ |
|---|---|
| HTTPメソッド | POST |
| エンドポイント | https://api.iglobalstores.com/v1/orderNumbers |
| プロトコル | HTTPS |
| メッセージ形式 | JSON |
| Accept HTTPヘッダー | Accept: application/json |
| Content-Type HTTPヘッダー | Content-Type: application/json |
リクエスト本文のJSONキー/値
メッセージ形式: JSON
1
{2
"store": "999",3
"secret": "f5bde245-f55e-414d-b722-80b25161c12c",4
"sinceOrderId": "999-99999"5
}リクエストJSON定義
| フィールド↕ | 備考↕ |
|---|---|
missingMerchantOrderId 任意, if passing another parameter option | This parameter is used to query a set or orders within the last two weeks that are missing the merchantOrderId. When the merchantOrderId is submitted via the updateMerchantOrderID API endpoint, orders will no longer show up in this query.boolean: true/false |
secret 必須 | Zonosが提供するAPIシークレットGUID。 string |
sinceDate 任意, if passing sinceOrderId parameter. | This parameter is used to query a set of orders after a particular date.sinceDate and sinceOrderId cannot both be sent.string - date UTC/GMT; format: yyyymmdd |
sinceOrderId 任意, if passing sinceDate / throughDate parameter | The Zonos order ID, can be passed with or without your store ID and hyphen (Example: 123-45678 or 45678).Note: This parameter will be used to query a set of orders after a particular Zonos order. sinceDate and sinceOrderId cannot both be sent.integer / string |
statuses 任意 | This parameter is used to include the current order status and merchantOrderId in the response. If it is present on the request, regardless of the value, it will include the statuses.boolean: true |
store 必須 | Zonosが提供するストアID。integer |
throughDate 任意 | This parameter is used to query a set of orders between a particular date range.Must be passed along with sinceDate parameter.string - date UTC/GMT; format: yyyymmdd |
HTTPSレスポンス
メッセージ形式: JSON
1
{2
"totalCount": 6,3
"orderCount": 5,4
"testOrderCount": 1,5
"orders": [6
{7
"testOrder": false,8
"id": "999-99991",9
"timestamp": "2015-01-01 00:33:14.0"10
},11
{12
"testOrder": true,13
"id": "999-99992",14
"timestamp": "2015-01-01 05:12:46.0"15
},16
{17
"testOrder": false,18
"id": "999-99993",19
"timestamp": "2015-01-01 14:50:54.0"20
},21
{22
"testOrder": false,23
"id": "999-99994",24
"timestamp": "2015-01-02 20:14:01.0"25
},26
{27
"testOrder": false,28
"id": "999-99995",29
"timestamp": "2015-01-02 20:57:47.0"30
},31
{32
"testOrder": false,33
"id": "999-99996",34
"timestamp": "2015-01-02 22:11:40.0"35
}36
]37
}エラーHTTPレスポンス
| エラー↕ | 意味↕ |
|---|---|
| 406 - Not Acceptable | HTML Entity. HTTP “Accept” header is invalid. |
| 415 - Unsupported media type | HTML Entity. HTTP “Content-Type” header is invalid. |
| 200 | “error”:”could not parse input” |
| 200 | “error”:”orderId: 999-99999 is not a valid orderId” |
| 200 | “error”:”Parameter orderId or referenceId is required.” |
| 200 | “error”:”Cannot specify both Parameters orderId and referenceId.” |
| 200 | “error”:”Could not process order details.” |
| 200 | “error”:”Invalid security credentials” |
レスポンスJSON定義
| フィールド↕ | 備考↕ |
|---|---|
error | このパラメータはエラー発生時にのみレスポンスに存在し、原因の説明を含みます。string |
orderCount | 取得した本番注文の合計件数。integer |
order.testOrderCount | 取得したテスト注文の合計件数。integer |
orders | 注文マップのリスト。string |
orders[index].id | The full Zonos Order Id including store id and dash.string |
orders[index].merchantOrderId | MerchantOrderId associated with the order through the updateMerchantOrderId API service endpoint.string |
orders[index].orderStatus | The current order status for possible values.string |
orders[index].orderStatusDate | The epoch representing when the status was last updated.integer |
orders[index].orderStatusDateString | The timestamp representing when the status was last updated in UTC/GMT.timestamp |
orders[index].testOrder | Indicates if the order was a “test order” or “live order”.boolean |
orders[index].timestamp | The timestamp representing when the order was placed in UTC/GMT.timestamp |
totalCount | 取得した本番注文とテスト注文の合計件数。integer |
注文番号
注文番号エンドポイントの仕組みを学びます。orderNumbersエンドポイントは、Zonos Checkout経由で完了した注文番号の一覧を安全に取得するために使用します。通常は、特定日またはorderID時点、および日付範囲内の注文がすべてインポートされたことを確認する注文照合に使います。