> This is Payabli documentation. For a complete page index, fetch https://docs.payabli.com/llms.txt — append .md to any page URL for lightweight markdown. For section-level indexes, query parameters, and other AI-optimized access methods, see https://docs.payabli.com/ai-agents.md

# Get item

GET https://api-sandbox.payabli.com/api/LineItem/{lineItemId}

Gets an item by ID.

Reference: https://docs.payabli.com/developers/api-reference/lineitem/get-item-in-entrypoint

## Authentication

- `Authorization` header (bearer token, required)
- `requestToken` header (required) — Long-lived API token sent in the `requestToken` header. See [API token authentication](/developers/api-tokens).

## Servers

- `https://api-sandbox.payabli.com/api` (Sandbox, default)
- `https://api.payabli.com/api` (Production)

## Request

### Path parameters

- `lineItemId` (integer, required) — ID for the line item (also known as a product, service, or item).

## Response

### 200

Success

- `itemCost` (double, required) — Item or product price per unit.
- `itemQty` (integer, required) — Quantity of item or product.
- `createdAt` (datetime, optional) — Timestamp of when line item was created, in UTC.
- `id` (long, optional) — Identifier of line item.
- `itemCategories` (list of string, optional) — Array of tags classifying item or product.
- `itemCommodityCode` (string, optional) — Item or product commodity code. Max length of 250 characters.
- `itemDescription` (string, optional) — Item or product description. Max length of 250 characters.
- `itemMode` (integer, optional) — Internal class of item or product: value '0' is only for invoices , '1' for bills, and '2' common for both.
- `itemProductCode` (string, optional) — Item or product code. Max length of 250 characters.
- `itemProductName` (string, optional) — Item or product name. Max length of 250 characters.
- `itemUnitOfMeasure` (string, optional) — Unit of measurement. Max length of 100 characters.
- `lastUpdated` (datetime, optional) — Timestamp of when the line item was updated, in UTC.
- `pageidentifier` (string, optional) — Auxiliary validation used internally by payment pages and components.
- `ParentOrgName` (string, optional) — The name of the paypoint's parent organization.
- `PaypointDbaname` (string, optional) — The paypoint's DBA name.
- `PaypointEntryname` (string, optional) — The paypoint's entryname (entrypoint) value.
- `PaypointLegalname` (string, optional) — The paypoint's legal name.

## Examples

**Response**

```json
{
  "itemCost": 5,
  "itemQty": 1,
  "createdAt": "2022-07-01T15:00:01Z",
  "id": 700,
  "itemCategories": [
    "itemCategories"
  ],
  "itemCommodityCode": "010",
  "itemDescription": "Deposit for materials.",
  "itemMode": 0,
  "itemProductCode": "M-DEPOSIT",
  "itemProductName": "Materials deposit",
  "itemUnitOfMeasure": "SqFt",
  "lastUpdated": "2022-07-01T15:00:01Z",
  "pageidentifier": "null",
  "ParentOrgName": "PropertyManager Pro",
  "PaypointDbaname": "Sunshine Gutters",
  "PaypointEntryname": "d193cf9a46",
  "PaypointLegalname": "Sunshine Services, LLC"
}
```

**SDK Code**

```typescript
import { PayabliClient } from "@payabli/sdk-node";

async function main() {
    const client = new PayabliClient({
        clientId: "YOUR_CLIENT_ID",
        clientSecret: "YOUR_CLIENT_SECRET",
    });
    await client.lineItem.getItem(700);
}
main();

```

```python
from payabli import payabli

client = payabli(
    client_id="YOUR_CLIENT_ID",
    client_secret="YOUR_CLIENT_SECRET",
)

client.line_item.get_item(
    line_item_id=700,
)

```

```java
package com.example.usage;

import io.github.payabli.api.PayabliApiClient;

public class Example {
    public static void main(String[] args) {
        PayabliApiClient client = PayabliApiClient.withCredentials("YOUR_CLIENT_ID", "YOUR_CLIENT_SECRET")
            .build()
        ;

        client.lineItem().getItem(700);
    }
}
```

```ruby
require "payabli"

client = Payabli::Client.new(api_key: "YOUR_API_KEY_HERE")

client.line_item.get_item(line_item_id: 700)

```

```csharp
using PayabliApi;
using System.Threading.Tasks;

public partial class Examples
{
    public async Task Example() {
        var client = new PayabliApiClient(
            clientId: "YOUR_CLIENT_ID",
            clientSecret: "YOUR_CLIENT_SECRET"
        );

        await client.LineItem.GetItemAsync(
            700
        );
    }

}

```

```go
package example

import (
    context "context"

    client "github.com/payabli/sdk-go/client"
    option "github.com/payabli/sdk-go/option"
)

func do() {
    client := client.NewClient(
        option.WithClientCredentials(
            "YOUR_CLIENT_ID",
            "YOUR_CLIENT_SECRET",
        ),
    )
    client.LineItem.GetItem(
        context.TODO(),
        700,
    )
}

```

```php
<?php

namespace Example;

use Payabli\PayabliClient;

$client = new PayabliClient(
    clientId: 'YOUR_CLIENT_ID',
    clientSecret: 'YOUR_CLIENT_SECRET',
);
$client->lineItem->getItem(
    700,
);

```

```swift
import Foundation

let headers = ["Authorization": "Bearer <token>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://api-sandbox.payabli.com/api/LineItem/700")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```