> ## Documentation Index
> Fetch the complete documentation index at: https://razorpay-881012b3.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Fetch All Items

> Retrieve all the Items created till date.

<div style={{display:"flex",flexWrap:"wrap",alignItems:"center",gap:"0.35rem 0.9rem",border:"1px solid rgba(128,128,128,0.28)",borderRadius:"0.5rem",padding:"0.45rem 0.75rem",margin:"0 0 1.25rem",fontSize:"0.875rem"}}>
  <span style={{fontWeight:600}}>Available in</span>
  <span>🇮🇳 India</span>
  <span>🇸🇬 Singapore</span>
  <span>🇺🇸 United States</span>
</div>

Use this endpoint to retrieve the details of all the items created till date.

<RequestExample>
  ```bash Curl theme={null}
  curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \
    - X GET https://api.razorpay.com/v1/items/ \
  ```

  ```java Java theme={null}
  RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]");

  JSONObject params = new JSONObject();
  params.put("count","1");

  List<Item> item = razorpay.items.fetchAll(params);
  ```

  ```python Python theme={null}
  import razorpay
  client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET"))

  client.item.all(options)
  ```

  ```ruby Ruby theme={null}
  require "razorpay"
  Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET')

  options = {"count":1}

  Razorpay::Item.all(options)
  ```

  ```go Go theme={null}
  import ( razorpay "github.com/razorpay/razorpay-go" )
  client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET")

  options:= map[string]interface{}{
      "count": 2,
      "skip": 1,
  }
  body, err := client.Item.All(options, nil)
  ```

  ```php PHP theme={null}
  $api = new Api($key_id, $secret);

  $api->Item->all($options);
  ```

  ```javascript Node.js theme={null}
  var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' })

  instance.items.all(options)
  ```

  ```ruby Ruby theme={null}
  require "razorpay"
  Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET')

  options = {"count":2}

  Razorpay::Item.all(options)
  ```

  ```csharp .NET theme={null}
  RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]");

  Dictionary<string, object> itemRequest = new Dictionary<string, object>();
  itemRequest.Add("count","1");

  List<Item> item = client.Item.All();
  ```

  ```bash CLI theme={null}
  razorpay invoices items list --count 10 --skip 0 --active 1
  ```
</RequestExample>

<ResponseExample>
  ```json Success theme={null}
  {
    "entity": "collection",
    "count": 2,
    "items": [
      {
        "id": "item_JInaSLODeDUQiQ",
        "active": true,
        "name": "Book / English August",
        "description": "An indian story, Booker prize winner.",
        "amount": 20000,
        "unit_amount": 20000,
        "currency": "INR",
        "type": "invoice",
        "unit": null,
        "tax_inclusive": false,
        "hsn_code": null,
        "sac_code": null,
        "tax_rate": null,
        "tax_id": null,
        "tax_group_id": null,
        "created_at": 1649843796
      },
      {
        "id": "item_JIPSg5L06yhHie",
        "active": false,
        "name": "Book / Ignited Minds - Updated name!",
        "description": "New descirption too. :).",
        "amount": 20000,
        "unit_amount": 20000,
        "currency": "INR",
        "type": "invoice",
        "unit": null,
        "tax_inclusive": false,
        "hsn_code": null,
        "sac_code": null,
        "tax_rate": null,
        "tax_id": null,
        "tax_group_id": null,
        "created_at": 1649758835
      }
    ]
  }
  ```

  ```json Failure theme={null}
  {
    "error": {
      "code": "BAD_REQUEST_ERROR",
      "description": "The api key provided is invalid",
      "source": "NA",
      "step": "NA",
      "reason": "NA",
      "metadata": {}
    }
  }
  ```
</ResponseExample>

## Query Parameters

<ParamField query="from" type="integer">
  Unix timestamp, in seconds, from when the items are to be fetched.
</ParamField>

<ParamField query="to" type="integer">
  Unix timestamp, in seconds, till when the items are to be fetched.
</ParamField>

<ParamField query="count" type="integer">
  Number of items to be fetched.

  * Default value: `10`
  * Maximum value: `100`
  * This can be used for pagination, in combination with the `skip` parameter.
</ParamField>

<ParamField query="skip" type="integer">
  Number of records to be skipped while fetching the items.
