StoreController::orderStatus(). The only endpoint left in the store group that both lives on a real route and executes without error — index() is broken (see GET_list.md) and checkout()/confirmPayment() are disabled routes (archived, docs/api/_archive/diver/store/).{order} is route-model-bound to App\Models\Store\Order by primary key. Ownership is checked inline: $order->causer_id !== auth()->id() returns 403.App\Http\Controllers\Api\V1\Diver\StoreController::orderStatus()api.v1.diver.store.orderAuthorization: Bearer {token}GET/api/v1/diver/store/orders/{order}| Parameter | Type | Description |
|---|---|---|
{order} | integer | Order primary key, route-model-bound |
200 OK{
"success": true,
"status": "success",
"message": "OK",
"data": {
"order_id": 2201,
"status": "completed",
"payment": "paid",
"amount_total": 75,
"currency": "USD",
"created_at": "2014-11-11 02:52:00"
}
}| Field | Type | Nullable | Notes |
|---|---|---|---|
order_id | integer | No | |
status | string | No | OrderStatus enum value, e.g. completed, draft |
payment | string | No | PaymentStatus enum value, e.g. paid, payment_pending |
amount_total | number | No | Already major units (dollars) — read directly with no accessor or cast, despite the Order model's own docblock claiming amount_total is stored 100 => 1.00 (minor units). Verified live: this order's amount_total (75) matches its OrderLine.unit_amount (75) and its course's price_public accessor scale directly, not ×100 or ÷100 off from either. Treat the docblock comment as stale, not the response |
currency | string | No | Hardcoded USD on every order created through this controller |
created_at | string | Yes | Y-m-d H:i:s |
401 Unauthorized{
"success": false,
"status": "error",
"message": "Unauthenticated"
}403 Forbidden{order} exists but belongs to a different diver.{
"success": false,
"status": "error",
"message": "Forbidden"
}404 Not Found{
"message": "No query results for model [App\\Models\\Store\\Order] 999999999"
}status and payment are separate enums on the same order (e.g. a completed order is expected to have payment: "paid", but the endpoint does not assert this relationship — both are read independently from stored columns).docs/api/diver/store/GET_order_status.mdcurl --location 'https://test.diveraid.com/api/v1/diver/store/orders/' \
--header 'Authorization: Bearer <token>'{
"status": "success",
"message": "string",
"data": {
"order_id": 0,
"status": "string",
"payment": "string",
"amount_total": 0,
"currency": "string",
"created_at": "2019-08-24T14:15:22.123Z"
}
}