### Install Layerfi Components Package Source: https://docs.layerfi.com/guides/embedded-components Install the @layerfi/components package using npm or yarn. ```bash npm install @layerfi/components --save ``` ```bash yarn install @layerfi/components ``` -------------------------------- ### List Customers Response Example Source: https://docs.layerfi.com/api-reference/customer/list-customers This is an example of a successful response when listing customers. It returns a JSON object containing a 'data' array, where each element represents a customer with their details. ```json { "data": [ { "external_id": "customer-1", "individual_name": "John Doe", "company_name": "Acme, Inc.", "email": "john@hotmail.com", "mobile_phone": "555-555-5555", "office_phone": "555-555-5555", "address_string": "123 Main St, Phoenix, AZ 85001", "notes": "This is a note" }, { "external_id": "customer-2", "individual_name": "Jane Doe", "company_name": "MegaCorp", "email": "jane@hotmail.com" } ] } ``` -------------------------------- ### Invoice Creation Response Example Source: https://docs.layerfi.com/api-reference/invoice/create This is an example of a successful response when creating an invoice. It includes details about the invoice and its associated metadata. ```json { "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890", "key": "department", "value": "sales", "dimension_display_name": "Department", "value_display_name": "Sales Team", "dimension_id": "d1e2f3a4-b5c6-7890-abcd-ef1234567890", "definition_id": "f1e2d3c4-b5a6-7890-abcd-ef1234567890", "created_at": "2024-02-27T02:16:40.389772Z", "updated_at": "2024-02-27T02:16:40.389772Z", "deleted_at": null, "archived_at": null } ] } } ``` -------------------------------- ### Customer Response Example Source: https://docs.layerfi.com/api-reference/customer/customer An example of a successful response when retrieving customer data. ```APIDOC ### Response Example ```json Response theme={null} { "data": { "type": "CustomerData", "id": "4f7c1b16-e057-4ec0-8b20-50308ba5b9ea", "external_id": "customer-1", "individual_name": "John Doe", "company_name": "Acme, Inc.", "email": "john@hotmail.com", "mobile_phone": "555-555-5555", "office_phone": "555-555-5555", "address_string": "123 Main St, Phoenix, AZ 85001", "notes": "This is a note", "status": "ACTIVE", "transaction_tags": [ { "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890", "key": "department", "value": "sales", "dimension_display_name": "Department", "value_display_name": "Sales Team", "dimension_id": "d1e2f3a4-b5c6-7890-abcd-ef1234567890", "definition_id": "f1e2d3c4-b5a6-7890-abcd-ef1234567890", "created_at": "2024-02-27T02:16:40.389772Z", "updated_at": "2024-02-27T02:16:40.389772Z", "deleted_at": null, "archived_at": null } ] } } ``` ``` -------------------------------- ### Example Request with Pagination Source: https://docs.layerfi.com/api-details/pagination An example of a cURL request to a paginated endpoint, demonstrating the use of various pagination parameters. ```APIDOC ## Example Request ```bash curl https://sandbox.layerfi.com/v1/businesses/{business_id}/bank-transactions?sort_by=date&sort_order=DESC&limit=50&show_total_count=true \ -H "Authorization: Bearer " ``` ``` -------------------------------- ### Business Object Response Example Source: https://docs.layerfi.com/api-reference/business/list This is an example of the JSON response structure when listing businesses. It includes details for each registered business. ```json { "data": [ { "id": "863ed926-e30d-40f4-8e7e-b0d5387ce4fb", "type": "Business", "external_id": "test-acme-id", "legal_name": "ACME LLC", "business_activity_code": null, "us_state": "CA", "entity_type": "LLC", "phone_number": "+16504651359", "sms_enabled": true, "sms_stopped": false, "naics_code": null, "imported_at": "2023-06-15T22:12:05.467940Z", "updated_at": "2023-06-15T22:12:05.467940Z", "archived_at": null, "unit_accounts": [ { "id": "111111", "imported_at": "2023-06-15T22:12:05.467940Z" } ] } ], "meta": {} } ``` -------------------------------- ### Schedule C Report Example Source: https://docs.layerfi.com/api-reference/v1/fetch-schedule-c-report An example of a Schedule C report, including business ID, year, reporting basis, and line items for income and expenses. ```json { "business_id": "550e8400-e29b-41d4-a716-446655440000", "year": 2025, "reporting_basis": "ACCRUAL", "line_items": [ { "line_number": "1", "line_name": "Gross receipts or sales", "part": "Part I - Income", "amount": 15000000 }, { "line_number": "2", "line_name": "Returns and allowances", "part": "Part I - Income", "amount": 50000 }, { "line_number": "24b", "line_name": "Deductible meals", "part": "Part II - Expenses", "amount": 250000 } ] } ``` -------------------------------- ### Fetch Platform Activity Summary (GET /v2/activity) Source: https://docs.layerfi.com/api-reference/v1/fetch-platform-activity-summary Use this GET request to retrieve a platform activity summary. The response includes monthly breakdowns of business creations, archival, categorizations, and active businesses. Ensure the 'Content-Type' header is set to 'application/json'. ```yaml openapi: 3.0.1 info: title: API version: latest servers: [] security: - BearerAuth: [] tags: [] externalDocs: url: / paths: /v2/activity: get: tags: [] summary: Fetch platform activity summary description: >- Generates a platform activity summary with monthly breakdowns across all businesses. This is the v2 version that provides more detailed monthly analytics. operationId: activity.v2.get parameters: - name: Content-Type in: header description: Content-Type must be set to application/json. schema: type: string responses: '200': description: '' headers: {} content: application/json: schema: $ref: '#/components/schemas/PlatformActivitySummary' deprecated: false components: schemas: PlatformActivitySummary: type: object properties: months: type: array items: $ref: '#/components/schemas/PlatformActivityMonthlySummary' description: Monthly activity summaries for the platform. description: Platform-wide activity summary with monthly breakdowns. PlatformActivityMonthlySummary: type: object properties: month: type: string description: The month in YYYY-MM format. example: 2024-07 creations: type: integer description: Number of businesses created in this month. example: 15 archivals: type: integer description: Number of businesses archived in this month. example: 2 categorizations: type: integer description: Total number of transaction categorizations in this month. example: 1250 categorization_uniq_business: type: integer description: >- Number of unique businesses that performed categorizations in this month. example: 45 sms_categorizations: type: integer description: Number of transaction categorizations done via SMS in this month. example: 800 sms_categorizations_uniq_business: type: integer description: >- Number of unique businesses that performed SMS categorizations in this month. example: 30 pnl_loads: type: integer description: Number of P&L report loads in this month. example: 120 pnl_load_uniq_business: type: integer description: Number of unique businesses that loaded P&L reports in this month. example: 25 active_businesses: type: integer description: >- Number of businesses that had any activity (categorizations or P&L loads) in this month. example: 50 description: Monthly activity summary for a specific month. securitySchemes: BearerAuth: type: http scheme: bearer bearerFormat: JWT ``` -------------------------------- ### Plaid Configuration Response Example Source: https://docs.layerfi.com/api-reference/plaid/get This is an example of the JSON response you will receive when successfully retrieving your Plaid configuration. It includes the Plaid configuration type, client ID, the last four digits of your secret, and the Plaid environment URL override. ```json { "data":{ "type":"Plaid_Configuration", "client_id":"6488fafd7a73ae00122004d6", "secret_last_4":"acae", "plaid_env_url_override": "SANDBOX" } } ``` -------------------------------- ### Get Balance Sheet Source: https://docs.layerfi.com/api-reference/reports/balance-sheet/get-balance-sheet This example demonstrates how to retrieve a balance sheet for a business using its ID and an effective date. ```APIDOC ## GET /v1/businesses/{business_id}/reports/balance-sheet ### Description Retrieves the balance sheet for a specified business. ### Method GET ### Endpoint /v1/businesses/{business_id}/reports/balance-sheet ### Parameters #### Query Parameters - **effective_date** (string) - Required - The date for which the balance sheet should be generated. Format: `YYYY-MM-DDTHH:mm:ss-HH:mm`. ### Request Example ```bash curl -X GET 'https://sandbox.layerfi.com/v1/businesses/47bdad2a-d670-4295-ae52-6f263e91caf2/reports/balance-sheet?effective_date=2023-01-01T00:00:00-06:00' \ -H 'Authorization: Bearer ' ``` ### Response #### Success Response (200) - **data** (object) - Contains the balance sheet details. - **type** (string) - The type of the report, e.g., "Balance_Sheet". - **business_id** (string) - The ID of the business. - **effective_date** (string) - The effective date of the balance sheet. - **assets** (object) - Details about the business's assets. - **name** (string) - The name of the asset category. - **display_name** (string) - The display name of the asset category. - **value** (number) - The total value of the asset category. - **line_items** (array) - A list of individual asset line items. - **is_contra** (boolean) - Indicates if this is a contra asset account. - **liabilities_and_equity** (object) - Details about the business's liabilities and equity. - **name** (string) - The name of the liabilities and equity category. - **display_name** (string) - The display name of the liabilities and equity category. - **value** (number) - The total value of liabilities and equity. - **line_items** (array) - A list of individual liabilities and equity line items. #### Response Example ```json { "data": { "type": "Balance_Sheet", "business_id": "47bdad2a-d670-4295-ae52-6f263e91caf2", "effective_date": "2024-06-07T00:15:29.477022Z", "assets": { "name": "Assets", "display_name": "Assets", "value": 50425, "line_items": [ { "name": "Bank Accounts", "display_name": "Bank Accounts", "value": 57425, "line_items": [ { "name": "Default Test Client Banking", "display_name": "Default Test Client Banking", "value": 57425, "line_items": [], "is_contra": false } ], "is_contra": false } ], "is_contra": false }, "liabilities_and_equity": { "name": "Liabilities and Equity", "display_name": "Liabilities and Equity", "value": 50425, "line_items": [ { "name": "Liabilities", "display_name": "Liabilities", "value": 50000, "line_items": [ { "name": "Accounts Payable (A/P)", "display_name": "Accounts Payable (A/P)", "value": 50000, "line_items": [], "is_contra": false } ], "is_contra": false } ] } } } ``` ``` -------------------------------- ### Onboarding Component Usage Source: https://docs.layerfi.com/embedded-components/components/onboarding Example of how to include the Onboarding component in your application. It accepts an optional callback for when transactions are ready for review. ```APIDOC ## Onboarding Component ### Description This component prompts users to connect accounts and categorize transactions. It can be included on an accounting landing page. After accounts are connected, it prompts users to categorize transactions. If onboarding is complete, it renders nothing. ### Usage ```tsx navigate('/accounting/bank-transactions')} /> ``` ### Properties #### `onTransactionsToReviewClick` - **Type**: `() => void` - **Description**: A function which navigates to the bank transactions to review page of your app. #### `onboardingStepOverride` - **Type**: `string` - **Description**: By default, the onboarding component will infer the onboarding step by checking if the business has connected accounts. If you want to override this behavior, you can set this parameter to `'connectAccount'` or `'complete'`. ``` -------------------------------- ### Make Test API Call using Node.js Source: https://docs.layerfi.com/guides/initial-setup This Node.js example uses `axios` to make a GET request to the `/whoami` endpoint. The access token is included in the `Authorization` header. The response data is then logged to the console. ```javascript const axios = require('axios'); const response = await axios.get( 'https://sandbox.layerfi.com/whoami', { headers: { 'Authorization': `Bearer ${accessToken}` } } ); console.log(response.data); ``` -------------------------------- ### Set up LayerProvider Context (Local Testing) Source: https://docs.layerfi.com/guides/embedded-components Configure the LayerProvider with sandbox credentials for local development. All Layer components must be rendered within this context. ```tsx import { LayerProvider } from "@layerfi/components"; {...} ``` -------------------------------- ### Get Bearer Token using Node.js Source: https://docs.layerfi.com/guides/initial-setup This Node.js example uses `axios` to retrieve an access token. It shows how to configure the request with basic authentication, form-urlencoded content type, and the required grant type and scope. The `access_token` is then returned by the async function. ```javascript const axios = require('axios'); const getAccessToken = async () => { const response = await axios.post( 'https://auth.layerfi.com/oauth2/token', new URLSearchParams({ grant_type: 'client_credentials', scope: 'https://sandbox.layerfi.com/sandbox', client_id: '' }), { auth: { username: '', password: '' }, headers: { 'Content-Type': 'application/x-www-form-urlencoded' } } ); return response.data.access_token; }; ``` -------------------------------- ### Get a Customer Source: https://docs.layerfi.com/llms.txt Get an existing customer within Layer. ```APIDOC ## GET /v1/customers/{customer_id} ### Description Retrieves an existing customer within Layer. ### Method GET ### Endpoint /v1/customers/{customer_id} ### Parameters #### Path Parameters - **customer_id** (string) - Required - The unique identifier of the customer. ``` -------------------------------- ### Vendor Response Example Source: https://docs.layerfi.com/api-reference/vendor/vendor An example of a successful response when retrieving vendor data. ```APIDOC ## Vendor Response Example ### Description This is an example of the JSON response structure for a Vendor object. ### Response Example ```json { "data": { "type": "VendorData", "id": "4f7c1b16-e057-4ec0-8b20-50308ba5b9ea", "external_id": "vendor-1", "individual_name": "John Doe", "company_name": "Acme, Inc.", "email": "john@hotmail.com", "mobile_phone": "555-555-5555", "office_phone": "555-555-5555", "address_string": "123 Main St, Phoenix, AZ 85001", "notes": "This is a note", "status": "ACTIVE", "transaction_tags": [ { "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a", "key": "ExampleTagKey", "value": "ExampleTagValue", "created_at": "2023-11-07T05:31:56Z", "updated_at": "2023-11-07T05:31:56Z", "deleted_at": "2023-11-07T05:31:56Z" } ] } } ``` ``` -------------------------------- ### Create Business Request Source: https://docs.layerfi.com/api-reference/business/create Use this cURL command to register a new business. Ensure you include all required fields such as external_id, legal_name, us_state, and entity_type. The phone_number and activation_at fields are optional but recommended for full functionality. ```bash curl -X POST https://sandbox.layerfi.com/v1/businesses \ -H "Authorization: Bearer " \ -H "Content-Type: application/json" \ -d '{ "external_id": "test-acme-id", "legal_name": "ACME LLC", "us_state": "CA", "entity_type": "LLC", "phone_number": "+18005555555", "unit_ids": [{"unit_id": "111111"}], "activation_at": "2023-06-15T22:12:05.467940Z" }' ``` -------------------------------- ### Create Demo Business Source: https://docs.layerfi.com/api-reference/v1/create-demo-business This endpoint allows you to create a new demo business. It is useful for setting up test environments or populating the system with sample data. ```APIDOC ## POST /v1/demo-business ### Description Creates a new demo business entity. ### Method POST ### Endpoint /v1/demo-business ### Request Body - **name** (string) - Required - The desired name for the demo business. - **email** (string) - Required - The email address associated with the demo business. - **currency** (string) - Required - The default currency for the demo business (e.g., "USD", "EUR"). ### Request Example { "name": "Example Corp", "email": "contact@example.com", "currency": "USD" } ### Response #### Success Response (201 Created) - **business_id** (string) - The unique identifier for the newly created demo business. - **message** (string) - A confirmation message indicating successful creation. #### Response Example { "business_id": "biz_12345abcde", "message": "Demo business created successfully." } #### Error Response (400 Bad Request) - **error** (string) - Description of the error (e.g., "Missing required field: name"). #### Error Response Example { "error": "Missing required field: email" } ``` -------------------------------- ### Vendor Payout Response Example Source: https://docs.layerfi.com/api-reference/vendor-payouts/vendor-payout This section provides an example of a successful response when retrieving vendor payout information. ```APIDOC ## Vendor Payout Response Example ### Description This section provides an example of a successful response when retrieving vendor payout information. ### Response Example ```json { "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a", "external_id": "vendor-payout-1234", "business_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a", "paid_out_amount": 15000, "processor": "STRIPE", "imported_at": "2023-11-07T05:31:56Z", "completed_at": "2023-11-07T05:31:56Z", "match": { "id": "6b0a3734-f4ef-4fb0-9fc1-3f59b0c1cf99", "match_type": "VENDOR_PAYOUT", "bank_transaction": { "type": "Bank_Transaction_Data", "id": "a703c8d6-cfe8-453d-a275-b92eacc6fc6e", "business_id": "738ec216-e8e5-48f2-b7f2-cdc89c96b3d4", "source": "PLAID", "source_transaction_id": "trxn_1sdOeLQiFAKE2LQBkcvrJw95f" } } } ``` ``` -------------------------------- ### Set up LayerProvider Context (Production) Source: https://docs.layerfi.com/guides/embedded-components Configure the LayerProvider with a scoped business access token for production environments. This ensures secure data fetching for individual businesses. ```tsx import { LayerProvider } from "@layerfi/components"; '} > {...} ``` -------------------------------- ### Chart of Accounts Response Example Source: https://docs.layerfi.com/api-reference/ledger/chart An example response illustrating the structure of a Chart of Accounts, including nested sub-accounts. ```APIDOC ## Chart of Accounts Response Example ```json { "data": { "type": "Chart_Of_Accounts", "accounts": [ { "id": "6ac7e685-4859-43a0-9f26-61e57c31f4ea", "name": "Expenses", "stable_name": "EXPENSES", "normality": "DEBIT", "account_type": { "value": "EXPENSE", "display_name": "Expenses" }, "account_subtype": null, "sub_accounts": [ { "id": "ab16f453-6b0f-416d-bcc9-92edba3b6e0a", "name": "Cost of Goods Sold", "stable_name": "COGS", "normality": "DEBIT", "account_type": { "value": "EXPENSE", "display_name": "Expenses" }, "account_subtype": { "value": "COGS", "display_name": "COGS" }, "sub_accounts": [ // Sub-accounts omitted for brevity ] }, { "id": "ab5f3795-734e-4b12-b9a1-c32ec4b43c2e", "name": "Operating Expenses", "stable_name": "OPERATING_EXPENSES", "normality": "DEBIT", "account_type": { "value": "EXPENSE", "display_name": "Expenses" }, "account_subtype": { "value": "OPERATING_EXPENSES", "display_name": "Operating Expenses" }, "sub_accounts": [ // Sub-accounts omitted for brevity ] }, ] }, { "id": "700a1b71-0b38-4d36-b46c-c0610f7849b5", "name": "Revenue", "stable_name": "REVENUE", "normality": "CREDIT", "account_type": { "value": "REVENUE", "display_name": "Revenue" }, "account_subtype": null, "sub_accounts": [ { "id": "59d427f8-4681-4a8c-926e-3c3963b24e8f", "name": "Service Revenue", "stable_name": "SERVICES_REVENUE", "normality": "CREDIT", "account_type": { "value": "REVENUE", "display_name": "Revenue" }, "account_subtype": { "value": "SALES", "display_name": "Sales" }, "sub_accounts": [] }, { "id": "d9ac1801-3433-4666-9e49-597c3d8c9816", "name": "Sale of Goods Revenue", "stable_name": "GOODS_REVENUE", "normality": "CREDIT", "account_type": { "value": "REVENUE", "display_name": "Revenue" }, "account_subtype": { "value": "SALES", "display_name": "Sales" }, "sub_accounts": [] } ] }, // Additional accounts omitted for brevity ] } } ``` ``` -------------------------------- ### Fetch Integration Partner ID (Sandbox) Source: https://docs.layerfi.com/integrations/check-embedded-payroll Use these fixed values for sandbox testing of the integration partner ID. ```bash curl https://api.checkhq.com/integrations/partners \ -H "Authorization: Bearer " ``` -------------------------------- ### Integration Partner Response (Sandbox) Source: https://docs.layerfi.com/integrations/check-embedded-payroll Example response when fetching integration partners in a sandbox environment. The 'Layer' integration partner should have a specific ID. ```json { "results": [ { "id": "", "name": "Layer", "description": "Embedded accounting" } ] } ``` -------------------------------- ### Create Business Source: https://docs.layerfi.com/api-reference/business/create Registers a new business in Layer’s systems. ```APIDOC ## POST /v1/businesses ### Description This endpoint registers a new business in Layer’s systems. ### Method POST ### Endpoint /v1/businesses ### Parameters #### Request Body - **external_id** (string) - Unique ID of the business in your system for linking purposes. - **legal_name** (string) - Required - Legal name of the business as it has been registered. - **us_state** (enum) - Required - Two letter state abbreviation. (`AK`, `AL`, `AR`, etc.) - **entity_type** (enum) - Required - Entity type of the business. Used to determine tax filing status. Values can be: `SOLE_PROP`, `C_CORP`, `LLC`, `S_CORP`, `PARTNERSHIP` - **phone_number** (string) - Phone number used for SMS based categorization. - **sms_enabled** (boolean) - Enables SMS by default. Client SMS configuration must be enabled and business must also be configured with a phone number to enable SMS. If set SMS is enabled, business will immediately receive onboarding SMS messages. Defaults to `false`. - **naics_code** (string) - 6-digit NAICS code used to identify the business's industry. - **activation_at** (ISO8601 timestamp) - Start date from which transactions will be classified, displayed, and available for reports. Defaults to current time, but can be specified to a past or future date. - **free_trial_ends_at** (ISO8601 timestamp) - The date and time when the business's free trial ends. - **unit_accounts** (array containing UnitAccount objects) - List of unit accounts associated with this business. - **unit_id** (string) - The Unit account's ID - **plaid_items** (array containing PlaidItem objects) - List of plaid items to connect to this business. - **item_id** (string) - `item_id` returned by Plaid on the initial link. - **access_token** (string) - `access_token` returned by Plaid on the initial link. - **plaid_processor_tokens** (array containing PlaidProcessorToken objects) - List of plaid processor tokens to connect to this business. - **processor_token** (string) - `processor_token` returned by Plaid after generating from access_token. ### Request Example ```bash curl -X POST https://sandbox.layerfi.com/v1/businesses \ -H "Authorization: Bearer " \ -H "Content-Type: application/json" \ -d { "external_id": "test-acme-id", "legal_name": "ACME LLC", "us_state": "CA", "entity_type": "LLC", "phone_number": "+18005555555", "unit_ids": [{"unit_id": "111111"}], "activation_at": "2023-06-15T22:12:05.467940Z" } ``` ### Response #### Success Response (200) Returns the created [Business Object](/api-reference/business/business) #### Response Example ```json { "data": { "id": "863ed926-e30d-40f4-8e7e-b0d5387ce4fb", "type": "Business", "external_id": "test-acme-id", "legal_name": "ACME LLC", "business_activity_code": null, "us_state": "CA", "entity_type": "LLC", "phone_number": "+16504651359", "sms_enabled": true, "sms_stopped": false, "naics_code": null, "imported_at": "2023-06-15T22:12:05.467940Z", "updated_at": "2023-06-15T22:12:05.467940Z", "archived_at": null, "unit_accounts": [ { "id": "111111", "imported_at": "2023-06-15T22:12:05.467940Z" } ] }, "meta": {} } ``` ``` -------------------------------- ### Schedule C Report Example Source: https://docs.layerfi.com/api-reference/v1/fetch-schedule-c-report An example of a Schedule C report, illustrating the structure and expected data for business income and expenses. ```APIDOC ## Schedule C Report Example ### Description This example demonstrates the structure of a Schedule C report, including business ID, year, reporting basis, and detailed line items for income and expenses. ### Example ```json { "business_id": "550e8400-e29b-41d4-a716-446655440000", "year": 2025, "reporting_basis": "ACCRUAL", "line_items": [ { "line_number": "1", "line_name": "Gross receipts or sales", "part": "Part I - Income", "amount": 15000000 }, { "line_number": "2", "line_name": "Returns and allowances", "part": "Part I - Income", "amount": 50000 }, { "line_number": "24b", "line_name": "Deductible meals", "part": "Part II - Expenses", "amount": 250000 } ] } ``` ``` -------------------------------- ### SMS Message Received Event Payload Example Source: https://docs.layerfi.com/api-details/webhooks-event-catalog This example payload illustrates an SMS message received event. It contains information about the message, sender, and business. ```json { "id": "sms_message_received_SM1234567890", "type": "sms.message_received", "business_id": "8e7a359e-7af5-4f6e-b786-6ddfd1807c32", "business_external_id": "biz_101", "data": { "message_id": "SM1234567890", "direction": "RECEIVED", "body": "Classify this as utilities", "phone_number": "+15551234567", "delivery_status": null, "at": "2026-03-31T16:48:55Z" } } ``` -------------------------------- ### Activity Event Payload Example Source: https://docs.layerfi.com/api-details/webhooks-event-catalog This is an example payload for an activity event, such as categorizing a bank transaction. It includes details about the event, business, and specific data related to the transaction. ```json { "id": "activity_categorize_bank_transaction_44bb48bd-4af1-4e6f-a38a-fb24e5575dc7", "type": "activity.categorize_bank_transaction", "business_id": "8e7a359e-7af5-4f6e-b786-6ddfd1807c32", "business_external_id": "biz_101", "data": { "transaction_id": "34db2910-5919-4985-8e7f-56dd83e76ed5", "categorization_method": "API", "categorization": null, "matchType": "INVOICE_PAYMENT", "created_at": "2026-03-31T16:42:11Z" } } ``` -------------------------------- ### List Check Payroll Configurations Source: https://docs.layerfi.com/api-reference/v1/list-check-payroll-configs Use this endpoint to retrieve all Check payroll configurations for a given business. Ensure the `businessId` is correctly provided in the URL path. ```yaml get /v1/businesses/{businessId}/payroll/check/configs openapi: 3.0.1 info: title: API version: latest servers: [] security: - BearerAuth: [] tags: [] externalDocs: url: / paths: /v1/businesses/{businessId}/payroll/check/configs: get: tags: [] summary: List Check payroll configs description: Returns all Check payroll configurations for the given business. operationId: business.payroll.check.configs.get parameters: - name: businessId in: path description: The UUID of the business. required: true schema: type: string - name: Content-Type in: header description: Content-Type must be set to application/json. schema: type: string responses: '200': description: A list of Check payroll configs for the business. headers: {} content: application/json: schema: type: array items: $ref: "#/components/schemas/ApiCheckPayrollConfig" deprecated: false components: schemas: ApiCheckPayrollConfig: type: object properties: id: type: string format: uuid description: The UUID of the Check payroll config. business_id: type: string format: uuid description: The UUID of the business this config belongs to. check_company_id: type: string description: The Check company ID associated with this config. required: - id - business_id - check_company_id securitySchemes: BearerAuth: type: http scheme: bearer bearerFormat: JWT ``` -------------------------------- ### Response Example for Vendor Refund Source: https://docs.layerfi.com/api-reference/vendor-refunds/vendor-refund This is an example of a successful vendor refund response, showing the generated ID, external ID, refunded amount, status, completion time, and the details of the allocations. ```json { "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a", "external_id": "vendor-refund-123", "refunded_amount": 500, "status": "PAID", "completed_at": "2023-11-07T05:31:56Z", "allocations": [ { "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a", "bill_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a" } ] } ``` -------------------------------- ### Bookkeeping Onboarding Completed Webhook Example Source: https://docs.layerfi.com/api-details/webhooks-event-catalog This webhook fires when Layer updates a business's bookkeeping configuration at the end of their onboarding call, specifically when the `onboarding_date` is set for the first time. Subsequent updates to this date do not trigger additional webhooks. ```json { "id": "bookkeeping_onboarding_completed_00000000-0000-0000-0000-000000000002_03f6c94f-574d-42ca-a6cd-fecf2a2aeccb", "type": "bookkeeping_onboarding.completed", "business_id": "8e7a359e-7af5-4f6e-b786-6ddfd1807c32", "business_external_id": "biz_101", "data": { "bookkeeping_configuration_id": "00000000-0000-0000-0000-000000000002", "onboarding_date": "2024-01-15" } } ```