> For the complete documentation index, see [llms.txt](https://developer.leaderos.net/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developer.leaderos.net/users/orders.md).

# Orders

## Get all orders of a user

<mark style="color:blue;">`GET`</mark> `https://yourwebsite.com/api/users/<user_id>/orders`

#### Path Parameters

| Name                                       | Type    | Description |
| ------------------------------------------ | ------- | ----------- |
| user\_id<mark style="color:red;">\*</mark> | numeric | User's ID   |

{% tabs %}
{% tab title="200: OK " %}

```json
[
    {
        "id": "2",
        "accountID": "2",
        "coupon": "test",
        "total": "100.00",
        "discount": "0.00",
        "subtotal": "100.00",
        "earnings": "100.00",
        "cashback": "0.00",
        "credit": "0.00",
        "type": "1",
        "status": "1",
        "paymentAPI": "paypal",
        "paymentID": "0",
        "creationDate": "2023-02-15 10:42:48"
    },
    {
        "id": "3",
        "accountID": "2",
        "coupon": null,
        "total": "300.00",
        "discount": "0.00",
        "subtotal": "300.00",
        "earnings": "300.00",
        "cashback": "0.00",
        "credit": "0.00",
        "type": "2",
        "status": "1",
        "paymentAPI": "paypal",
        "paymentID": "0",
        "creationDate": "2023-02-15 10:42:48"
    }
]
```

{% endtab %}

{% tab title="404: Not Found User not found" %}

```json
{
    "status": false,
    "error": "USER_NOT_FOUND",
    "message": "User not found!"
}
```

{% endtab %}
{% endtabs %}
