# /api/v1/items/\[slug]

You can fetch an item by Id. The Response when creating an item contains an **item\_id** variable which can be used. This variable is the same as the **button\_id** which is used for creating a valid checkout button.

#### Example response:

GET <https://debitllama/api/v1/items/89f41c73-7626-4e00-8090-1d91c83c3565&#x20>;

```typescript
// {
  _self: {
    href: "/api/v1/items/89f41c73-7626-4e00-8090-1d91c83c3565",
    methods: [ "GET", "POST" ]
  },
  _version: "v1",
  _description: "GET: Fetch an item by item_id. POST: Update redirect_url and deactivate item",
  _links: [
    {
      href: "/api/v1/items/89f41c73-7626-4e00-8090-1d91c83c3565 ",
      methods: [ "GET", "POST" ]
    },
    {
      href: "https://debitllama.com/buyitnow?q=89f41c73-7626-4e00-8090-1d91c83c3565",
      methods: [ "GET", "POST" ]
    }
  ],
  item: {
    id: 58,
    created_at: "2023-12-30T16:06:57+00:00",
    payee_address: "0xD97F13b8fd8a54434F7Bd7981F0D6C82EA1b59F3",
    currency: { name: "BTT", native: true, contractAddress: "" },
    max_price: 5000,
    debit_times: 1,
    debit_interval: 1,
    button_id: "89f41c73-7626-4e00-8090-1d91c83c3565",
    redirect_url: "https://asd.com",
    pricing: "Fixed",
    network: {
      name: "BTT Donau Testnet",
      rpc: "https://pre-rpc.bt.io/",
      chain_id: "0x405",
      virtual_accounts_contract: "0xF75515Df5AC843a8B261E232bB890dc2F75A4066",
      connected_wallets_contract: "0x9c85da9E45126Fd45BC62656026A2E7226bba239",
      currency: "BTT",
      available_currencies: [
        { name: "BTT", native: true, contractAddress: "" },
        {
          name: "USDTM",
          native: false,
          contractAddress: "0x4420a4415033bd22393d3A918EF8d2c9c62efD99"
        }
      ]
    },
    name: "testitemname",
    deleted: false,
    payment_intents_count: 0
  },
  checkout: "https://debitllama.com/buyitnow?q=89f41c73-7626-4e00-8090-1d91c83c3565",
  item_id: "89f41c73-7626-4e00-8090-1d91c83c3565"
}
```

### Checkout link

The response contains the link to the checkout in the \_links array, you can use it to directly navigate your customers to the checkout page.

### Update the item POST

You can disable the item or update it's redirect url using a POST request

{% hint style="info" %}
Deleting an item is not permanent, it will only disable the checkout, you can re-enable the item again any time.
{% endhint %}

Request example:

POST <https://debitllama/api/v1/items/89f41c73-7626-4e00-8090-1d91c83c3565&#x20>;

Body:

```typescript
{
    type: "delete" | "redirect",
    value: string | boolean
}
```

You must specify if you want to delete the item or update the redirect link using type and set the value you want to add.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://debitllama.gitbook.io/debitllama/rest-api-v1/api-v1-items-slug.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
