# 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 ## OpenAPI Specification ```yaml openapi: 3.1.1 info: title: Get item in entrypoint version: endpoint_lineItem.GetItem paths: /LineItem/{lineItemId}: get: operationId: get-item summary: Get item in entrypoint description: 'Gets an item by ID. ' tags: - - subpackage_lineItem parameters: - name: lineItemId in: path description: ID for the line item (also known as a product, service, or item). required: true schema: type: integer - name: requestToken in: header required: true schema: type: string responses: '200': description: Success content: application/json: schema: $ref: '#/components/schemas/type_:LineItemQueryRecord' '400': description: Bad request/ invalid data content: {} '401': description: Unauthorized request. content: {} '500': description: Internal API Error content: {} '503': description: Database connection error content: {} components: schemas: type_:CreatedAt: type: string format: date-time type_:ItemCommodityCode: type: string type_:ItemDescription: type: string type_:ItemProductCode: type: string type_:ItemProductName: type: string type_:ItemUnitofMeasure: type: string type_:LastModified: type: string format: date-time type_:PageIdentifier: type: string type_:OrgParentName: type: string type_:Dbaname: type: string type_:Entrypointfield: type: string type_:Legalname: type: string type_:LineItemQueryRecord: type: object properties: createdAt: $ref: '#/components/schemas/type_:CreatedAt' description: Timestamp of when line item was created, in UTC. id: type: integer format: int64 description: Identifier of line item. itemCategories: type: array items: type: string description: Array of tags classifying item or product. itemCommodityCode: $ref: '#/components/schemas/type_:ItemCommodityCode' itemCost: type: number format: double description: Item or product price per unit. itemDescription: $ref: '#/components/schemas/type_:ItemDescription' itemMode: type: integer description: >- Internal class of item or product: value '0' is only for invoices , '1' for bills, and '2' common for both. itemProductCode: $ref: '#/components/schemas/type_:ItemProductCode' itemProductName: $ref: '#/components/schemas/type_:ItemProductName' itemQty: type: integer description: Quantity of item or product. itemUnitOfMeasure: $ref: '#/components/schemas/type_:ItemUnitofMeasure' lastUpdated: $ref: '#/components/schemas/type_:LastModified' description: Timestamp of when the line item was updated, in UTC. pageidentifier: $ref: '#/components/schemas/type_:PageIdentifier' ParentOrgName: $ref: '#/components/schemas/type_:OrgParentName' description: The name of the paypoint's parent organization. PaypointDbaname: $ref: '#/components/schemas/type_:Dbaname' description: The paypoint's DBA name. PaypointEntryname: $ref: '#/components/schemas/type_:Entrypointfield' description: The paypoint's entryname (entrypoint) value. PaypointLegalname: $ref: '#/components/schemas/type_:Legalname' description: The paypoint's legal name. required: - itemCost - itemQty ``` ## SDK Code Examples ```python GetItem from payabli import payabli client = payabli( api_key="YOUR_API_KEY", ) client.line_item.get_item( line_item_id=700, ) ``` ```typescript GetItem import { PayabliClient } from "@payabli/sdk-node"; const client = new PayabliClient({ apiKey: "YOUR_API_KEY" }); await client.lineItem.getItem(700); ``` ```go GetItem import ( context "context" option "github.com/payabli/sdk-go/option" sdkgoclient "github.com/payabli/sdk-go/client" ) client := sdkgoclient.NewClient( option.WithApiKey( "", ), ) response, err := client.LineItem.GetItem( context.TODO(), 700, ) ``` ```csharp GetItem using PayabliApi; var client = new PayabliApiClient("API_KEY"); await client.LineItem.GetItemAsync(700); ``` ```ruby GetItem require 'uri' require 'net/http' url = URI("https://api-sandbox.payabli.com/api/LineItem/700") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Get.new(url) request["requestToken"] = '' response = http.request(request) puts response.read_body ``` ```java GetItem HttpResponse response = Unirest.get("https://api-sandbox.payabli.com/api/LineItem/700") .header("requestToken", "") .asString(); ``` ```php GetItem request('GET', 'https://api-sandbox.payabli.com/api/LineItem/700', [ 'headers' => [ 'requestToken' => '', ], ]); echo $response->getBody(); ``` ```swift GetItem import Foundation let headers = ["requestToken": ""] 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() ```