</ParamField>

<ParamField query="active" type="integer">
  Fetches number of active or inactive items.

  * The value is `1` for active items.
  * The value is `0` for inactive items.
</ParamField>

## Response Parameters

<ResponseField name="id" type="string">
  The unique identifier of the item.
</ResponseField>

<ResponseField name="active" type="boolean">
  Indicates the status of the item. Possible values:

  * `true` (default): Item is in the active state.
  * `false`: Item is in the inactive state.
</ResponseField>

<ResponseField name="name" type="string">
  The name of the item.
</ResponseField>

<ResponseField name="description" type="string">
  A text description about the item.
</ResponseField>

<ResponseField name="amount" type="integer">
  The price of the item.
</ResponseField>

<ResponseField name="unit_amount" type="integer">
  The per unit billing amount for each individual unit.
</ResponseField>

<ResponseField name="currency" type="string">
  The currency in which the amount should be charged. Check the list of [supported currencies](/docs/payments/international-payments#supported-currencies).
</ResponseField>

<ResponseField name="type" type="string">
  Here, it must be `invoice`.
</ResponseField>

<ResponseField name="unit" type="integer">
  The number of units of the item billed in the invoice.
</ResponseField>

<ResponseField name="tax_inclusive" type="boolean">
  Indicates whether the base amount includes tax.

  * `true`: The base amount includes tax.
  * `false`: The base amount does not include tax. By default, the value is set to `false`.
</ResponseField>

<ResponseField name="hsn_code" type="integer">
  The 8-digit code used to classify the product as per the Harmonised System of Nomenclature.
</ResponseField>

<ResponseField name="sac_code" type="integer">
  The 6-digit code used to classify the service as per the Services Accounting Code.
</ResponseField>

<ResponseField name="tax_rate" type="string">
  The percentage at which an individual or a corporation is taxed.
</ResponseField>

<ResponseField name="tax_id" type="string">
  The identification number that gets displayed on invoices issued to the customer.
</ResponseField>

<ResponseField name="tax_group_id" type="string">
  The identification number for the tax group. A tax group is a collection of taxes that can be applied as a single set of rules.
</ResponseField>

<ResponseField name="created_at" type="integer">
  Unix timestamp, at which the item was created. For example, `1649843796`.
</ResponseField>

## Errors

<AccordionGroup>
  <Accordion
    title="The API `<key/secret>
` provided is invalid."
  >
    **Code:** `4xx`

    The API credentials passed in the API call differ from the ones generated on the Dashboard.

    * Different keys for test mode and live modes.
    * Expired API key.

    **Solution:** The API keys must be active and entered correctly with no whitespace before or after the keys.
  </Accordion>

  <Accordion title="count must be an integer between 1 and 100.">
    **Code:** `400`

    An invalid value was passed for the `count` query parameter. The API returns `The count must be at least 1.` (for `count=0` or negative), `The count may not be greater than 100.` (for values above 100), or `The count must be an integer.` (for non-integer values).

    **Solution:** Pass `count` as a positive integer between 1 and 100.
  </Accordion>

  <Accordion title="skip must be a non-negative integer.">
    **Code:** `400`

    A negative or non-integer value was passed for the `skip` query parameter.

    **Solution:** Pass `skip` as a non-negative integer (0 or higher).
  </Accordion>

  <Accordion title="from and to must be UNIX-epoch integers.">
    **Code:** `400`

    A non-integer value (for example a human-readable date like `2024-01-01`) was passed for `from` or `to`.

    **Solution:** Pass `from` and `to` as UNIX-epoch integers in seconds.
  </Accordion>

  <Accordion title="The active field must be true or false.">
    **Code:** `400`

    A non-boolean value was passed for the `active` query parameter. The accepted values are `1` (active items) or `0` (inactive items).

    **Solution:** Pass `active` as `1` or `0`.
  </Accordion>

  <Accordion title="{any extra field} is/are not required and should not be sent.">
    **Code:** `400`

    A query parameter that is not part of the Items list schema was passed (for example `name`, which is not a documented filter). The API echoes the rejected field name.

    **Solution:** Only pass documented query parameters: `from`, `to`, `count`, `skip`, `active`.
  </Accordion>
</AccordionGroup>
