### GET /v1/products Source: https://docs.light.inc/openapi-public.json Returns a list of products ```markdown ### Parameters - **sort** (string, query, optional) (example: "amount:desc,createdAt:asc") - **filter** (string, query, optional) (example: "state:in:IN_DRAFT|SCHEDULED|PAID,amount:gte:500,vendorId:ne:null") - **limit** (integer (int32), query, optional): Maximum number of items to return. Default is 50, maximum is 200. - **offset** (integer (int64), query, optional): Number of items to skip before starting to collect the result set. Deprecated, use 'cursor' instead. - **cursor** (string, query, optional): The cursor position to start returning results from. To opt-in into cursor-based pagination, provide `0` for the initial request. For subsequent requests, use `nextCursor` and `prevCursor` from the previous response to navigate. Cursor values are opaque and should not be constructed manually. ### Responses #### default - default response **ExternalPaginatedResponseV1ModelExternalProductV1Model** - **records** (array (ExternalProductV1Model)): List of records for the current page Array items: - **id** (string (uuid)): Unique identifier for the object - **companyId** (string (uuid)): ID of the company - **name** (string): Name of the product - **pricingType** (string (FIXED|PACKAGE)): Pricing type of the product - `FIXED` - The product has a single price per unit - `PACKAGE` - The product is sold in packages with a fixed quantity ⚠️ This enum is not exhaustive; new values may be added in the future. ("FIXED"|"PACKAGE") - **billingRecurrence** (string (ONE_TIME|MONTHLY|QUARTERLY|HALF_YEARLY|YEARLY)): Billing frequency for the product. Used in contracts - `ONE_TIME` - The product is billed once - `MONTHLY` - The product is billed every month - `QUARTERLY` - The product is billed every three months - `HALF_YEARLY` - The product is billed every six months - `YEARLY` - The product is billed every year ⚠️ This enum is not exhaustive; new values may be added in the future. ("ONE_TIME"|"MONTHLY"|"QUARTERLY"|"HALF_YEARLY"|"YEARLY") - **pricings** (array (ExternalProductPricingV1Model)): List of product price per currency Array items: - **currency** (string) (example: "USD") - **amount** (integer (int64)): Price in cents - **state** (string (ACTIVE|ARCHIVED)): Product state - `ACTIVE` - The product is active and can be used in invoices and contracts - `ARCHIVED` - The product is archived and cannot be used in new invoices or contracts ⚠️ This enum is not exhaustive; new values may be added in the future. ("ACTIVE"|"ARCHIVED") - **defaultTaxId** (string (uuid)): ID of the default tax code for this product. Will be assigned to invoice lines when creating a line with this product - **defaultAvataxCode** (string): Default Avalara tax code. Used when the invoice tax engine is `AVATAX`. Will be assigned to invoice lines when creating a line with this product - **defaultLedgerAccountId** (string (uuid)): ID of the default ledger account for this product. Will be assigned to invoice lines when creating a line with this product - **externalSource** (object): The external system where this product was synced from - **name** (string (CHARGEBEE|HUBSPOT|SALESFORCE|STRIPE)): The name of the external source - `CHARGEBEE` - Data synced from Chargebee - `HUBSPOT` - Data synced from HubSpot - `SALESFORCE` - Data synced from Salesforce - `STRIPE` - Data synced from Stripe ⚠️ This enum is not exhaustive; new values may be added in the future. ("CHARGEBEE"|"HUBSPOT"|"SALESFORCE"|"STRIPE") - **externalId** (string): The ID of the object in the external source system - **createdAt** (string (date-time)): Timestamp when the product was created - **updatedAt** (string (date-time)): Timestamp when the product was last updated - **customProperties** (array (ExternalCustomPropertyV1Model)): List of custom properties associated with the product Array items: - **groupId** (string (uuid)): ID of the custom property group - **groupInternalName** (string): Internal name of the custom property group - **values** (array (ExternalCustomPropertyValueV1Model)): List of values. Note that this will be a single value unless the group input type supports multiple values Array items: - **id** (string (uuid)): Unique identifier for the object - **groupId** (string (uuid)): ID of the custom property group - **groupInternalName** (string): Internal name of the custom property group - **companyId** (string (uuid)): ID of the company - **internalName** (string): Internal name of the custom property value - **label** (string): Label of the custom property value - **context** (string): Context/description of the custom property value - **createdAt** (string (date-time)): Timestamp when the custom property value was created - **updatedAt** (string (date-time)): Timestamp when the custom property value was last updated - **hasMore** (boolean): Boolean flag indicating if there are more records available - **total** (integer (int64)): Total number of records (only for offset pagination). This field is not guaranteed to be returned and only available for offset pagination, please do not rely on it and migrate to cursor pagination. - **nextCursor** (string): Cursor for fetching the next page (only for cursor pagination) - **prevCursor** (string): Cursor for fetching the previous page (only for cursor pagination) ### Example Usage ```bash curl -X GET "https://api.example.com/v1/products?sort=amount:desc,createdAt:asc&filter=state:in:IN_DRAFT|SCHEDULED|PAID,amount:gte:500,vendorId:ne:null&limit=0&offset=0&cursor=string" ``` ``` -------------------------------- ### GET /v1/products/{productId} Source: https://docs.light.inc/openapi-public.json Returns a product by ID ```markdown ### Parameters - **productId** (string (uuid), path, required) ### Responses #### default - default response **ExternalProductV1Model** - **id** (string (uuid)): Unique identifier for the object - **companyId** (string (uuid)): ID of the company - **name** (string): Name of the product - **pricingType** (string (FIXED|PACKAGE)): Pricing type of the product - `FIXED` - The product has a single price per unit - `PACKAGE` - The product is sold in packages with a fixed quantity ⚠️ This enum is not exhaustive; new values may be added in the future. ("FIXED"|"PACKAGE") - **billingRecurrence** (string (ONE_TIME|MONTHLY|QUARTERLY|HALF_YEARLY|YEARLY)): Billing frequency for the product. Used in contracts - `ONE_TIME` - The product is billed once - `MONTHLY` - The product is billed every month - `QUARTERLY` - The product is billed every three months - `HALF_YEARLY` - The product is billed every six months - `YEARLY` - The product is billed every year ⚠️ This enum is not exhaustive; new values may be added in the future. ("ONE_TIME"|"MONTHLY"|"QUARTERLY"|"HALF_YEARLY"|"YEARLY") - **pricings** (array (ExternalProductPricingV1Model)): List of product price per currency Array items: - **currency** (string) (example: "USD") - **amount** (integer (int64)): Price in cents - **state** (string (ACTIVE|ARCHIVED)): Product state - `ACTIVE` - The product is active and can be used in invoices and contracts - `ARCHIVED` - The product is archived and cannot be used in new invoices or contracts ⚠️ This enum is not exhaustive; new values may be added in the future. ("ACTIVE"|"ARCHIVED") - **defaultTaxId** (string (uuid)): ID of the default tax code for this product. Will be assigned to invoice lines when creating a line with this product - **defaultAvataxCode** (string): Default Avalara tax code. Used when the invoice tax engine is `AVATAX`. Will be assigned to invoice lines when creating a line with this product - **defaultLedgerAccountId** (string (uuid)): ID of the default ledger account for this product. Will be assigned to invoice lines when creating a line with this product - **externalSource** (object): The external system where this product was synced from - **name** (string (CHARGEBEE|HUBSPOT|SALESFORCE|STRIPE)): The name of the external source - `CHARGEBEE` - Data synced from Chargebee - `HUBSPOT` - Data synced from HubSpot - `SALESFORCE` - Data synced from Salesforce - `STRIPE` - Data synced from Stripe ⚠️ This enum is not exhaustive; new values may be added in the future. ("CHARGEBEE"|"HUBSPOT"|"SALESFORCE"|"STRIPE") - **externalId** (string): The ID of the object in the external source system - **createdAt** (string (date-time)): Timestamp when the product was created - **updatedAt** (string (date-time)): Timestamp when the product was last updated - **customProperties** (array (ExternalCustomPropertyV1Model)): List of custom properties associated with the product Array items: - **groupId** (string (uuid)): ID of the custom property group - **groupInternalName** (string): Internal name of the custom property group - **values** (array (ExternalCustomPropertyValueV1Model)): List of values. Note that this will be a single value unless the group input type supports multiple values Array items: - **id** (string (uuid)): Unique identifier for the object - **groupId** (string (uuid)): ID of the custom property group - **groupInternalName** (string): Internal name of the custom property group - **companyId** (string (uuid)): ID of the company - **internalName** (string): Internal name of the custom property value - **label** (string): Label of the custom property value - **context** (string): Context/description of the custom property value - **createdAt** (string (date-time)): Timestamp when the custom property value was created - **updatedAt** (string (date-time)): Timestamp when the custom property value was last updated ### Example Usage ```bash curl -X GET "https://api.example.com/v1/products/{productId}" ``` ``` -------------------------------- ### GET /v1/customers Source: https://docs.light.inc/openapi-public.json Returns a paginated list of customers ```markdown ### Parameters - **sort** (string, query, optional) (example: "amount:desc,createdAt:asc") - **filter** (string, query, optional) (example: "state:in:IN_DRAFT|SCHEDULED|PAID,amount:gte:500,vendorId:ne:null") - **searchTerm** (string, query, optional): Search term to filter results by. Performs a case-insensitive partial match across searchable fields. - **limit** (integer (int32), query, optional): Maximum number of items to return. Default is 50, maximum is 200. - **offset** (integer (int64), query, optional): Number of items to skip before starting to collect the result set. Deprecated, use 'cursor' instead. - **cursor** (string, query, optional): The cursor position to start returning results from. To opt-in into cursor-based pagination, provide `0` for the initial request. For subsequent requests, use `nextCursor` and `prevCursor` from the previous response to navigate. Cursor values are opaque and should not be constructed manually. ### Responses #### default - default response **ExternalPaginatedResponseV1ModelExternalCustomerV1Model** - **records** (array (ExternalCustomerV1Model)): List of records for the current page Array items: - **id** (string (uuid)): Unique identifier for the object - **name** (string): Name of the customer - **email** (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"SY"|"SZ"|"TA"|"TC"|"TD"|"TF"|"TG"|"TH"|"TJ"|"TK"|"TL"|"TM"|"TN"|"TO"|"TP"|"TR"|"TT"|"TV"|"TW"|"TZ"|"UA"|"UG"|"UK"|"UM"|"US"|"UY"|"UZ"|"VA"|"VC"|"VE"|"VG"|"VI"|"VN"|"VU"|"WF"|"WS"|"XI"|"XU"|"XK"|"YE"|"YT"|"YU"|"ZA"|"ZM"|"ZR"|"ZW") - **city** (string) - **state** (string) - **zipcode** (string) - **street** (string) - **street2** (string) - **billingAddress** (object) - **shippingAddress** (object) - **status** (string (ACTIVE|ARCHIVED)): Current status of the customer - `ACTIVE` - The customer is active and can be used in invoices and contracts - `ARCHIVED` - The customer is archived and cannot be used in new invoices or contracts ⚠️ This enum is not exhaustive; new values may be added in the future. ("ACTIVE"|"ARCHIVED") - **description** (string): Description or notes about the customer - **vatNumber** (string): VAT number of the customer - **businessRegistrationNumber** (string): Business registration number of the customer - **easCode** (string): Electronic Address Scheme code used for sending e-invoices - **einvoiceAddress** (string): E-invoice address for the customer - **einvoiceNetwork** (string (MYDATA|NEMHANDEL|PEPPOL|PORTUGUESE_TAX_REPORTING|SDI)): E-invoice network the customer is registered on - `MYDATA` - Greece myDATA e-invoice network - `NEMHANDEL` - NemHandel e-invoice network - `PEPPOL` - Peppol e-invoice network - `PORTUGUESE_TAX_REPORTING` - Portuguese tax reporting (ATCUD) e-invoice network - `SDI` - SDI (Sistema di Interscambio) e-invoice network ⚠️ This enum is not exhaustive; new values may be added in the future. ("MYDATA"|"NEMHANDEL"|"PEPPOL"|"PORTUGUESE_TAX_REPORTING"|"SDI") - **type** (string (BUSINESS|CONSUMER|GOVERNMENT)): Type of customer - `BUSINESS` - Business customer - `CONSUMER` - Consumer customer - `GOVERNMENT` - Government customer ⚠️ This enum is not exhaustive; new values may be added in the future. ("BUSINESS"|"CONSUMER"|"GOVERNMENT") - **logoUrl** (string): URL to the customer's logo - **domain** (string): Domain of the customer's website - **externalSource** (object): The external system where this product was synced from - **name** (string (CHARGEBEE|HUBSPOT|SALESFORCE|STRIPE)): The name of the external source - `CHARGEBEE` - Data synced from Chargebee - `HUBSPOT` - Data synced from HubSpot - `SALESFORCE` - Data synced from Salesforce - `STRIPE` - Data synced from Stripe ⚠️ This enum is not exhaustive; new values may be added in the future. ("CHARGEBEE"|"HUBSPOT"|"SALESFORCE"|"STRIPE") - **externalId** (string): The ID of the object in the external source system - **createdAt** (string (date-time)): Timestamp when the customer was created - **updatedAt** (string (date-time)): Timestamp when the customer was last updated - **customProperties** (array (ExternalCustomPropertyV1Model)): List of custom properties associated with the customer Array items: - **groupId** (string (uuid)): ID of the custom property group - **groupInternalName** (string): Internal name of the custom property group - **values** (array (ExternalCustomPropertyValueV1Model)): List of values. Note that this will be a single value unless the group input type supports multiple values Array items: - **id** (string (uuid)): Unique identifier for the object - **groupId** (string (uuid)): ID of the custom property group - **groupInternalName** (string): Internal name of the custom property group - **companyId** (string (uuid)): ID of the company - **internalName** (string): Internal name of the custom property value - **label** (string): Label of the custom property value - **context** (string): Context/description of the custom property value - **createdAt** (string (date-time)): Timestamp when the custom property value was created - **updatedAt** (string (date-time)): Timestamp when the custom property value was last updated - **hasMore** (boolean): Boolean flag indicating if there are more records available - **total** (integer (int64)): Total number of records (only for offset pagination). This field is not guaranteed to be returned and only available for offset pagination, please do not rely on it and migrate to cursor pagination. - **nextCursor** (string): Cursor for fetching the next page (only for cursor pagination) - **prevCursor** (string): Cursor for fetching the previous page (only for cursor pagination) ### Example Usage ```bash curl -X GET "https://api.example.com/v1/customers?sort=amount:desc,createdAt:asc&filter=state:in:IN_DRAFT|SCHEDULED|PAID,amount:gte:500,vendorId:ne:null&searchTerm=string&limit=0&offset=0&cursor=string" ``` ``` -------------------------------- ### GET /v1/contracts Source: https://docs.light.inc/openapi-public.json Returns a paginated list of contracts ```markdown ### Parameters - **sort** (string, query, optional) (example: "amount:desc,createdAt:asc") - **filter** (string, query, optional) (example: "state:in:IN_DRAFT|SCHEDULED|PAID,amount:gte:500,vendorId:ne:null") - **limit** (integer (int32), query, optional): Maximum number of items to return. Default is 50, maximum is 200. - **offset** (integer (int64), query, optional): Number of items to skip before starting to collect the result set. Deprecated, use 'cursor' instead. - **cursor** (string, query, optional): The cursor position to start returning results from. To opt-in into cursor-based pagination, provide `0` for the initial request. For subsequent requests, use `nextCursor` and `prevCursor` from the previous response to navigate. Cursor values are opaque and should not be constructed manually. ### Responses #### default - default response **ExternalPaginatedResponseV1ModelExternalContractV1Model** - **records** (array (ExternalContractV1Model)): List of records for the current page Array items: - **id** (string (uuid)): Unique identifier for the object - **companyId** (string (uuid)): ID of the company - **startDate** (string (date)): Contract start date - **endDate** (string (date)): Contract end date - **activatedAt** (string (date-time)): Timestamp when the contract was activated/published - **terminatedAt** (string (date-time)): Timestamp when the contract was terminated - **terminationReason** (string): Reason for contract termination - **renewalDate** (string (date)): Date when the contract should be renewed - **companyEntityId** (string (uuid)): ID of the entity - **invoiceTemplateId** (string (uuid)): ID of the invoice template to use for generating invoices - **currency** (string) (example: "USD") - **estimatedAmount** (integer (int64)): Estimated total amount for the contract in cents - **paymentType** (string (AIRWALLEX|BANK_TRANSFER|DIRECT_DEBIT|STRIPE)): Payment type for invoices generated from this contract - `AIRWALLEX` - Payment via Airwallex. A payment link will be displayed on the invoice - `BANK_TRANSFER` - Payment via bank transfer. Bank information will be displayed on the invoice - `DIRECT_DEBIT` - Payment via direct debit. A notice that the amount will be collected automatically will be displayed on the invoice - `STRIPE` - Payment via Stripe. A payment link will be sent to the customer ⚠️ This enum is not exhaustive; new values may be added in the future. ("AIRWALLEX"|"BANK_TRANSFER"|"DIRECT_DEBIT"|"STRIPE") - **payeeBankAccountId** (string (uuid)): ID of the bank account where payments should be sent - **billingStart** (string (date)): Date when billing should start for this contract - **netTerms** (integer (int32)): Number of days from invoice date to when payment is due - **invoiceLeadDays** (integer (int32)): Number of days before billing period start to date the invoice - **description** (string): Description of the contract - **customerId** (string (uuid)): ID of the customer - **state** (string (CREATED|DRAFT|ACTIVE|PENDING_TERMINATION|TERMINATED)): Current state of the contract - `CREATED` - Contract has been created - `DRAFT` - Contract is in draft state and can be edited - `ACTIVE` - Contract is active and generating invoices - `PENDING_TERMINATION` - Contract has a scheduled termination - `TERMINATED` - Contract has been terminated ⚠️ This enum is not exhaustive; new values may be added in the future. ("CREATED"|"DRAFT"|"ACTIVE"|"PENDING_TERMINATION"|"TERMINATED") - **areLinesWithTax** (boolean): Whether invoice line amounts include tax or tax is added on top - **lines** (array (ExternalContractLineV1Model)): List of contract line items. Only returned when fetching a single contract by ID Array items: - **id** (string (uuid)): Unique identifier for the object - **companyId** (string (uuid)): ID of the company - **contractId** (string (uuid)): ID of the contract this line belongs to - **productId** (string (uuid)): ID of the product - **billingStart** (string (date)): Date when billing starts for this line - **billingEnd** (string (date)): Date when billing ends for this line - **billingRecurrence** (string (ONE_TIME|MONTHLY|QUARTERLY|HALF_YEARLY|YEARLY)): Billing frequency for this line - `ONE_TIME` - The product is billed once - `MONTHLY` - The product is billed every month - `QUARTERLY` - The product is billed every three months - `HALF_YEARLY` - The product is billed every six months - `YEARLY` - The product is billed every year ⚠️ This enum is not exhaustive; new values may be added in the future. ("ONE_TIME"|"MONTHLY"|"QUARTERLY"|"HALF_YEARLY"|"YEARLY") - **accountId** (string (uuid)): ID of the account for bookkeeping - **taxCodeId** (string (uuid)): ID of the tax code - **avataxCode** (string): Avalara tax code - **discount** (object): Discount to apply to this line (can be percentage or amount-based) - **startDate** (string (date)) - **endDate** (string (date)) - **type** (string (PERCENTAGE|AMOUNT)): ⚠️ This enum is not exhaustive; new values may be added in the future. ("PERCENTAGE"|"AMOUNT") - **quantity** (number): Quantity of the product - **priceOverwrite** (integer (int64)): Custom price override in cents - **productNameOverwrite** (string): Custom product name override - **amortizationTemplateId** (string (uuid)): ID of the amortization template - **amortizationStartDate** (string (date)): Start date for amortization - **amortizationEndDate** (string (date)): End date for amortization - **aiValueSuggestions** (array (ExternalAiValueSuggestionV1Model)): AI-generated suggestions for this line Array items: - **field** (string) - **fieldValues** (array (string)) - **reasoning** (string) - **customProperties** (array (ExternalCustomPropertyV1Model)): List of custom properties associated with the line Array items: - **groupId** (string (uuid)): ID of the custom property group - **groupInternalName** (string): Internal name of the custom property group - **values** (array (ExternalCustomPropertyValueV1Model)): List of values. Note that this will be a single value unless the group input type supports multiple values Array items: - **id** (string (uuid)): Unique identifier for the object - **groupId** (string (uuid)): ID of the custom property group - **groupInternalName** (string): Internal name of the custom property group - **companyId** (string (uuid)): ID of the company - **internalName** (string): Internal name of the custom property value - **label** (string): Label of the custom property value - **context** (string): Context/description of the custom property value - **createdAt** (string (date-time)): Timestamp when the custom property value was created - **updatedAt** (string (date-time)): Timestamp when the custom property value was last updated - **createdAt** (string (date-time)): Timestamp when the line was created - **updatedAt** (string (date-time)): Timestamp when the line was last updated - **taxEngineName** (string (AVATAX|LIGHT|SPHERE)): Name of the tax engine to be used - `AVATAX` - Avalara AvaTax will be used for tax calculations - `LIGHT` - Light built-in tax engine will be used for tax calculations - `SPHERE` - Sphere tax engine will be used for tax calculations ⚠️ This enum is not exhaustive; new values may be added in the future. ("AVATAX"|"LIGHT"|"SPHERE") - **externalId** (string): External identifier from an external system - **externalSource** (string (HUBSPOT|SALESFORCE)): Source system if contract was synced from an external system - `HUBSPOT` - Contract synced from HubSpot - `SALESFORCE` - Contract synced from Salesforce ⚠️ This enum is not exhaustive; new values may be added in the future. ("HUBSPOT"|"SALESFORCE") - **customProperties** (array (ExternalCustomPropertyV1Model)): List of custom properties associated with the contract Array items: - **createdAt** (string (date-time)): Timestamp when the contract was created - **updatedAt** (string (date-time)): Timestamp when the contract was last updated - **hasMore** (boolean): Boolean flag indicating if there are more records available - **total** (integer (int64)): Total number of records (only for offset pagination). This field is not guaranteed to be returned and only available for offset pagination, please do not rely on it and migrate to cursor pagination. - **nextCursor** (string): Cursor for fetching the next page (only for cursor pagination) - **prevCursor** (string): Cursor for fetching the previous page (only for cursor pagination) ### Example Usage ```bash curl -X GET "https://api.example.com/v1/contracts?sort=amount:desc,createdAt:asc&filter=state:in:IN_DRAFT|SCHEDULED|PAID,amount:gte:500,vendorId:ne:null&limit=0&offset=0&cursor=string" ``` ``` -------------------------------- ### GET /oauth/authorize Source: https://docs.light.inc/openapi-public.json Redirects the user to the authorization page to start the OAuth V2 authorization flow ```markdown ### Parameters - **redirect_uri** (string, query, optional) - **state** (string, query, optional) - **client_id** (string, query, optional) ### Responses #### default - default response ### Example Usage ```bash curl -X GET "https://api.example.com/oauth/authorize?redirect_uri=string&state=string&client_id=string" ``` ``` -------------------------------- ### GET /v1/invoice-payables/{invoicePayableId}/line-items/{lineItemId} Source: https://docs.light.inc/openapi-public.json Gets an invoice payable line item ```markdown ### Parameters - **invoicePayableId** (string (uuid), path, required) - **lineItemId** (string (uuid), path, required) ### Responses #### default - default response **ExternalInvoicePayableLineItemV1Model** - **id** (string (uuid)): ID of the invoice payable line item. - **invoicePayableId** (string (uuid)): ID of the invoice payable this line item belongs to. - **type** (string (REIMBURSEMENT|VENDOR_INVOICE)): Type of the invoice payable line item (vendor invoice or reimbursement). ⚠️ This enum is not exhaustive; new values may be added in the future. ("REIMBURSEMENT"|"VENDOR_INVOICE") - **metadata** (object): Metadata for the invoice payable line item (ERP-specific fields and context). - **type** (string (REIMBURSEMENT|VENDOR_INVOICE)): Type of the invoice payable line item (vendor invoice or reimbursement). ⚠️ This enum is not exhaustive; new values may be added in the future. ("REIMBURSEMENT"|"VENDOR_INVOICE") - **amount** (integer (int64)): Amount in cents, including tax. When `lineItemsIncludeTax` is true, `amount` represents the full tax-inclusive amount for this line. - **netAmount** (integer (int64)): Net line amount in cents, excluding tax. When `lineItemsIncludeTax` is false, `netAmount` represents the base amount on which tax is calculated. - **description** (string): Description of this invoice payable line item. - **taxCodeId** (string (uuid)): ID of the tax code applied to this line item. - **taxAmount** (integer (int64)): Tax amount in cents for this line item. - **accountId** (string (uuid)): ID of the ledger account used to book this line item. - **costCenterId** (string (uuid)): ID of the cost center associated with this line item, if applicable. - **amortizationStartDate** (string (date)): Start date for amortization of this line item. - **amortizationEndDate** (string (date)): End date for amortization of this line item. - **amortizationTemplateId** (string (uuid)): ID of the amortization template to use for this line item within Light Ledger. - **customPropertiesOld** (object): Legacy container for custom properties on this line item (deprecated/old format). - **items** (object) - **aiValueSuggestions** (array (ExternalAiValueSuggestionV1Model)): AI-generated suggestions for line item values (e.g. account, cost center, tax code). Array items: - **field** (string) - **fieldValues** (array (string)) - **reasoning** (string) - **customProperties** (array (ExternalCustomPropertyV1Model)): Custom properties set on this invoice payable line item. Array items: - **groupId** (string (uuid)): ID of the custom property group - **groupInternalName** (string): Internal name of the custom property group - **values** (array (ExternalCustomPropertyValueV1Model)): List of values. Note that this will be a single value unless the group input type supports multiple values Array items: - **id** (string (uuid)): Unique identifier for the object - **groupId** (string (uuid)): ID of the custom property group - **groupInternalName** (string): Internal name of the custom property group - **companyId** (string (uuid)): ID of the company - **internalName** (string): Internal name of the custom property value - **label** (string): Label of the custom property value - **context** (string): Context/description of the custom property value - **createdAt** (string (date-time)): Timestamp when the custom property value was created - **updatedAt** (string (date-time)): Timestamp when the custom property value was last updated - **createdAt** (string (date-time)): Timestamp when this invoice payable line item was created. - **updatedAt** (string (date-time)): Timestamp when this invoice payable line item was last updated. ### Example Usage ```bash curl -X GET "https://api.example.com/v1/invoice-payables/{invoicePayableId}/line-items/{lineItemId}" ``` ```