### GET /customers Source: https://docs.light.inc/api-reference/v1--customers/list-customers Retrieves a paginated list of customers from the system. ```APIDOC ## GET /customers ### Description Returns a paginated list of customers. ### Method GET ### Endpoint /customers ``` -------------------------------- ### GET /customer-credits Source: https://docs.light.inc/api-reference/v1--customer-credits/list-customer-credits Retrieves a paginated list of customer credits. ```APIDOC ## GET /customer-credits ### Description Returns a paginated list of customer credits. ### Method GET ### Endpoint /customer-credits ``` -------------------------------- ### GET /expenses Source: https://docs.light.inc/api-reference/v1--expenses/list-expenses Retrieves a paginated list of expenses. ```APIDOC ## GET /expenses ### Description Returns a paginated list of expenses. ### Method GET ### Endpoint /expenses ``` -------------------------------- ### Get Product by ID Source: https://docs.light.inc/api-reference/v1--products/get-product Retrieves a specific product using its unique identifier. ```APIDOC ## GET /v1/products/{productId} ### Description Returns a product by ID. ### Method GET ### Endpoint /v1/products/{productId} ### Parameters #### Path Parameters - **productId** (string) - Required - Unique identifier for the product (UUID format). ### Response #### Success Response (200) - **id** (string) - Unique identifier for the object (UUID format). - **companyId** (string) - ID of the company (UUID format). - **name** (string) - Name of the product. - **pricingType** (string) - Pricing type of the product. Enum: `FIXED`, `PACKAGE`. - **billingRecurrence** (string) - Billing frequency for the product. Enum: `ONE_TIME`, `MONTHLY`, `QUARTERLY`, `HALF_YEARLY`, `YEARLY`. - **pricings** (array) - List of product price per currency. - **state** (string) - Product state. Enum: `ACTIVE`, `ARCHIVED`. - **defaultTaxId** (string) - ID of the default tax code for this product (UUID format), nullable. - **defaultAvataxCode** (string) - Default Avalara tax code, nullable. - **defaultLedgerAccountId** (string) - ID of the default ledger account for this product (UUID format), nullable. - **externalSource** (object) - Information about the external source of the product data. - **createdAt** (string) - Timestamp when the product was created (date-time format). - **updatedAt** (string) - Timestamp when the product was last updated (date-time format). - **customProperties** (array) - List of custom properties associated with the product, nullable. #### Response Example ```json { "id": "a1b2c3d4-e5f6-7890-1234-567890abcdef", "companyId": "f0e9d8c7-b6a5-4321-fedc-ba9876543210", "name": "Example Product", "pricingType": "FIXED", "billingRecurrence": "MONTHLY", "pricings": [ { "currency": "USD", "amount": 10000 } ], "state": "ACTIVE", "defaultTaxId": "11223344-5566-7788-9900-aabbccddeeff", "defaultAvataxCode": "TAX123", "defaultLedgerAccountId": "ffeeddcc-bbaa-9988-7766-554433221100", "externalSource": { "name": "CHARGEBEE" }, "createdAt": "2023-10-27T10:00:00Z", "updatedAt": "2023-10-27T10:00:00Z", "customProperties": [] } ``` ``` -------------------------------- ### Get Product by ID Source: https://docs.light.inc/api-reference/v1--products/get-product Retrieves a specific product's details using its unique identifier. ```APIDOC ## GET /products/{productId} ### Description Returns a product by ID. ### Method GET ### Endpoint /products/{productId} ### Parameters #### Path Parameters - **productId** (string) - Required - The unique identifier of the product to retrieve. ### Response #### Success Response (200) - **id** (string) - The unique identifier of the product. - **name** (string) - The name of the product. - **description** (string) - A detailed description of the product. - **price** (number) - The price of the product. #### Response Example ```json { "id": "prod_123", "name": "Example Product", "description": "This is a sample product.", "price": 19.99 } ``` ``` -------------------------------- ### POST /products Source: https://docs.light.inc/api-reference/v1--products/create-product Creates a new product in the system. ```APIDOC ## POST /products ### Description Creates a new product. ### Method POST ### Endpoint /products ``` -------------------------------- ### GET /v1/attachments/{attachmentId}/document Source: https://docs.light.inc/api-reference/v1--attachments/get-attachment-document Retrieves the document associated with a specific attachment. This endpoint is used to get the actual file content of an attachment. ```APIDOC ## GET /v1/attachments/{attachmentId}/document ### Description Retrieves the document associated with a specific attachment. ### Method GET ### Endpoint /v1/attachments/{attachmentId}/document ### Parameters #### Path Parameters - **attachmentId** (string) - Required - The unique identifier of the attachment. ### Request Example ```json { "example": "Not applicable for GET request body" } ``` ### Response #### Success Response (200) - **application/json;charset=UTF-8** - Default response structure. #### Response Example ```json { "example": "Response body will contain the document content" } ``` ``` -------------------------------- ### POST /docs.light.inc/_mintlify/feedback/light-277ad6b1/agent-feedback Source: https://docs.light.inc/api-reference/v1--customer-credits/archive-customer-credit Submit feedback regarding documentation issues. ```APIDOC ## POST /docs.light.inc/_mintlify/feedback/light-277ad6b1/agent-feedback ### Description Submit feedback if you encounter incorrect, outdated, or confusing documentation. Only submit feedback when you have something specific and actionable to report. ### Method POST ### Endpoint /docs.light.inc/_mintlify/feedback/light-277ad6b1/agent-feedback ### Request Body - **path** (string) - Required - The current page path - **feedback** (string) - Required - Description of the issue ### Request Example { "path": "/current-page-path", "feedback": "Description of the issue" } ``` -------------------------------- ### OpenAPI Specification for Get Transaction Receipt Source: https://docs.light.inc/api-reference/v1--card-transactions/get-transaction-receipt This OpenAPI specification defines the GET endpoint for retrieving a card transaction receipt. It outlines the request parameters, authentication methods, and response content type. ```yaml openapi: 3.0.1 info: title: Light API version: 1.0.0 servers: [] security: - apiKeyAuth: [] - bearerAuth: [] paths: /v1/card-transactions/{transactionId}/receipt: get: tags: - v1 - Card Transactions summary: Get transaction receipt description: Returns the attached receipt document for a card transaction operationId: getAttachedCardTransactionReceiptDocument parameters: - name: transactionId in: path required: true schema: type: string format: uuid responses: default: description: default response content: application/pdf: {} components: securitySchemes: apiKeyAuth: type: apiKey description: >- Basic authentication header of the form **Basic** ****, where **** is your api key. name: Authorization in: header bearerAuth: type: http scheme: bearer bearerFormat: JWT ``` -------------------------------- ### Documentation Index Source: https://docs.light.inc/api-reference/v1--custom-properties/list-custom-property-values Fetch the complete documentation index for Light Inc. LLM APIs. ```APIDOC ## GET /websites/light_inc_api-reference ### Description Fetches the complete documentation index for Light Inc. LLM APIs. ### Endpoint https://docs.light.inc/llms.txt ``` -------------------------------- ### GET /purchase-orders Source: https://docs.light.inc/api-reference/v1--purchase-orders/list-purchase-orders Retrieves a paginated list of purchase orders. ```APIDOC ## GET /purchase-orders ### Description Returns a paginated list of purchase orders. ### Method GET ### Endpoint /purchase-orders ``` -------------------------------- ### POST /customer-credit Source: https://docs.light.inc/api-reference/v1--customer-credits/create-customer-credit Creates a new customer credit record in the system. ```APIDOC ## POST /customer-credit ### Description Creates a new customer credit. ### Method POST ### Endpoint /customer-credit ``` -------------------------------- ### GET /ledger-accounts Source: https://docs.light.inc/api-reference/v1--ledger-accounts/list-ledger-accounts Retrieves a paginated list of ledger accounts. ```APIDOC ## GET /ledger-accounts ### Description Returns a paginated list of ledger accounts. ### Method GET ### Endpoint /ledger-accounts ``` -------------------------------- ### POST /vendors Source: https://docs.light.inc/api-reference/v1--vendors/create-vendor Creates a new vendor in the system. ```APIDOC ## POST /vendors ### Description Creates a new vendor. ### Method POST ### Endpoint /vendors ``` -------------------------------- ### GET /invoice-payables Source: https://docs.light.inc/api-reference/v1--invoice-payables/list-invoice-payables Retrieves a paginated list of invoice payables. ```APIDOC ## GET /invoice-payables ### Description Returns a paginated list of invoice payables. ### Method GET ### Endpoint /invoice-payables ``` -------------------------------- ### POST /v1/users Source: https://docs.light.inc/api-reference/v1--users/create-user This endpoint allows for the creation of a new user within the Light Inc. system. ```APIDOC ## POST /v1/users ### Description Creates a new user. ### Method POST ### Endpoint /v1/users ### Request Body - **firstName** (string) - Required - The first name of the user. - **lastName** (string) - Required - The last name of the user. - **email** (string) - Required - The email address of the user. - **companyEntityId** (string) - Required - The unique identifier for the company. - **phoneNumber** (object) - Required - The phone number details of the user. - **avatarUrl** (string) - Optional - The URL for the user's avatar. - **notificationChannel** (string) - Required - The preferred notification channel (e.g., MS_TEAMS, SLACK, WEB_APP). - **country** (string) - Optional - The country code for the user's location. ### Request Example ```json { "firstName": "John", "lastName": "Doe", "email": "john.doe@example.com", "companyEntityId": "a1b2c3d4-e5f6-7890-1234-567890abcdef", "phoneNumber": { "countryCode": "+1", "number": "555-123-4567" }, "avatarUrl": "https://example.com/avatar.jpg", "notificationChannel": "MS_TEAMS", "country": "US" } ``` ### Response #### Success Response (200) - **id** (string) - The unique identifier for the created user. - **firstName** (string) - The first name of the user. - **lastName** (string) - The last name of the user. - **email** (string) - The email address of the user. - **companyEntityId** (string) - The unique identifier for the company. - **phoneNumber** (object) - The phone number details of the user. - **avatarUrl** (string) - The URL for the user's avatar. - **notificationChannel** (string) - The preferred notification channel. - **country** (string) - The country code for the user's location. - **createdAt** (string) - The timestamp when the user was created. - **updatedAt** (string) - The timestamp when the user was last updated. #### Response Example ```json { "id": "f1e2d3c4-b5a6-7890-1234-567890abcdef", "firstName": "John", "lastName": "Doe", "email": "john.doe@example.com", "companyEntityId": "a1b2c3d4-e5f6-7890-1234-567890abcdef", "phoneNumber": { "countryCode": "+1", "number": "555-123-4567" }, "avatarUrl": "https://example.com/avatar.jpg", "notificationChannel": "MS_TEAMS", "country": "US", "createdAt": "2023-10-27T10:00:00Z", "updatedAt": "2023-10-27T10:00:00Z" } ``` ``` -------------------------------- ### GET /invoices Source: https://docs.light.inc/api-reference/v1--invoice-receivables/list-invoices Retrieves a paginated list of invoice receivables. ```APIDOC ## GET /invoices ### Description Returns a paginated list of invoice receivables. ### Method GET ### Endpoint /invoices ``` -------------------------------- ### POST /v1/customer-credits Source: https://docs.light.inc/api-reference/v1--customer-credits/create-customer-credit Creates a new customer credit record in the system. ```APIDOC ## POST /v1/customer-credits ### Description Creates a new customer credit. ### Method POST ### Endpoint /v1/customer-credits ### Parameters #### Header Parameters - **X-Idempotency-Key** (string) - Optional - Idempotency key for the request. #### Request Body - **companyEntityId** (string, uuid) - Optional - ID of the entity. - **documentNumber** (string) - Optional - Document number. - **description** (string) - Optional - Description of the customer credit. - **currency** (string) - Optional - Currency code (e.g., USD). - **localCurrencyFxRate** (number) - Optional - Custom foreign exchange rate for the ledger's local currency. - **groupCurrencyFxRate** (number) - Optional - Custom foreign exchange rate for the ledger's group currency. - **documentDate** (string, date) - Optional - Date when the customer credit was issued. - **documentTemplateId** (string, uuid) - Optional - ID of the document template. - **areLinesWithTax** (boolean) - Required - Whether the customer credit line amount is inclusive of tax. - **customerId** (string, uuid) - Optional - ID of the customer. - **amount** (integer, int64) - Optional - Total customer credit amount in cents. - **lines** (array) - Optional - List of customer credit line items. - **customProperties** (array) - Optional - List of custom properties. ### Response #### Success Response (200) - **id** (string, uuid) - Unique identifier for the object. - **companyId** (string, uuid) - ID of the company. - **companyEntityId** (string, uuid) - ID of the entity. - **amount** (integer, int64) - Total customer credit amount in cents. - **customerName** (string) - Name of the customer. - **customerId** (string, uuid) - ID of the customer. - **status** (string) - Status of the customer credit (DRAFT, APPROVAL_PENDING, APPROVED, POSTED, PARTIALLY_CLEARED, CLEARED, ARCHIVED). - **description** (string) - Description of the customer credit. - **currency** (string) - Currency code. - **documentDate** (string, date) - Date when the customer credit was issued. ``` -------------------------------- ### Create Product API Source: https://docs.light.inc/api-reference/v1--products/create-product This endpoint allows you to create a new product within the Light Inc. system. It requires product details such as name, pricing type, billing recurrence, and pricing information. ```APIDOC ## POST /v1/products ### Description Creates a new product. ### Method POST ### Endpoint /v1/products ### Parameters #### Header Parameters - **X-Idempotency-Key** (string) - Required - Used to ensure idempotency of the request. #### Request Body - **name** (string) - Required - The name of the product. - **pricingType** (string) - Required - The pricing type of the product. Enum: `FIXED`, `PACKAGE`. - **billingRecurrence** (string) - Required - The billing recurrence for the product. Enum: `ONE_TIME`, `MONTHLY`, `QUARTERLY`, `HALF_YEARLY`, `YEARLY`. - **pricings** (array) - Required - List of product price per currency. - **currencyCode** (string) - Required - Currency code (e.g., "USD"). - **unitPrice** (number) - Required - The price per unit. - **packageQuantity** (integer) - Optional - The quantity of items in a package, if pricingType is `PACKAGE`. - **defaultAvataxCode** (string) - Optional - The default Avatax code for the product. - **defaultTaxId** (string (uuid)) - Optional - The default tax ID for the product. - **defaultLedgerAccountId** (string (uuid)) - Optional - The default ledger account ID for the product. - **customProperties** (array) - Optional - A list of custom properties to set for the product. - **name** (string) - Required - The name of the custom property. - **value** (string) - Required - The value of the custom property. ### Request Example ```json { "name": "Example Product", "pricingType": "FIXED", "billingRecurrence": "MONTHLY", "pricings": [ { "currencyCode": "USD", "unitPrice": 100.00 } ], "defaultAvataxCode": "10-10000", "defaultTaxId": "a1b2c3d4-e5f6-7890-1234-567890abcdef", "defaultLedgerAccountId": "f0e9d8c7-b6a5-4321-fedc-ba9876543210", "customProperties": [ { "name": "InternalCode", "value": "PROD-XYZ" } ] } ``` ### Response #### Success Response (200) - **id** (string (uuid)) - Unique identifier for the product. - **companyId** (string (uuid)) - ID of the company the product belongs to. - **name** (string) - Name of the product. - **pricingType** (string) - Pricing type of the product. Enum: `FIXED`, `PACKAGE`. - **billingRecurrence** (string) - Billing frequency for the product. Enum: `ONE_TIME`, `MONTHLY`, `QUARTERLY`, `HALF_YEARLY`, `YEARLY`. - **pricings** (array) - List of product price per currency. - **currencyCode** (string) - Currency code (e.g., "USD"). - **unitPrice** (number) - The price per unit. - **packageQuantity** (integer) - The quantity of items in a package, if pricingType is `PACKAGE`. - **state** (string) - Product state. Enum: `ACTIVE`, `ARCHIVED`. - **defaultTaxId** (string) - ID of the default tax code for this product. #### Response Example ```json { "id": "123e4567-e89b-12d3-a456-426614174000", "companyId": "abcdef12-3456-7890-abcd-ef1234567890", "name": "Example Product", "pricingType": "FIXED", "billingRecurrence": "MONTHLY", "pricings": [ { "currencyCode": "USD", "unitPrice": 100.00 } ], "state": "ACTIVE", "defaultTaxId": "a1b2c3d4-e5f6-7890-1234-567890abcdef" } ``` ``` -------------------------------- ### POST /_mintlify/feedback/light-277ad6b1/agent-feedback Source: https://docs.light.inc/api-reference/v1--customer-credits/update-customer-credit-line Submit feedback regarding documentation issues. ```APIDOC ## POST /_mintlify/feedback/light-277ad6b1/agent-feedback ### Description Submit feedback for incorrect, outdated, or confusing documentation. ### Method POST ### Endpoint https://docs.light.inc/_mintlify/feedback/light-277ad6b1/agent-feedback ### Request Body - **path** (string) - Required - The current page path. - **feedback** (string) - Required - Description of the issue. ### Request Example { "path": "/current-page-path", "feedback": "Description of the issue" } ``` -------------------------------- ### Get Card by ID Source: https://docs.light.inc/api-reference/v1--cards/get-card Returns a card by its unique identifier. ```APIDOC ## Get card > Returns a card by ID ``` -------------------------------- ### GET /reimbursement-config Source: https://docs.light.inc/api-reference/v1--users/get-reimbursement-config Retrieves the reimbursement configuration settings for a specific user. ```APIDOC ## GET /reimbursement-config ### Description Returns the reimbursement configuration for a user. ### Method GET ### Endpoint /reimbursement-config ``` -------------------------------- ### Error Handling Source: https://docs.light.inc/api-reference/v1--invoice-payables/create-invoice-payable Details on possible errors returned during vendor onboarding. ```APIDOC ## Error Handling ### Description Provides details on potential errors that can occur during vendor onboarding. ### Error Codes - **CONFLICT** - **UNPROCESSABLE_CONTENT** ### Error Structure ```json { "errors": [ { "type": "string", "description": "Details about the specific error." } ] } ``` ### Error Details - **errors** (array) - List of errors providing details about what went wrong. - **items** ($ref: '#/components/schemas/ExternalUiClientExceptionErrorV1Model') - Represents a single error object. ``` -------------------------------- ### GET /v1/ledger-transaction-lines Source: https://docs.light.inc/api-reference/v1--ledger-transactions/list-ledger-transaction-lines Retrieves a paginated list of ledger transaction lines. ```APIDOC ## GET /v1/ledger-transaction-lines ### Description Returns a paginated list of ledger transaction lines. ### Method GET ### Endpoint /v1/ledger-transaction-lines ### Parameters #### Query Parameters - **sort** (string) - Optional - Sort string in the format `field:direction`. Available fields: `accountingDocumentNumber`, `transactionSequenceId`, `documentSequenceId`, `documentType`, `accountCode`, `accountLabel`, `postingDate`, `accountType`, `taxTagLabel`, `transactionAmount`, `transactionCurrency`, `localAmount`, `localCurrency`, `groupAmount`, `groupCurrency`, `createdAt`. - **filter** (string) - Optional - Filter string in the format `field:operator:value`. Available operators: `eq`, `ne`, `in`, `not_in`, `gt`, `gte`, `lt`, `lte`. - **limit** (integer) - Optional - Maximum number of items to return. Default is 50, maximum is 200. - **offset** (integer) - Optional - Number of items to skip before starting to collect the result set. (Deprecated) - **cursor** (string) - Optional - The cursor position to start returning results from. - **includeCustomProperties** (boolean) - Optional - Include custom properties in the response. - **includeMaxLineAmount** (boolean) - Optional - If true, includes the maximum line amount in the response. (Deprecated) ### Response #### Success Response (200) - **maxTransactionAmount** (integer) - Maximum line amount in transaction currency across all records. (Deprecated) - **records** (array) - List of records for the current page. - **hasMore** (boolean) - Boolean flag indicating if there are more records available. - **total** (integer) - Total number of records (only for offset pagination). ``` -------------------------------- ### Documentation Index Source: https://docs.light.inc/api-reference/v1--cards/get-card Fetch the complete documentation index to discover all available API pages. ```APIDOC ## Documentation Index Fetch the complete documentation index at: https://docs.light.inc/llms.txt Use this file to discover all available pages before exploring further. ``` -------------------------------- ### GET /v1/invoice-approval Source: https://docs.light.inc/api-reference/v1--invoice-approvals/get-invoice-approvals Retrieves approval records for specified invoice payables. ```APIDOC ## GET /v1/invoice-approval ### Description Returns approval records for specified invoice payables. ### Method GET ### Endpoint /v1/invoice-approval ### Parameters #### Query Parameters - **invoicePayableId** (array of uuid) - Optional - List of invoice payable IDs to filter by. #### Request Body - **roles** (array of string) - Optional - List of roles for the principal. - **name** (string) - Optional - Name of the principal. ### Response #### Success Response (200) - **Array of ExternalInvoiceApprovalV1Model** (array) - A list of invoice approval records. #### Response Example [ { "id": "uuid", "companyId": "uuid", "invoicePayableId": "uuid", "invoiceDocumentKey": "string", "invoiceNumber": "string", "invoiceAmount": 0, "invoiceCurrency": "USD", "invoiceIssuedAt": "2023-01-01T00:00:00Z", "invoiceIssuedDate": "2023-01-01", "invoiceDueAt": "2023-01-01T00:00:00Z", "invoiceDueDate": "2023-01-01", "userApprovals": [], "note": "string", "status": "APPROVED", "completedAt": "2023-01-01T00:00:00Z", "updatedAt": "2023-01-01T00:00:00Z", "createdAt": "2023-01-01T00:00:00Z" } ] ``` -------------------------------- ### GET /v1/contracts/{contractId} Source: https://docs.light.inc/api-reference/v1--contracts/get-contract Retrieves a specific contract by its unique identifier. ```APIDOC ## GET /v1/contracts/{contractId} ### Description Returns a specific contract by ID. ### Method GET ### Endpoint /v1/contracts/{contractId} ### Parameters #### Path Parameters - **contractId** (string) - Required - Unique identifier for the contract (UUID format). ### Response #### Success Response (200) - **id** (string) - Unique identifier for the object (UUID format). - **companyId** (string) - ID of the company (UUID format). - **startDate** (string) - Contract start date (date format), nullable. - **endDate** (string) - Contract end date (date format), nullable. - **activatedAt** (string) - Timestamp when the contract was activated/published (date-time format), nullable. - **terminatedAt** (string) - Timestamp when the contract was terminated (date-time format), nullable. - **terminationReason** (string) - Reason for contract termination, nullable. - **renewalDate** (string) - Date when the contract should be renewed (date format), nullable. - **companyEntityId** (string) - ID of the entity (UUID format), nullable. - **invoiceTemplateId** (string) - ID of the invoice template to use for generating invoices (UUID format), nullable. - **currency** (string) - Currency code (e.g., USD). - **estimatedAmount** (integer) - Estimated total amount for the contract in cents (int64 format), nullable. - **paymentType** (string) - Payment type for invoices generated from this contract. Possible values: `AIRWALLEX`, `BANK_TRANSFER`, `DIRECT_DEBIT`, `STRIPE`. Nullable. - **payeeBankAccountId** (string) - ID of the bank account where payments should be sent (UUID format), nullable. - **billingStart** (string) - Date when billing should start for this contract (date format), nullable. - **netTerms** (integer) - Number of days from invoice date to when payment is due (int32 format), nullable. - **invoiceLeadDays** (integer) - Number of days before billing period start to date the invoice (int32 format), nullable. - **description** (string) - Description of the contract, nullable. - **customerId** (string) - ID of the customer (UUID format), nullable. - **state** (string) - Current state of the contract. Possible values: `CREATED`, `DRAFT`, `ACTIVE`, `TERMINATED`. Not nullable. #### Response Example ```json { "id": "a1b2c3d4-e5f6-7890-1234-567890abcdef", "companyId": "f0e9d8c7-b6a5-4321-fedc-ba9876543210", "startDate": "2023-01-01", "endDate": "2023-12-31", "activatedAt": "2023-01-01T10:00:00Z", "terminatedAt": null, "terminationReason": null, "renewalDate": "2023-12-31", "companyEntityId": null, "invoiceTemplateId": "12345678-90ab-cdef-1234-567890abcdef", "currency": "USD", "estimatedAmount": 1000000, "paymentType": "BANK_TRANSFER", "payeeBankAccountId": null, "billingStart": "2023-01-01", "netTerms": 30, "invoiceLeadDays": 5, "description": "Annual service contract", "customerId": "abcdef12-3456-7890-abcd-ef1234567890", "state": "ACTIVE" } ``` ``` -------------------------------- ### POST /v1/products/{productId}/archive Source: https://docs.light.inc/api-reference/v1--products/archive-product Archives a specific product by its unique identifier. ```APIDOC ## POST /v1/products/{productId}/archive ### Description Archive the given product. ### Method POST ### Endpoint /v1/products/{productId}/archive ### Parameters #### Path Parameters - **productId** (string, uuid) - Required - Unique identifier for the product. ### Response #### Success Response (200) - **id** (string, uuid) - Unique identifier for the object - **companyId** (string, uuid) - ID of the company - **name** (string) - Name of the product - **pricingType** (string) - Pricing type of the product (FIXED, PACKAGE) - **billingRecurrence** (string) - Billing frequency for the product (ONE_TIME, MONTHLY, QUARTERLY, HALF_YEARLY, YEARLY) - **pricings** (array) - List of product price per currency - **state** (string) - Product state (ACTIVE, ARCHIVED) - **defaultTaxId** (string, uuid) - ID of the default tax code for this product - **defaultAvataxCode** (string) - Default Avalara tax code - **defaultLedgerAccountId** (string, uuid) - ID of the default ledger account for this product - **externalSource** (object) - External source information - **createdAt** (string, date-time) - Timestamp when the product was created - **updatedAt** (string, date-time) - Timestamp when the product was last updated - **customProperties** (array) - List of custom properties associated with the product ``` -------------------------------- ### GET /contracts/{id} Source: https://docs.light.inc/api-reference/v1--contracts/get-contract Retrieves a specific contract by its unique identifier. ```APIDOC ## GET /contracts/{id} ### Description Returns a specific contract by ID. ### Method GET ### Endpoint /contracts/{id} ### Parameters #### Path Parameters - **id** (string) - Required - The unique identifier of the contract. ``` -------------------------------- ### GET /v1/cards/{cardId} Source: https://docs.light.inc/api-reference/v1--cards/get-card Retrieves a specific card by its unique identifier. ```APIDOC ## GET /v1/cards/{cardId} ### Description Returns a card by ID. ### Method GET ### Endpoint /v1/cards/{cardId} ### Parameters #### Path Parameters - **cardId** (string) - Required - The unique identifier of the card (UUID format). ### Response #### Success Response (200) - **id** (string) - The unique identifier of the card (UUID format). - **companyEntityId** (string) - The ID of the company entity associated with the card (UUID format). - **companyEntityName** (string) - The name of the company entity. - **companyId** (string) - The ID of the company (UUID format). - **ownerId** (string) - The ID of the card owner (UUID format). - **ownerName** (string) - The name of the card owner. - **cardBalanceAccountId** (string) - The ID of the card's balance account (UUID format). - **cardBalanceAccountLabel** (string) - The label of the card's balance account. - **currency** (string) - The currency of the card (e.g., USD). - **form** (string) - The form of the card (e.g., VIRTUAL). Enum values may expand. - **status** (string) - The status of the card (e.g., ACTIVE, FROZEN, CLOSED). Enum values may expand. - **metadata** (object) - Metadata associated with the card. - **threeDs** (object) - 3D Secure authentication details for the card. - **vendorId** (string) - The ID of the vendor (UUID format). - **vendorName** (string) - The name of the vendor. - **vendorAvatarUrl** (string) - The URL of the vendor's avatar. - **description** (string) - A description of the card. - **bin** (string) - The Bank Identification Number (BIN) of the card. - **lastFour** (string) - The last four digits of the card number. - **cardholderName** (string) - The name of the cardholder. - **limitIntervalSpend** (integer) - The spend limit interval in seconds. - **limits** (array) - An array of limit objects associated with the card. - **createdAt** (string) - The timestamp when the card was created (ISO 8601 format). - **updatedAt** (string) - The timestamp when the card was last updated (ISO 8601 format). - **type** (string) - The type of the card (e.g., VENDOR, EMPLOYEE). Enum values may expand. #### Response Example ```json { "id": "a1b2c3d4-e5f6-7890-1234-567890abcdef", "companyEntityId": "f0e9d8c7-b6a5-4321-fedc-ba9876543210", "companyEntityName": "Example Corp", "companyId": "12345678-90ab-cdef-1234-567890abcdef", "ownerId": "abcdef12-3456-7890-abcd-ef1234567890", "ownerName": "John Doe", "cardBalanceAccountId": "98765432-10fe-dcba-9876-543210fedcba", "cardBalanceAccountLabel": "Main Account", "currency": "USD", "form": "VIRTUAL", "status": "ACTIVE", "metadata": { "type": "EMPLOYEE" }, "threeDs": { "phoneNumber": { "countryCode": "US", "number": "1234567890" }, "password": "securepassword", "email": "user@example.com" }, "vendorId": "a1b2c3d4-e5f6-7890-1234-567890abcdef", "vendorName": "Example Vendor", "vendorAvatarUrl": "https://example.com/avatar.png", "description": "Employee expense card", "bin": "123456", "lastFour": "7890", "cardholderName": "John Doe", "limitIntervalSpend": 3600, "limits": [ { "id": "limit-id-1", "companyId": "12345678-90ab-cdef-1234-567890abcdef", "cardId": "a1b2c3d4-e5f6-7890-1234-567890abcdef", "amount": 1000, "currency": "USD", "interval": "MONTHLY", "createdAt": "2023-01-01T10:00:00Z", "updatedAt": "2023-01-01T10:00:00Z" } ], "createdAt": "2023-01-01T10:00:00Z", "updatedAt": "2023-01-01T10:00:00Z", "type": "EMPLOYEE" } ``` ``` -------------------------------- ### GET /v1/bank-accounts Source: https://docs.light.inc/api-reference/v1--bank-accounts/get-bank-accounts-of-the-company Retrieves a list of all bank accounts associated with the company. ```APIDOC ## GET /v1/bank-accounts ### Description Returns all bank accounts of the company. ### Method GET ### Endpoint /v1/bank-accounts ### Parameters ### Request Body None ### Response #### Success Response (200) - **id** (string) - Unique identifier for the bank account object - **companyId** (string) - ID of the company - **companyEntityId** (string) - ID of the entity - **name** (string) - Bank account display name - **type** (string) - Type of the bank account (physical or virtual) - **bankProvider** (string) - Bank provider #### Response Example ```json [ { "id": "uuid", "companyId": "uuid", "companyEntityId": "uuid", "name": "string", "type": "PHYSICAL | VIRTUAL", "bankProvider": "ABANCA | ABN_AMRO | ..." } ] ``` ``` -------------------------------- ### List Products Source: https://docs.light.inc/api-reference/v1--products/list-products Retrieves a list of products. Supports filtering, sorting, and pagination. ```APIDOC ## GET /v1/products ### Description Returns a list of products. Supports filtering, sorting, and pagination. ### Method GET ### Endpoint /v1/products ### Parameters #### Query Parameters - **sort** (string) - Optional - Sort string in the format `field:direction`. To provide multiple sort fields, separate them with commas. Available directions: `asc`, `desc`. Available fields: `name`, `createdAt`, `updatedAt`. Example: `amount:desc,createdAt:asc` - **filter** (string) - Optional - Filter string in the format `field:operator:value`. To provide multiple filters, separate them with commas. Available operators: `eq`, `ne`, `in`, `not_in`, `gt`, `gte`, `lt`, `lte`. For `in` and `not_in` operators, provide multiple values separated by the pipe character (`|`). Available fields: `id`, `name`, `pricingType`, `recurrence`, `state`, `invoiceReceivableId`, `updatedAt`. Example: `state:in:IN_DRAFT|SCHEDULED|PAID,amount:gte:500,vendorId:ne:null` - **limit** (integer) - Optional - Maximum number of items to return. Default is 50, maximum is 200. - **offset** (integer) - Optional - Number of items to skip before starting to collect the result set. Deprecated, use 'cursor' instead. - **cursor** (string) - 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. ### Response #### Success Response (200) - **records** (array) - List of records for the current page - **hasMore** (boolean) - Boolean flag indicating if there are more records available - **total** (integer) - 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. Deprecated. - **nextCursor** (string) - Cursor for fetching the next page (only for cursor pagination) - **prevCursor** (string) - Cursor for fetching the previous page (only for cursor pagination) #### Response Example ```json { "records": [ { "id": "string", "companyId": "string", "name": "string", "pricingType": "string", "billingRecurrence": "string" } ], "hasMore": true, "total": 100, "nextCursor": "string", "prevCursor": "string" } ``` ``` -------------------------------- ### POST /v1/customers Source: https://docs.light.inc/api-reference/v1--customers/create-customer Creates a new customer record in the system. Requires authentication via API key or Bearer token. ```APIDOC ## POST /v1/customers ### Description Creates a new customer record. ### Method POST ### Endpoint /v1/customers ### Parameters #### Header Parameters - **X-Idempotency-Key** (string) - Optional - Used to prevent duplicate requests. #### Request Body - **name** (string) - Required - Name of the customer - **email** (string) - Optional - Email address - **address** (object) - Optional - Physical address - **billingAddress** (object) - Optional - Billing address - **shippingAddress** (object) - Optional - Shipping address - **domain** (string) - Optional - Customer domain - **description** (string) - Optional - Notes about the customer - **vatNumber** (string) - Optional - VAT number - **businessRegistrationNumber** (string) - Optional - Business registration number - **easCode** (string) - Optional - Electronic Address Scheme code - **einvoiceAddress** (string) - Optional - E-invoice address - **einvoiceNetwork** (string) - Optional - Network (NEMHANDEL, PEPPOL, SDI, TAX_REPORTING) - **type** (string) - Optional - Customer type (BUSINESS, CONSUMER, GOVERNMENT) - **logoUrl** (string) - Optional - URL to customer logo - **customProperties** (array) - Optional - List of custom properties ### Request Example { "name": "Example Corp", "email": "contact@example.com", "type": "BUSINESS" } ### Response #### Success Response (200) - **id** (string) - Unique identifier for the object - **name** (string) - Name of the customer - **status** (string) - Current status (ACTIVE, ARCHIVED) #### Response Example { "id": "550e8400-e29b-41d4-a716-446655440000", "name": "Example Corp", "status": "ACTIVE" } ``` -------------------------------- ### GET /bank-accounts Source: https://docs.light.inc/api-reference/v1--bank-accounts/get-bank-accounts-of-the-company Retrieves a list of all bank accounts associated with the company. ```APIDOC ## GET /bank-accounts ### Description Returns all bank accounts of the company. ### Method GET ### Endpoint /bank-accounts ``` -------------------------------- ### GET /v1/attachments Source: https://docs.light.inc/api-reference/v1--attachments/list-attachments Retrieves a list of attachments associated with a specific resource. ```APIDOC ## GET /v1/attachments ### Description Returns a list of attachments associated with a specific resource. ### Method GET ### Endpoint /v1/attachments ### Parameters #### Query Parameters - **resourceId** (string/uuid) - Optional - The unique identifier of the resource to filter attachments by. ### Response #### Success Response (200) - **Array** (ExternalAttachmentV1Model) - A list of attachment objects. #### Response Example [ { "id": "550e8400-e29b-41d4-a716-446655440000", "companyId": "550e8400-e29b-41d4-a716-446655440001", "resourceId": "550e8400-e29b-41d4-a716-446655440002", "documentKey": "doc_123", "fileName": "example.pdf", "contentType": "application/pdf", "createdBy": "550e8400-e29b-41d4-a716-446655440003", "metadata": { "type": "AR" }, "createdAt": "2023-10-27T10:00:00Z", "updatedAt": "2023-10-27T10:00:00Z" } ] ``` -------------------------------- ### Authentication Source: https://docs.light.inc/api-reference/v1--customers/update-customer Details on how to authenticate with the Light Inc API using API keys or JWT. ```APIDOC ## Authentication ### API Key Authentication This method uses an API key provided in the `Authorization` header. - **Method**: Any - **Header**: `Authorization: Basic ` ### Bearer Token Authentication This method uses a JWT token for authentication. - **Method**: Any - **Header**: `Authorization: Bearer ` ``` -------------------------------- ### POST /v1/expenses/upload-url Source: https://docs.light.inc/api-reference/v1--expenses/create-upload-url Creates a pre-signed URL for uploading an expense receipt document. ```APIDOC ## POST /v1/expenses/upload-url ### Description Creates a pre-signed URL for uploading an expense receipt document. ### Method POST ### Endpoint /v1/expenses/upload-url ### Parameters #### Request Body - **filename** (string) - Required - The name of the file to be uploaded. - **contentType** (string) - Required - The MIME type of the file. ### Response #### Success Response (200) - **uploadUrl** (string) - The pre-signed URL for the upload. - **key** (string) - The key associated with the uploaded file. - **metadata** (object) - Optional metadata associated with the upload. ```