---
description: Fetch all your items with pagination
---

# /api/v1/items

#### GET - Get all items paginated with filter

This is an endpoint that implements filtering and pagination just like the previous endpoints.

You can fetch all the items created by the access token creator.

For items, the sortBy parameter and the parameters to filter by are the same. \
You can use the values from this enum to do it:

```typescript
enum Items_sortBy {
  created_at = "created_at",
  payee_address = "payee_address",
  currency = "currency",
  max_price = "max_price",
  debit_times = "debit_times",
  debit_interval = "debit_interval",
  button_id = "button_id",
  redirect_url = "redirect_url",
  pricing = "pricing",
  network = "network",
  name = "name",
  deleted = "deleted",
  payment_intents_count = "payment_intents_count",
}
```



#### POST - Create a new item

This is an authenticated endpoint that allows you to save a brand new item. \




{% hint style="success" %}
You can create a new item for each of your users automatically using the API. You don't have to use the dashboard to create them.
{% endhint %}

You need to send a post request to https://debitllama.com/api/v1/items to save a new item.

Request Body:

```typescript
        name : string,
        chainId : string,
        walletaddress : string,
        currency : CurrencyApiV1,
        pricing : "Fixed" | "Dynamic",
        maxAmount : string,
        debitTimes: number,
        debitInterval : number,
        redirectto : string,
```

Let me explain them in order:

* **name** is the name of your item. It will be visible on the checkout page
* **chainId** is the hexadecimal blockchain id the account needs to be created on
* **walletaddres** is the recipient's wallet address, all payments will be forwarded here&#x20;
* **currency** is the tokens used for payment, it's an object with a defined schema.
* **pricing** is the subsciption payment flow. It is either Fixed or Dynamic
* **maxAmount** is the amount paid for the subscription. For Fixed pricing this is the actual amount that is automatically paid, for Dynamic this is the maximum that can be debited and serves as a limit
* **debitTimes** is the amount of times the subsciption payments are allowed to happen. Must be an Integer!
* **debitInterval** is the time in days that must pass before the next payment is available
* **redirectto** must be a valid URL string, it is the website the checkout will redirect to after payment

The Api returns the same response as /api/v1/items/\[slug] so navigate to the next page to learn more about it!

