> For the complete documentation index, see [llms.txt](https://shopifyinternship.gitbook.io/imagerepository/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://shopifyinternship.gitbook.io/imagerepository/user/inventory.md).

# Inventory

## Get User Inventory

<mark style="color:blue;">`GET`</mark> `{{BASE}}/v1/transact/history`

This endpoint allows you to get free cakes.

#### Headers

| Name          | Type   | Description               |
| ------------- | ------ | ------------------------- |
| Authorization | string | `Bearer {{ACCESS_TOKEN}}` |

{% tabs %}
{% tab title="200 User's Inventory" %}

```
{
    "success": true,
    "data": {
        "inventory": [
            {
                "_id": "60046766f2e915001...",
                "amount": 100,
                "imageId": "60045d60....",
                "userId": "60046302f2e91....",
                "type": "purchased",
                "createdAt": "2021-01-17T16:35:50.474Z",
                "updatedAt": "2021-01-17T16:35:50.474Z",
                "__v": 0
            },
            {
                "_id": "6004856f65a08c7...",
                "amount": 100,
                "imageId": "60045d60f2e91....",
                "userId": "60046302f2e91500....",
                "type": "purchased",
                "createdAt": "2021-01-17T18:43:59.126Z",
                "updatedAt": "2021-01-17T18:43:59.126Z",
                "__v": 0
            }
        ]
    }
}
```

{% endtab %}
{% endtabs %}
