# Order Statuses

# View Order Status Endpoint

## Structure

### Order Status

<table border="1" id="bkmrk-name-type-descriptio" style="border-collapse: collapse; width: 100%;"><colgroup><col style="width: 33.3731%;"></col><col style="width: 33.3731%;"></col><col style="width: 33.3731%;"></col></colgroup><tbody><tr><td>**Name**  
</td><td>**Type**  
</td><td>**Description**  
</td></tr><tr><td>`id`</td><td>int</td><td>The id of the order status</td></tr><tr><td>`name`</td><td>string</td><td>The name of the order status</td></tr><tr><td>`state`</td><td>string</td><td>The state of the order status</td></tr><tr><td>`group`</td><td>object</td><td>The [Group](https://support.aerocommerce.com/books/api/page/view-order-status-endpoint#bkmrk-order-status-group) of the order status</td></tr></tbody></table>

### Order Status Group

<table border="1" id="bkmrk-name-type-descriptio-1" style="border-collapse: collapse; width: 100%;"><colgroup><col style="width: 33.3731%;"></col><col style="width: 33.3731%;"></col><col style="width: 33.3731%;"></col></colgroup><tbody><tr><td>**Name**  
</td><td>**Type**  
</td><td>**Description**  
</td></tr><tr><td>`id`</td><td>int</td><td>The id of the order status group</td></tr><tr><td>`name`</td><td>string</td><td>The name of the order status group</td></tr></tbody></table>

## Example Request  


```
GET /api/order-statuses/{id}
```

## Example Response

```json
{
    "id": 2,
    "name": "On Hold",
    "state": "on_hold",
    "group": {
        "id": 1,
        "name": "test"
    }
}
```

# Order Status Index Endpoint

## Structure

See [`View Order Status Endpoint`](https://support.aerocommerce.com/books/api/page/view-order-status-endpoint) for the structure of the order status payload inside the `data` array.

### Example Request

```
GET /api/order-statuses?per_page=2
```

### Example Response

```json
{
    "current_page": 1,
    "data": [
        //
    ],
    "first_page_url": "http://aero.test/api/order-statuses?page=1",
    "from": 1,
    "last_page": 5,
    "last_page_url": "http://aero.test/api/order-statuses?page=5",
    "next_page_url": "http://aero.test/api/order-statuses?page=2",
    "path": "http://aero.test/api/order-statuses",
    "per_page": 2,
    "prev_page_url": null,
    "to": 2,
    "total": 9
}
```

<p class="callout info">See [`View Order Status Endpoint`](https://support.aerocommerce.com/books/api/page/view-order-status-endpoint) for the structure of the order status payload inside the `data` array.</p>