# Caret Billing Center Help > Help with company access, invoices, payments, payment methods and portal users. Index: https://staging.caretlegal.net/docs/llms.txt # Billing Center help > Help with company access, invoices, payments and the people in your portal. Source: https://staging.caretlegal.net/docs/ · Markdown: https://staging.caretlegal.net/docs/index.md Use the Caret Billing Center to view your company's transactions, make payments and manage the information you are permitted to change. - [Get access and select a company](/docs/getting-access). - [Find invoices and make a payment](/docs/invoices-and-payments). - [Manage payment information](/docs/payment-information). - [Manage your company users](/docs/managing-users). - [Understand the menu icons](/docs/know-your-menu). - [Troubleshoot a portal connection](/docs/restarting-your-server). The pages and actions available to you depend on your company role and permissions. If the company or record you expect is missing, request help with access before attempting a payment for a different company. ## APIs and agents [Use these docs with an agent](/docs/agents) for `llms.txt`, the full Markdown export and OpenAPI downloads. # Use these docs with an agent > Connect an MCP client or read LLM indexes, Markdown and OpenAPI contracts. Source: https://staging.caretlegal.net/docs/agents · Markdown: https://staging.caretlegal.net/docs/agents/index.md ## Connect through MCP This site exposes Nimbus's read-only MCP server at **`https://my.caretlegal.com/docs/mcp`** using Streamable HTTP. In your client's remote MCP settings, add this URL; no documentation token is required. You can also use **Copy MCP URL** in a documentation page's actions. The server provides two tools: | Tool | Use | | --- | --- | | `list_pages` | Discover published guides and API references. Follow `nextCursor` to retrieve more pages. | | `get_page` | Read a page as Markdown using a URL returned by `list_pages`. | There is no remote search tool. Ask your agent to list the relevant pages and read them. These tools read documentation; they do not access customer records or execute billing operations. For a client that accepts `mcpServers` configuration: ```json { "mcpServers": { "caret-help": { "url": "https://my.caretlegal.com/docs/mcp" } } } ``` For staging, use `https://staging.caretlegal.net/docs/mcp`. A local built Worker can be reached at `http://localhost:3076/docs/mcp`. The public discovery card is at `/docs/mcp/server-card`. After connecting, ask: “List the documentation pages, then read the guide about API access.” Your client should show `list_pages` and `get_page`. Use the exact endpoint without a trailing slash. Opening it in a browser sends `GET` and returns `405`; MCP clients use `POST`. If the endpoint or `/docs/llms-full.txt` returns `404`, check that the Nimbus Worker is deployed and that the portal points to its origin. Those paths are not evidence that an older docs deployment has been migrated. ## Documentation for LLMs - [llms.txt](/docs/llms.txt) is the compact index of this site's guides and API references. - [llms-full.txt](/docs/llms-full.txt) contains the full documentation in one text file. - Every documentation page and generated API operation also has a **View as Markdown** link. Use the compact index to find a topic, then read the linked Markdown. Use the full export when you need the complete published context. ## OpenAPI [Download the combined OpenAPI specification](/docs/openapi.json) for the published ACF, communications and external-client APIs. This file is generated from the specifications owned by the API routes, with each operation's authentication requirements preserved. | API | Interactive reference | Standalone specification | | --- | --- | --- | | ACF | [Identity and customer resolution](/docs/reference/acf) | [OpenAPI JSON](/docs/reference/acf/openapi.json) | | Communications | [Communications reference](/docs/reference/communications) | [OpenAPI JSON](/docs/reference/communications/openapi.json) | | External clients | [Customer access and integrations](/docs/reference/external-clients) | [OpenAPI JSON](/docs/reference/external-clients/openapi.json) | An API specification explains a contract; it does not grant permission to call it. Use the credential, organization scope and permissions required by each operation. Documentation access and API access are separate. ## Using the published APIs The LLM exports contain the same public guides and API references as this help site. Authenticate separately to call an API. See the [API overview](/docs/api-reference) to choose a contract and read its authentication requirements. # API reference > Published integration contracts for ACF, communications and external customer access. Source: https://staging.caretlegal.net/docs/api-reference · Markdown: https://staging.caretlegal.net/docs/api-reference/index.md Choose the API for your integration. These references are generated from the API-owned OpenAPI specifications and include request parameters, authentication requirements, response schemas and examples. | API | Purpose | Reference | | --- | --- | --- | | ACF | Look up and register connector identities; resolve linked customer information | [ACF API](/docs/reference/acf) | | Communications | Initiate and inspect customer communications under the required scopes | [Communications API](/docs/reference/communications) | | External clients | Resolve customer identity and use supported onboarding, payment-setup and access integrations | [External integrations API](/docs/reference/external-clients) | ## Download the contracts [Combined OpenAPI JSON](/docs/openapi.json) includes all three published contracts, with operation paths relative to the API origin. You can also download each API's specification from its reference page. ## Authentication The reference states which credential each operation accepts. ACF key calls require the configured ACF API key and local organization context. Other integrations use their documented internal or partner credentials and required scopes. A portal sign-in does not automatically authorize a partner API operation. Use the environment and scoped credentials supplied for your integration. Partner API permissions are separate from portal roles. ## Read with an agent [LLM indexes and Markdown exports](/docs/agents) let an agent discover the guides and generated API references. Reading a schema does not grant access to customer records. # Get access to your company > Sign in, select the right company and request access when you need help. Source: https://staging.caretlegal.net/docs/getting-access · Markdown: https://staging.caretlegal.net/docs/getting-access/index.md ## Sign in Open the [Caret Billing Center](https://my.caretlegal.com) and sign in with the email address associated with your company access. If you received an onboarding or payment setup link, use that link to follow its specific setup workflow. ## Check the selected company Before viewing invoices, making a payment or changing payment information, check that the portal is showing the company you intend to work with. A person can have access to more than one company. ## Request access If you cannot find your company, use the [access request page](https://my.caretlegal.com/request-access). Follow the email verification and company details steps shown there. Verification confirms control of the email address; company access can still require review. Do not create a second company to work around a missing company. Provide your company name, the email you signed in with and any customer number or invoice reference you have when requesting help. ## An action is unavailable Your company role controls which pages and actions you can use. Ask your company administrator or Billing Support to review the access you need. Access to the portal does not automatically allow changing payment methods or managing other users. # Invoices and payments > Find transactions, inspect invoice details and follow the payment checkout flow. Source: https://staging.caretlegal.net/docs/invoices-and-payments · Markdown: https://staging.caretlegal.net/docs/invoices-and-payments/index.md ## Find an invoice 1. Sign in and check the selected company. 2. Open **Transactions**. 3. Use search and the available type, status and date filters to locate the transaction. 4. Open the transaction to inspect its details. The transaction list can contain invoices, payments, credit memos and refunds. The record type matters when comparing a balance with a payment or credit. ## Pay an invoice Use the payment action offered for an eligible invoice. Review the selected invoices, amount and company before continuing to checkout. Follow the checkout's payment steps and wait for the result. If the portal offers selection of multiple invoices, verify the complete selection before paying. A transaction that is already paid or otherwise ineligible may not offer a payment action. ## Download documents Use the download action on a transaction when it is available. The Transactions page also provides statement download for your company where permitted. ## A payment result is unclear Check the transaction and payment result before submitting a second payment. Share the invoice reference, approximate payment time and the message you saw with Billing Support. Do not send full card numbers, bank account numbers or sign-in codes. See [payment information](/docs/payment-information) to manage saved methods when your role permits it. # Know Your Menu > What each menu icon in the customer portal opens Source: https://staging.caretlegal.net/docs/know-your-menu · Markdown: https://staging.caretlegal.net/docs/know-your-menu/index.md The customer portal uses a few small menu icons. Each one has **one job**, and the Caret team uses the same icons the same way, so what you learn here applies on every page. | Menu | What it opens | Where you'll find it | | --- | --- | --- | | **Hamburger** (three equal lines) | The portal's main navigation: Dashboard, Transactions, Subscriptions, and Payment Information. | Top left, on a phone or narrow window. | | **Döner** (three lines getting shorter) | Filter and sort options for the list below it. | Above a list, next to search. | | **Bento** (a grid of squares) | A switch between Caret applications. | Not in use yet. | | **Kebab** (three vertical dots) | Actions for **one row**: one transaction or one user. | At the right end of the row. | | **Meatballs** (three horizontal dots) | **More actions** for the whole page or card you are looking at. | Next to the buttons at the top of a page or card. | ## Kebab: actions for one row Select **⋮** at the end of a row to act on that row only. - **Transactions:** **View transaction**, **View / Print PDF**, and **Download PDF**. - **Dashboard → Users:** **Remove Access** for that person. See [Managing Users](/docs/managing-users). ## Good to know - Three dots between page numbers are not a menu. They only mean some pages are skipped. - Actions that remove something are shown last, in red, and ask you to confirm. - Hover over or focus a menu icon to see its name, for example "Actions for INV-1042". # Managing Users > Invite and remove users from your customer portal organization Source: https://staging.caretlegal.net/docs/managing-users · Markdown: https://staging.caretlegal.net/docs/managing-users/index.md Company admins can manage who has access to their customer portal organization. ## Remove User Access 1. Open the customer portal. 2. Go to **Dashboard** and select **Users**. 3. Find the person who should no longer have access. 4. Select the **⋮** menu at the right end of their row. See [Know Your Menu](/docs/know-your-menu). 5. Select **Remove Access**. 6. Confirm **Remove Access**. The user is removed from your organization and can no longer access the portal after their current session refreshes. ## Requirements - You must be an organization admin. - You cannot remove your own access. - At least one organization admin must remain. ## Restore Access To restore access, invite the user again from **Dashboard > Users**. # Payment information > Review and manage payment methods with the permissions assigned to your company role. Source: https://staging.caretlegal.net/docs/payment-information · Markdown: https://staging.caretlegal.net/docs/payment-information/index.md Open **Payment Information** from the portal navigation after selecting the correct company. This page requires payment-information permission; your company role determines which actions are available. Review the saved payment methods and use the page's offered actions to add or update a method and choose a default where available. Enter sensitive payment details only in the secure payment form shown by the portal. A saved method, the default method and a payment already in progress are different things. Review the method and amount shown by the specific checkout or setup workflow before submitting it. If a method is missing or a payment section reports an error, note the message and contact Billing Support. Do not repeat a payment solely to test whether a saved method works. For invoice payments, see [Invoices and payments](/docs/invoices-and-payments). For missing permissions, see [Get access to your company](/docs/getting-access). # Application Connector Framework (ACF) API > Central ledger for tracking entity mappings across multiple external systems Source: https://staging.caretlegal.net/docs/reference/acf · Markdown: https://staging.caretlegal.net/docs/reference/acf/index.md Central ledger for tracking entity mappings across multiple external systems Version: 1.0.0 ## Servers - `https://api.caretlegal.net/acf` - `http://localhost:3061/acf` ## Sections - [Entity Mappings](/docs/reference/acf/tags/Entity-Mappings) - [Customer Resolution](/docs/reference/acf/tags/Customer-Resolution) # Resolve and hydrate a customer > Resolves a customer from any supported connector identifier, returns every identity linked by the ACF master ID, and hydrates an allowlisted company projection from each provider. The canonical customer entity maps to customer in Caret, NetSuite, Salesforce, and Stripe; it maps to organization in Clerk and Zendesk. Provider failures are returned as source status unavailable with partial=true and do not suppress successful providers. The operation is read-only and never changes ledger mappings. Source: https://staging.caretlegal.net/docs/reference/acf/Customer-Resolution/resolveAcfCustomer · Markdown: https://staging.caretlegal.net/docs/reference/acf/Customer-Resolution/resolveAcfCustomer/index.md Path: Application Connector Framework (ACF) API › Customer Resolution `GET /customers/resolve` Resolves a customer from any supported connector identifier, returns every identity linked by the ACF master ID, and hydrates an allowlisted company projection from each provider. The canonical customer entity maps to customer in Caret, NetSuite, Salesforce, and Stripe; it maps to organization in Clerk and Zendesk. Provider failures are returned as source status unavailable with partial=true and do not suppress successful providers. The operation is read-only and never changes ledger mappings. ## Authentication - `ApiKeyAuth`, apiKey, in header, header `x-acf-api-key` ## Query parameters - `connectorName` (`resolveAcfCustomer.query.connectorName`; string, required) — System whose identifier is supplied. - one of `"caret"`, `"netsuite"`, `"salesforce"`, `"stripe"`, `"clerk"`, `"zendesk"`, `"zoho"` - `entityId` (`resolveAcfCustomer.query.entityId`; string, required) — Customer or organization identifier in the selected connector. - minLength 1 ## Header parameters - `x-organization-id` (`resolveAcfCustomer.header.x-organization-id`; string, required) — Organization UUID - format `uuid` ## Code samples ### cURL ```bash curl --request GET \ --url 'https://api.caretlegal.net/acf/customers/resolve?connectorName=caret&entityId=0014v00002jSil8AAC' \ --header 'x-acf-api-key: ' \ --header 'x-organization-id: 497f6eca-6276-4993-bfeb-53cbbbba6f08' ``` ### TypeScript ```typescript const url = 'https://api.caretlegal.net/acf/customers/resolve?connectorName=caret&entityId=0014v00002jSil8AAC'; const options = { method: 'GET', headers: { 'x-organization-id': '497f6eca-6276-4993-bfeb-53cbbbba6f08', 'x-acf-api-key': '' } }; fetch(url, options) .then(res => res.json()) .then(json => console.log(json)) .catch(err => console.error(err)); ``` ### Python ```python import requests url = "https://api.caretlegal.net/acf/customers/resolve?connectorName=caret&entityId=0014v00002jSil8AAC" headers = { "x-organization-id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "x-acf-api-key": "" } response = requests.get(url, headers=headers) print(response.text) ``` ## Responses ### 200 Resolved customer, including partial provider results when applicable. #### Example ```json { "success": true, "data": { "lookup": { "connectorName": "salesforce", "entityId": "0014v00002jSil8AAC" }, "masterId": "12d37fdd-eff5-46f0-807a-52f7e79e02da", "identities": [], "sources": [], "comparison": { "sources": [], "fields": [] }, "billing": null, "partial": false, "resolvedAt": "2026-08-04T20:00:00.000Z" } } ``` - `success` (`resolveAcfCustomer.response.200.success`; boolean, required) - `data` (`resolveAcfCustomer.response.200.data`; object, required) - `lookup` (`resolveAcfCustomer.response.200.data.lookup`; object, required) - `connectorName` (`resolveAcfCustomer.response.200.data.lookup.connectorName`; string, required) - one of `"caret"`, `"netsuite"`, `"salesforce"`, `"stripe"`, `"clerk"`, `"zendesk"`, `"zoho"` - `entityId` (`resolveAcfCustomer.response.200.data.lookup.entityId`; string, required) - `masterId` (`resolveAcfCustomer.response.200.data.masterId`; string, required) - format `uuid` - `identities` (`resolveAcfCustomer.response.200.data.identities`; array, required) - `connectorEntityDetails` (`resolveAcfCustomer.response.200.data.identities.connectorEntityDetails`; object, required) - `entityName` (`resolveAcfCustomer.response.200.data.identities.entityName`; string, required) - `connectorEntityHash` (`resolveAcfCustomer.response.200.data.identities.connectorEntityHash`; string, required) - `entityId` (`resolveAcfCustomer.response.200.data.identities.entityId`; string, required) - `connectorName` (`resolveAcfCustomer.response.200.data.identities.connectorName`; string, required) - `updatedDate` (`resolveAcfCustomer.response.200.data.identities.updatedDate`; string, required) - format `date-time` - `masterId` (`resolveAcfCustomer.response.200.data.identities.masterId`; string, required) - format `uuid` - `senderObjectHash` (`resolveAcfCustomer.response.200.data.identities.senderObjectHash`; map, required) - `configId` (`resolveAcfCustomer.response.200.data.identities.configId`; string | null, required) - `sources` (`resolveAcfCustomer.response.200.data.sources`; array, required) - `system` (`resolveAcfCustomer.response.200.data.sources.system`; string, required) - one of `"netsuite"`, `"salesforce"`, `"stripe"`, `"clerk"`, `"zendesk"`, `"zoho"` - `label` (`resolveAcfCustomer.response.200.data.sources.label`; string, required) - `entityName` (`resolveAcfCustomer.response.200.data.sources.entityName`; string, required) - one of `"customer"`, `"organization"` - `recordId` (`resolveAcfCustomer.response.200.data.sources.recordId`; string | null, required) - `status` (`resolveAcfCustomer.response.200.data.sources.status`; string, required) - one of `"available"`, `"unavailable"`, `"not_linked"` - `values` (`resolveAcfCustomer.response.200.data.sources.values`; object, required) — Allowlisted CBC company projection. This is not a raw provider payload. - `name` (`resolveAcfCustomer.response.200.data.sources.values.name`; string | null, required) - `email` (`resolveAcfCustomer.response.200.data.sources.values.email`; string | null, required) - `phone` (`resolveAcfCustomer.response.200.data.sources.values.phone`; string | null, required) - `website` (`resolveAcfCustomer.response.200.data.sources.values.website`; string | null, required) - `address` (`resolveAcfCustomer.response.200.data.sources.values.address`; string | null, required) - `comparison` (`resolveAcfCustomer.response.200.data.comparison`; object, required) - `sources` (`resolveAcfCustomer.response.200.data.comparison.sources`; array, required) - `system` (`resolveAcfCustomer.response.200.data.comparison.sources.system`; string, required) - one of `"netsuite"`, `"salesforce"`, `"stripe"`, `"clerk"`, `"zendesk"`, `"zoho"` - `label` (`resolveAcfCustomer.response.200.data.comparison.sources.label`; string, required) - `entityName` (`resolveAcfCustomer.response.200.data.comparison.sources.entityName`; string, required) - one of `"customer"`, `"organization"` - `recordId` (`resolveAcfCustomer.response.200.data.comparison.sources.recordId`; string | null, required) - `status` (`resolveAcfCustomer.response.200.data.comparison.sources.status`; string, required) - one of `"available"`, `"unavailable"`, `"not_linked"` - `values` (`resolveAcfCustomer.response.200.data.comparison.sources.values`; object, required) — Allowlisted CBC company projection. This is not a raw provider payload. - `name` (`resolveAcfCustomer.response.200.data.comparison.sources.values.name`; string | null, required) - `email` (`resolveAcfCustomer.response.200.data.comparison.sources.values.email`; string | null, required) - `phone` (`resolveAcfCustomer.response.200.data.comparison.sources.values.phone`; string | null, required) - `website` (`resolveAcfCustomer.response.200.data.comparison.sources.values.website`; string | null, required) - `address` (`resolveAcfCustomer.response.200.data.comparison.sources.values.address`; string | null, required) - `fields` (`resolveAcfCustomer.response.200.data.comparison.fields`; array, required) - `key` (`resolveAcfCustomer.response.200.data.comparison.fields.key`; string, required) - one of `"name"`, `"email"`, `"phone"`, `"website"`, `"address"` - `label` (`resolveAcfCustomer.response.200.data.comparison.fields.label`; string, required) - `status` (`resolveAcfCustomer.response.200.data.comparison.fields.status`; string, required) - one of `"match"`, `"mismatch"`, `"insufficient"` - `values` (`resolveAcfCustomer.response.200.data.comparison.fields.values`; map, required) - `billing` (`resolveAcfCustomer.response.200.data.billing`; object, required, nullable) — Zoho Billing to Stripe payment-method reconciliation. Resolves the Zoho customer from the NetSuite subscription id, firm id, Salesforce account id, or billing email, then compares its payment instruments with the saved payment methods on the linked Stripe customer. - `verdict` (`resolveAcfCustomer.response.200.data.billing.verdict`; string, required) - one of `"match"`, `"mismatch"`, `"no_zoho_record"`, `"no_stripe_customer"`, `"no_payment_method"`, `"unverified"` - `summary` (`resolveAcfCustomer.response.200.data.billing.summary`; string, required) - `checks` (`resolveAcfCustomer.response.200.data.billing.checks`; array, required) - `key` (`resolveAcfCustomer.response.200.data.billing.checks.key`; string, required) - one of `"last_four"`, `"netsuite_link"`, `"name"`, `"email"` - `label` (`resolveAcfCustomer.response.200.data.billing.checks.label`; string, required) - `status` (`resolveAcfCustomer.response.200.data.billing.checks.status`; string, required) - one of `"match"`, `"mismatch"`, `"insufficient"` - `zoho` (`resolveAcfCustomer.response.200.data.billing.checks.zoho`; string, required, nullable) - `stripe` (`resolveAcfCustomer.response.200.data.billing.checks.stripe`; string, required, nullable) - `keys` (`resolveAcfCustomer.response.200.data.billing.keys`; map, required) - `zoho` (`resolveAcfCustomer.response.200.data.billing.zoho`; object, required) — Zoho customer, subscriptions, and payment instruments on file. `matchedBy` is `acf_ledger` when the Zoho identity registered by ACF sync was reused, otherwise the NetSuite key that located it. - `stripe` (`resolveAcfCustomer.response.200.data.billing.stripe`; object, required) — Stripe customer and saved payment methods. - `resolvedAt` (`resolveAcfCustomer.response.200.data.billing.resolvedAt`; string, required) - format `date-time` - `partial` (`resolveAcfCustomer.response.200.data.partial`; boolean, required) — True when at least one supported provider is unavailable or not linked. - `resolvedAt` (`resolveAcfCustomer.response.200.data.resolvedAt`; string, required) - format `date-time` ### 400 Invalid connector, missing identifier, or missing organization context. #### Example ```json { "success": false, "error": "string" } ``` - `success` (`resolveAcfCustomer.response.400.success`; boolean, optional) - example `false` - `error` (`resolveAcfCustomer.response.400.error`; string, optional) — Error message ### 401 Authentication required. #### Example ```json { "success": false, "error": "string" } ``` - `success` (`resolveAcfCustomer.response.401.success`; boolean, optional) - example `false` - `error` (`resolveAcfCustomer.response.401.error`; string, optional) — Error message ### 404 No ACF customer mapping exists for the supplied connector identifier. #### Example ```json { "success": false, "error": "string" } ``` - `success` (`resolveAcfCustomer.response.404.success`; boolean, optional) - example `false` - `error` (`resolveAcfCustomer.response.404.error`; string, optional) — Error message # Get by Master ID > Get all entities linked to a specific Master ID Source: https://staging.caretlegal.net/docs/reference/acf/Entity-Mappings/getByMasterId · Markdown: https://staging.caretlegal.net/docs/reference/acf/Entity-Mappings/getByMasterId/index.md Path: Application Connector Framework (ACF) API › Entity Mappings `GET /{masterId}` Get all entities linked to a specific Master ID ## Authentication - `ApiKeyAuth`, apiKey, in header, header `x-acf-api-key` ## Path parameters - `masterId` (`getByMasterId.path.masterId`; string, required) — Master ID to lookup - format `uuid` ## Header parameters - `x-organization-id` (`getByMasterId.header.x-organization-id`; string, required) — Organization UUID - format `uuid` ## Code samples ### cURL ```bash curl --request GET \ --url 'https://api.caretlegal.net/acf/' \ --header 'x-acf-api-key: ' \ --header 'x-organization-id: 497f6eca-6276-4993-bfeb-53cbbbba6f08' ``` ### TypeScript ```typescript const url = 'https://api.caretlegal.net/acf/'; const options = { method: 'GET', headers: { 'x-organization-id': '497f6eca-6276-4993-bfeb-53cbbbba6f08', 'x-acf-api-key': '' } }; fetch(url, options) .then(res => res.json()) .then(json => console.log(json)) .catch(err => console.error(err)); ``` ### Python ```python import requests url = "https://api.caretlegal.net/acf/" headers = { "x-organization-id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "x-acf-api-key": "" } response = requests.get(url, headers=headers) print(response.text) ``` ## Responses ### 200 Linked entities found #### Example ```json { "success": true, "data": [ { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "masterId": "773333e0-2d32-466f-b4b2-e6afdbf6dd5e", "organizationId": "7bc05553-4b68-44e8-b7bc-37be63c6d9e9", "connectorName": "stripe", "entityName": "customer", "entityId": "cus_abc123", "connectorEntityHash": "string", "senderObjectHash": { "property1": "string", "property2": "string" }, "connectorEntityDetails": {}, "createdAt": "2019-08-24T14:15:22Z", "updatedAt": "2019-08-24T14:15:22Z" } ] } ``` - `success` (`getByMasterId.response.200.success`; boolean, optional) - `data` (`getByMasterId.response.200.data`; array, optional) - `id` (`getByMasterId.response.200.data.id`; string, required) — Internal ACF record ID - format `uuid` - `masterId` (`getByMasterId.response.200.data.masterId`; string, required) — Master ID linking entities across systems - format `uuid` - `connectorName` (`getByMasterId.response.200.data.connectorName`; string, required) — External system name (e.g., netsuite, stripe, zendesk) - example `"stripe"` - `entityName` (`getByMasterId.response.200.data.entityName`; string, required) — Type of entity (e.g., customer, invoice) - example `"customer"` - `entityId` (`getByMasterId.response.200.data.entityId`; string, required) — External system's ID for this entity - example `"cus_abc123"` - `organizationId` (`getByMasterId.response.200.data.organizationId`; string, optional) — Organization this record belongs to - format `uuid` - `connectorEntityHash` (`getByMasterId.response.200.data.connectorEntityHash`; string, optional) — MD5 hash for deduplication - `senderObjectHash` (`getByMasterId.response.200.data.senderObjectHash`; map, optional) — Tracks which systems have processed this record - `connectorEntityDetails` (`getByMasterId.response.200.data.connectorEntityDetails`; object, optional) — Additional metadata from the connector - `createdAt` (`getByMasterId.response.200.data.createdAt`; string, optional) - format `date-time` - `updatedAt` (`getByMasterId.response.200.data.updatedAt`; string, optional) - format `date-time` ### 401 Authentication required #### Example ```json { "success": false, "error": "string" } ``` - `success` (`getByMasterId.response.401.success`; boolean, optional) - example `false` - `error` (`getByMasterId.response.401.error`; string, optional) — Error message ### 404 Master ID not found #### Example ```json { "success": false, "error": "string" } ``` - `success` (`getByMasterId.response.404.success`; boolean, optional) - example `false` - `error` (`getByMasterId.response.404.error`; string, optional) — Error message # Lookup entity > Query the ledger for an entity and get all linked records Source: https://staging.caretlegal.net/docs/reference/acf/Entity-Mappings/lookupEntity · Markdown: https://staging.caretlegal.net/docs/reference/acf/Entity-Mappings/lookupEntity/index.md Path: Application Connector Framework (ACF) API › Entity Mappings `GET /` Query the ledger for an entity and get all linked records ## Authentication - `ApiKeyAuth`, apiKey, in header, header `x-acf-api-key` ## Query parameters - `connectorName` (`lookupEntity.query.connectorName`; string, required) — External system name - `entityName` (`lookupEntity.query.entityName`; string, required) — Type of entity - `entityId` (`lookupEntity.query.entityId`; string, required) — External system's ID ## Header parameters - `x-organization-id` (`lookupEntity.header.x-organization-id`; string, required) — Organization UUID - format `uuid` ## Code samples ### cURL ```bash curl --request GET \ --url 'https://api.caretlegal.net/acf/?connectorName=netsuite&entityName=customer&entityId=D5720-00' \ --header 'x-acf-api-key: ' \ --header 'x-organization-id: 497f6eca-6276-4993-bfeb-53cbbbba6f08' ``` ### TypeScript ```typescript const url = 'https://api.caretlegal.net/acf/?connectorName=netsuite&entityName=customer&entityId=D5720-00'; const options = { method: 'GET', headers: { 'x-organization-id': '497f6eca-6276-4993-bfeb-53cbbbba6f08', 'x-acf-api-key': '' } }; fetch(url, options) .then(res => res.json()) .then(json => console.log(json)) .catch(err => console.error(err)); ``` ### Python ```python import requests url = "https://api.caretlegal.net/acf/?connectorName=netsuite&entityName=customer&entityId=D5720-00" headers = { "x-organization-id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "x-acf-api-key": "" } response = requests.get(url, headers=headers) print(response.text) ``` ## Responses ### 200 Entity found with linked records #### Example ```json { "success": true, "data": [ { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "masterId": "773333e0-2d32-466f-b4b2-e6afdbf6dd5e", "organizationId": "7bc05553-4b68-44e8-b7bc-37be63c6d9e9", "connectorName": "stripe", "entityName": "customer", "entityId": "cus_abc123", "connectorEntityHash": "string", "senderObjectHash": { "property1": "string", "property2": "string" }, "connectorEntityDetails": {}, "createdAt": "2019-08-24T14:15:22Z", "updatedAt": "2019-08-24T14:15:22Z" } ] } ``` - `success` (`lookupEntity.response.200.success`; boolean, optional) - `data` (`lookupEntity.response.200.data`; array, optional) - `id` (`lookupEntity.response.200.data.id`; string, required) — Internal ACF record ID - format `uuid` - `masterId` (`lookupEntity.response.200.data.masterId`; string, required) — Master ID linking entities across systems - format `uuid` - `connectorName` (`lookupEntity.response.200.data.connectorName`; string, required) — External system name (e.g., netsuite, stripe, zendesk) - example `"stripe"` - `entityName` (`lookupEntity.response.200.data.entityName`; string, required) — Type of entity (e.g., customer, invoice) - example `"customer"` - `entityId` (`lookupEntity.response.200.data.entityId`; string, required) — External system's ID for this entity - example `"cus_abc123"` - `organizationId` (`lookupEntity.response.200.data.organizationId`; string, optional) — Organization this record belongs to - format `uuid` - `connectorEntityHash` (`lookupEntity.response.200.data.connectorEntityHash`; string, optional) — MD5 hash for deduplication - `senderObjectHash` (`lookupEntity.response.200.data.senderObjectHash`; map, optional) — Tracks which systems have processed this record - `connectorEntityDetails` (`lookupEntity.response.200.data.connectorEntityDetails`; object, optional) — Additional metadata from the connector - `createdAt` (`lookupEntity.response.200.data.createdAt`; string, optional) - format `date-time` - `updatedAt` (`lookupEntity.response.200.data.updatedAt`; string, optional) - format `date-time` ### 401 Authentication required #### Example ```json { "success": false, "error": "string" } ``` - `success` (`lookupEntity.response.401.success`; boolean, optional) - example `false` - `error` (`lookupEntity.response.401.error`; string, optional) — Error message ### 404 Entity not found #### Example ```json { "success": false, "error": "string" } ``` - `success` (`lookupEntity.response.404.success`; boolean, optional) - example `false` - `error` (`lookupEntity.response.404.error`; string, optional) — Error message # Register entity > Register a new entity mapping in the ledger Source: https://staging.caretlegal.net/docs/reference/acf/Entity-Mappings/registerEntity · Markdown: https://staging.caretlegal.net/docs/reference/acf/Entity-Mappings/registerEntity/index.md Path: Application Connector Framework (ACF) API › Entity Mappings `POST /` Register a new entity mapping in the ledger ## Authentication - `ApiKeyAuth`, apiKey, in header, header `x-acf-api-key` ## Header parameters - `x-organization-id` (`registerEntity.header.x-organization-id`; string, required) — Organization UUID - format `uuid` ## Request body _Required._ - `connectorName` (`registerEntity.connectorName`; string, required) — External system name - minLength 1; example `"stripe"` - `entityName` (`registerEntity.entityName`; string, required) — Type of entity - minLength 1; example `"customer"` - `entityId` (`registerEntity.entityId`; string, required) — External system's ID - minLength 1; example `"cus_abc123"` - `connectorEntityDetails` (`registerEntity.connectorEntityDetails`; object, optional) — Optional additional metadata - `masterId` (`registerEntity.masterId`; string, optional) — Optional - link to existing master ID - format `uuid` ## Example request ```json { "connectorName": "stripe", "entityName": "customer", "entityId": "cus_abc123", "connectorEntityDetails": {}, "masterId": "773333e0-2d32-466f-b4b2-e6afdbf6dd5e" } ``` ## Code samples ### cURL ```bash curl --request POST \ --url https://api.caretlegal.net/acf/ \ --header 'Content-Type: application/json' \ --header 'x-acf-api-key: ' \ --header 'x-organization-id: 497f6eca-6276-4993-bfeb-53cbbbba6f08' \ --data ' { "connectorName": "stripe", "entityName": "customer", "entityId": "cus_abc123", "connectorEntityDetails": {}, "masterId": "773333e0-2d32-466f-b4b2-e6afdbf6dd5e" } ' ``` ### TypeScript ```typescript const url = 'https://api.caretlegal.net/acf/'; const options = { method: 'POST', headers: { 'Content-Type': 'application/json', 'x-organization-id': '497f6eca-6276-4993-bfeb-53cbbbba6f08', 'x-acf-api-key': '' }, body: JSON.stringify({ connectorName: 'stripe', entityName: 'customer', entityId: 'cus_abc123', connectorEntityDetails: {}, masterId: '773333e0-2d32-466f-b4b2-e6afdbf6dd5e' }) }; fetch(url, options) .then(res => res.json()) .then(json => console.log(json)) .catch(err => console.error(err)); ``` ### Python ```python import requests url = "https://api.caretlegal.net/acf/" payload = { "connectorName": "stripe", "entityName": "customer", "entityId": "cus_abc123", "connectorEntityDetails": {}, "masterId": "773333e0-2d32-466f-b4b2-e6afdbf6dd5e" } headers = { "Content-Type": "application/json", "x-organization-id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "x-acf-api-key": "" } response = requests.post(url, json=payload, headers=headers) print(response.text) ``` ## Responses ### 200 Entity already exists #### Example ```json { "success": true, "data": { "entry": { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "masterId": "773333e0-2d32-466f-b4b2-e6afdbf6dd5e", "organizationId": "7bc05553-4b68-44e8-b7bc-37be63c6d9e9", "connectorName": "stripe", "entityName": "customer", "entityId": "cus_abc123", "connectorEntityHash": "string", "senderObjectHash": { "property1": "string", "property2": "string" }, "connectorEntityDetails": {}, "createdAt": "2019-08-24T14:15:22Z", "updatedAt": "2019-08-24T14:15:22Z" }, "isNew": true } } ``` - `success` (`registerEntity.response.200.success`; boolean, optional) - `data` (`registerEntity.response.200.data`; object, optional) - `entry` (`registerEntity.response.200.data.entry`; object, optional) - `id` (`registerEntity.response.200.data.entry.id`; string, required) — Internal ACF record ID - format `uuid` - `masterId` (`registerEntity.response.200.data.entry.masterId`; string, required) — Master ID linking entities across systems - format `uuid` - `connectorName` (`registerEntity.response.200.data.entry.connectorName`; string, required) — External system name (e.g., netsuite, stripe, zendesk) - example `"stripe"` - `entityName` (`registerEntity.response.200.data.entry.entityName`; string, required) — Type of entity (e.g., customer, invoice) - example `"customer"` - `entityId` (`registerEntity.response.200.data.entry.entityId`; string, required) — External system's ID for this entity - example `"cus_abc123"` - `organizationId` (`registerEntity.response.200.data.entry.organizationId`; string, optional) — Organization this record belongs to - format `uuid` - `connectorEntityHash` (`registerEntity.response.200.data.entry.connectorEntityHash`; string, optional) — MD5 hash for deduplication - `senderObjectHash` (`registerEntity.response.200.data.entry.senderObjectHash`; map, optional) — Tracks which systems have processed this record - `connectorEntityDetails` (`registerEntity.response.200.data.entry.connectorEntityDetails`; object, optional) — Additional metadata from the connector - `createdAt` (`registerEntity.response.200.data.entry.createdAt`; string, optional) - format `date-time` - `updatedAt` (`registerEntity.response.200.data.entry.updatedAt`; string, optional) - format `date-time` - `isNew` (`registerEntity.response.200.data.isNew`; boolean, optional) — True if a new record was created ### 201 New entity created #### Example ```json { "success": true, "data": { "entry": { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "masterId": "773333e0-2d32-466f-b4b2-e6afdbf6dd5e", "organizationId": "7bc05553-4b68-44e8-b7bc-37be63c6d9e9", "connectorName": "stripe", "entityName": "customer", "entityId": "cus_abc123", "connectorEntityHash": "string", "senderObjectHash": { "property1": "string", "property2": "string" }, "connectorEntityDetails": {}, "createdAt": "2019-08-24T14:15:22Z", "updatedAt": "2019-08-24T14:15:22Z" }, "isNew": true } } ``` - `success` (`registerEntity.response.201.success`; boolean, optional) - `data` (`registerEntity.response.201.data`; object, optional) - `entry` (`registerEntity.response.201.data.entry`; object, optional) - `id` (`registerEntity.response.201.data.entry.id`; string, required) — Internal ACF record ID - format `uuid` - `masterId` (`registerEntity.response.201.data.entry.masterId`; string, required) — Master ID linking entities across systems - format `uuid` - `connectorName` (`registerEntity.response.201.data.entry.connectorName`; string, required) — External system name (e.g., netsuite, stripe, zendesk) - example `"stripe"` - `entityName` (`registerEntity.response.201.data.entry.entityName`; string, required) — Type of entity (e.g., customer, invoice) - example `"customer"` - `entityId` (`registerEntity.response.201.data.entry.entityId`; string, required) — External system's ID for this entity - example `"cus_abc123"` - `organizationId` (`registerEntity.response.201.data.entry.organizationId`; string, optional) — Organization this record belongs to - format `uuid` - `connectorEntityHash` (`registerEntity.response.201.data.entry.connectorEntityHash`; string, optional) — MD5 hash for deduplication - `senderObjectHash` (`registerEntity.response.201.data.entry.senderObjectHash`; map, optional) — Tracks which systems have processed this record - `connectorEntityDetails` (`registerEntity.response.201.data.entry.connectorEntityDetails`; object, optional) — Additional metadata from the connector - `createdAt` (`registerEntity.response.201.data.entry.createdAt`; string, optional) - format `date-time` - `updatedAt` (`registerEntity.response.201.data.entry.updatedAt`; string, optional) - format `date-time` - `isNew` (`registerEntity.response.201.data.isNew`; boolean, optional) — True if a new record was created ### 400 Invalid request #### Example ```json { "success": false, "error": "string" } ``` - `success` (`registerEntity.response.400.success`; boolean, optional) - example `false` - `error` (`registerEntity.response.400.error`; string, optional) — Error message ### 401 Authentication required #### Example ```json { "success": false, "error": "string" } ``` - `success` (`registerEntity.response.401.success`; boolean, optional) - example `false` - `error` (`registerEntity.response.401.error`; string, optional) — Error message # Customer Resolution > Read-only identity resolution and allowlisted provider hydration for CBC customers Source: https://staging.caretlegal.net/docs/reference/acf/tags/Customer-Resolution · Markdown: https://staging.caretlegal.net/docs/reference/acf/tags/Customer-Resolution/index.md Path: Application Connector Framework (ACF) API Read-only identity resolution and allowlisted provider hydration for CBC customers ## Operations - [Resolve and hydrate a customer](/docs/reference/acf/Customer-Resolution/resolveAcfCustomer) # Entity Mappings > Operations for managing entity mappings across systems Source: https://staging.caretlegal.net/docs/reference/acf/tags/Entity-Mappings · Markdown: https://staging.caretlegal.net/docs/reference/acf/tags/Entity-Mappings/index.md Path: Application Connector Framework (ACF) API Operations for managing entity mappings across systems ## Operations - [Lookup entity](/docs/reference/acf/Entity-Mappings/lookupEntity) - [Register entity](/docs/reference/acf/Entity-Mappings/registerEntity) - [Get by Master ID](/docs/reference/acf/Entity-Mappings/getByMasterId) # Communications API > Public API for initiating customer-visible communications through the local communications ledger. Source: https://staging.caretlegal.net/docs/reference/communications · Markdown: https://staging.caretlegal.net/docs/reference/communications/index.md Public API for initiating customer-visible communications through the local communications ledger. Version: 1.0.0 ## Servers - `https://api.caretlegal.net/communications` - `http://localhost:3061/communications` ## Sections - [Communications](/docs/reference/communications/tags/Communications) # Query customer communications Source: https://staging.caretlegal.net/docs/reference/communications/Communications/queryCommunications · Markdown: https://staging.caretlegal.net/docs/reference/communications/Communications/queryCommunications/index.md Path: Communications API › Communications `GET /` ## Authentication Requires one of the following: - `InternalApiKey`, apiKey, in header, header `Authorization` - `PartnerBearer`, http, header `Authorization` ## Query parameters - `sourceId` (`queryCommunications.query.sourceId`; string, required) — External customer ID, such as a NetSuite customer internal ID. - `acfSource` (`queryCommunications.query.acfSource`; string, optional) — Connector/source name in the ACF ledger. - default `"netsuite"` - `entityType` (`queryCommunications.query.entityType`; string, optional) - one of `"customer"`; default `"customer"` - `type` (`queryCommunications.query.type`; string, optional) — Comma-separated communication type filter, e.g. customer_statement. - `status` (`queryCommunications.query.status`; string, optional) — Comma-separated status filter. - `limit` (`queryCommunications.query.limit`; integer, optional) - min 1; max 100; default `50` - `offset` (`queryCommunications.query.offset`; integer, optional) - min 0; default `0` ## Header parameters - `x-organization-id` (`queryCommunications.header.x-organization-id`; string, required) — Local organization UUID used to scope ACF resolution and communication logging. - format `uuid` ## Code samples ### cURL ```bash curl --request GET \ --url 'https://api.caretlegal.net/communications/?sourceId=string' \ --header 'Authorization: ' \ --header 'x-organization-id: 497f6eca-6276-4993-bfeb-53cbbbba6f08' ``` ### TypeScript ```typescript const url = 'https://api.caretlegal.net/communications/?sourceId=string'; const options = { method: 'GET', headers: { 'x-organization-id': '497f6eca-6276-4993-bfeb-53cbbbba6f08', Authorization: '' } }; fetch(url, options) .then(res => res.json()) .then(json => console.log(json)) .catch(err => console.error(err)); ``` ### Python ```python import requests url = "https://api.caretlegal.net/communications/?sourceId=string" headers = { "x-organization-id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "Authorization": "" } response = requests.get(url, headers=headers) print(response.text) ``` ## Responses ### 200 Communications for the resolved customer. #### Example ```json { "success": true, "data": { "customerId": "87d8e330-2878-4742-a86f-dbbb3bf522ac", "organizationId": "7bc05553-4b68-44e8-b7bc-37be63c6d9e9", "recipientRef": { "entityType": "customer", "acfSource": "salesforce", "sourceId": "001xx000003DGbYAAW" }, "communications": [ {} ], "pagination": { "limit": 0, "offset": 0, "count": 0 } } } ``` - `success` (`queryCommunications.response.200.success`; boolean, optional) - example `true` - `data` (`queryCommunications.response.200.data`; object, optional) - `customerId` (`queryCommunications.response.200.data.customerId`; string, optional) — Resolved local customers.id. - format `uuid` - `organizationId` (`queryCommunications.response.200.data.organizationId`; string, optional) - format `uuid` - `recipientRef` (`queryCommunications.response.200.data.recipientRef`; object, optional) - `entityType` (`queryCommunications.response.200.data.recipientRef.entityType`; string, required) — Entity type to resolve through ACF. - one of `"customer"` - `acfSource` (`queryCommunications.response.200.data.recipientRef.acfSource`; string, required) — Connector/source name in the ACF ledger. - example `"salesforce"` - `sourceId` (`queryCommunications.response.200.data.recipientRef.sourceId`; string, required) — Source-system entity ID to resolve to a local customer. - example `"001xx000003DGbYAAW"` - `communications` (`queryCommunications.response.200.data.communications`; array, optional) - `pagination` (`queryCommunications.response.200.data.pagination`; object, optional) - `limit` (`queryCommunications.response.200.data.pagination.limit`; integer, optional) - `offset` (`queryCommunications.response.200.data.pagination.offset`; integer, optional) - `count` (`queryCommunications.response.200.data.pagination.count`; integer, optional) ### 400 Invalid request or organization scope. #### Example ```json { "success": false, "error": "string", "details": [ { "path": "string", "message": "string" } ] } ``` - `success` (`queryCommunications.response.400.success`; boolean, optional) - example `false` - `error` (`queryCommunications.response.400.error`; string, optional) - `details` (`queryCommunications.response.400.details`; array, optional) - `path` (`queryCommunications.response.400.details.path`; string, optional) - `message` (`queryCommunications.response.400.details.message`; string, optional) ### 401 Missing or invalid API key. #### Example ```json { "success": false, "error": "string", "details": [ { "path": "string", "message": "string" } ] } ``` - `success` (`queryCommunications.response.401.success`; boolean, optional) - example `false` - `error` (`queryCommunications.response.401.error`; string, optional) - `details` (`queryCommunications.response.401.details`; array, optional) - `path` (`queryCommunications.response.401.details.path`; string, optional) - `message` (`queryCommunications.response.401.details.message`; string, optional) ### 403 API key lacks communications:read. #### Example ```json { "success": false, "error": "string", "details": [ { "path": "string", "message": "string" } ] } ``` - `success` (`queryCommunications.response.403.success`; boolean, optional) - example `false` - `error` (`queryCommunications.response.403.error`; string, optional) - `details` (`queryCommunications.response.403.details`; array, optional) - `path` (`queryCommunications.response.403.details.path`; string, optional) - `message` (`queryCommunications.response.403.details.message`; string, optional) ### 404 Recipient reference did not resolve to a local customer. #### Example ```json { "success": false, "error": "string", "details": [ { "path": "string", "message": "string" } ] } ``` - `success` (`queryCommunications.response.404.success`; boolean, optional) - example `false` - `error` (`queryCommunications.response.404.error`; string, optional) - `details` (`queryCommunications.response.404.details`; array, optional) - `path` (`queryCommunications.response.404.details.path`; string, optional) - `message` (`queryCommunications.response.404.details.message`; string, optional) # Send a customer communication Source: https://staging.caretlegal.net/docs/reference/communications/Communications/sendCommunication · Markdown: https://staging.caretlegal.net/docs/reference/communications/Communications/sendCommunication/index.md Path: Communications API › Communications `POST /send` ## Authentication Requires one of the following: - `InternalApiKey`, apiKey, in header, header `Authorization` - `PartnerBearer`, http, header `Authorization` ## Header parameters - `x-organization-id` (`sendCommunication.header.x-organization-id`; string, required) — Local organization UUID used to scope ACF resolution and communication logging. - format `uuid` ## Request body _Required._ - `recipientRef` (`sendCommunication.recipientRef`; object, required) - `entityType` (`sendCommunication.recipientRef.entityType`; string, required) — Entity type to resolve through ACF. - one of `"customer"` - `acfSource` (`sendCommunication.recipientRef.acfSource`; string, required) — Connector/source name in the ACF ledger. - example `"salesforce"` - `sourceId` (`sendCommunication.recipientRef.sourceId`; string, required) — Source-system entity ID to resolve to a local customer. - example `"001xx000003DGbYAAW"` - `communicationType` (`sendCommunication.communicationType`; string, optional) — Use generic for ad-hoc email or customer_statement for a statement of account email. - one of `"generic"`, `"customer_statement"`; default `"generic"` - `recipients` (`sendCommunication.recipients`; object, optional) — Canonical recipient envelope. to is required when using recipients; contact.email remains supported as a legacy primary recipient. - `to` (`sendCommunication.recipients.to`; array, required) - one of: - `string` - `object` - `email` (`sendCommunication.recipients.to.2.email`; string, required) - format `email` - `name` (`sendCommunication.recipients.to.2.name`; string, optional) - `cc` (`sendCommunication.recipients.cc`; array, optional) - one of: - `string` - `object` - `email` (`sendCommunication.recipients.cc.2.email`; string, required) - format `email` - `name` (`sendCommunication.recipients.cc.2.name`; string, optional) - `bcc` (`sendCommunication.recipients.bcc`; array, optional) - one of: - `string` - `object` - `email` (`sendCommunication.recipients.bcc.2.email`; string, required) - format `email` - `name` (`sendCommunication.recipients.bcc.2.name`; string, optional) - `contact` (`sendCommunication.contact`; object, optional) — Legacy primary recipient override. Prefer recipients.to for new integrations. - `email` (`sendCommunication.contact.email`; string, optional) — Recipient email. Defaults to the local customer email when omitted. - format `email` - `firstName` (`sendCommunication.contact.firstName`; string, optional) - `lastName` (`sendCommunication.contact.lastName`; string, optional) - `name` (`sendCommunication.contact.name`; string, optional) — Display name used by generic email rendering when first/last are omitted. - `subject` (`sendCommunication.subject`; string, optional) — Required for generic communications. Customer statements generate their own subject. - example `"Action required: update your billing contact"` - `bodyHtml` (`sendCommunication.bodyHtml`; string, optional) — Rendered HTML body. Either bodyHtml or bodyText is required. - `bodyText` (`sendCommunication.bodyText`; string, optional) — Plain text body. Used to derive HTML when bodyHtml is omitted. - `metadata` (`sendCommunication.metadata`; object, optional) — Caller metadata. The API fortifies this with local communication and ACF resolution metadata. - `dateRange` (`sendCommunication.dateRange`; object, optional) — Statement period for customer_statement. Defaults to the trailing 12 months when omitted. - `startDate` (`sendCommunication.dateRange.startDate`; string, required) - format `date` - `endDate` (`sendCommunication.dateRange.endDate`; string, required) - format `date` - `ccEmails` (`sendCommunication.ccEmails`; array, optional) — Additional statement CC recipients. - format `email` - `customMessage` (`sendCommunication.customMessage`; string, optional) — Optional custom message for customer_statement emails. - `organizationName` (`sendCommunication.organizationName`; string, optional) — Optional display name used by the statement email template. - `idempotencyKey` (`sendCommunication.idempotencyKey`; string, optional) — Optional caller-supplied statement idempotency key. - `templateVariables` (`sendCommunication.templateVariables`; map, optional) - `replyTo` (`sendCommunication.replyTo`; string, optional) - format `email` - `cc` (`sendCommunication.cc`; one of, optional) - one of: `string`, `array` - `bcc` (`sendCommunication.bcc`; one of, optional) - one of: `string`, `array` ## Example requests ### Salesforce-initiated customer email ```json { "communicationType": "generic", "recipientRef": { "entityType": "customer", "acfSource": "salesforce", "sourceId": "001xx000003DGbYAAW" }, "contact": { "email": "billing@example.com", "name": "Example Customer" }, "subject": "Action required: billing update", "bodyHtml": "

Please update your billing information.

", "metadata": { "campaignId": "sf-campaign-123" } } ``` ### Generic email with decorated recipient envelope ```json { "communicationType": "generic", "recipientRef": { "entityType": "customer", "acfSource": "netsuite", "sourceId": "123" }, "recipients": { "to": [ { "email": "ap@example.com", "name": "Accounts Payable" } ], "cc": [ "owner@example.com" ], "bcc": [ { "email": "audit@example.com" } ] }, "subject": "Statement available", "bodyText": "Please review your statement." } ``` ### NetSuite-initiated statement email ```json { "communicationType": "customer_statement", "recipientRef": { "entityType": "customer", "acfSource": "netsuite", "sourceId": "123" }, "dateRange": { "startDate": "2026-01-01", "endDate": "2026-01-31" } } ``` ## Code samples ### cURL ```bash curl --request POST \ --url https://api.caretlegal.net/communications/send \ --header 'Authorization: ' \ --header 'Content-Type: application/json' \ --header 'x-organization-id: 497f6eca-6276-4993-bfeb-53cbbbba6f08' \ --data ' { "communicationType": "generic", "recipientRef": { "entityType": "customer", "acfSource": "salesforce", "sourceId": "001xx000003DGbYAAW" }, "contact": { "email": "billing@example.com", "name": "Example Customer" }, "subject": "Action required: billing update", "bodyHtml": "

Please update your billing information.

", "metadata": { "campaignId": "sf-campaign-123" } } ' ``` ### TypeScript ```typescript const url = 'https://api.caretlegal.net/communications/send'; const options = { method: 'POST', headers: { 'Content-Type': 'application/json', 'x-organization-id': '497f6eca-6276-4993-bfeb-53cbbbba6f08', Authorization: '' }, body: JSON.stringify({ communicationType: 'generic', recipientRef: { entityType: 'customer', acfSource: 'salesforce', sourceId: '001xx000003DGbYAAW' }, contact: {email: 'billing@example.com', name: 'Example Customer'}, subject: 'Action required: billing update', bodyHtml: '

Please update your billing information.

', metadata: {campaignId: 'sf-campaign-123'} }) }; fetch(url, options) .then(res => res.json()) .then(json => console.log(json)) .catch(err => console.error(err)); ``` ### Python ```python import requests url = "https://api.caretlegal.net/communications/send" payload = { "communicationType": "generic", "recipientRef": { "entityType": "customer", "acfSource": "salesforce", "sourceId": "001xx000003DGbYAAW" }, "contact": { "email": "billing@example.com", "name": "Example Customer" }, "subject": "Action required: billing update", "bodyHtml": "

Please update your billing information.

", "metadata": { "campaignId": "sf-campaign-123" } } headers = { "Content-Type": "application/json", "x-organization-id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "Authorization": "" } response = requests.post(url, json=payload, headers=headers) print(response.text) ``` ## Responses ### 202 Communication accepted, sent through the handler, and logged locally. #### Example ```json { "success": true, "data": { "communicationId": "f52b06d0-7b15-407a-9d29-49a465420dcd", "messageId": "string", "customerId": "87d8e330-2878-4742-a86f-dbbb3bf522ac", "organizationId": "7bc05553-4b68-44e8-b7bc-37be63c6d9e9", "recipientEmail": "user@example.com", "recipientEnvelope": { "to": [ "user@example.com" ], "cc": [ "user@example.com" ], "bcc": [ "user@example.com" ] }, "strategy": "customer-statement", "netsuiteCustomerId": "string", "dateRange": { "startDate": "2019-08-24", "endDate": "2019-08-24" } } } ``` - `success` (`sendCommunication.response.202.success`; boolean, optional) - example `true` - `data` (`sendCommunication.response.202.data`; object, optional) - `communicationId` (`sendCommunication.response.202.data.communicationId`; string, optional) — Local customer_communications ID. - format `uuid` - `messageId` (`sendCommunication.response.202.data.messageId`; string, optional) — Provider message ID when available. - `customerId` (`sendCommunication.response.202.data.customerId`; string, optional) — Resolved local customers.id. - format `uuid` - `organizationId` (`sendCommunication.response.202.data.organizationId`; string, optional) — Resolved local organizations.id. - format `uuid` - `recipientEmail` (`sendCommunication.response.202.data.recipientEmail`; string, optional) - format `email` - `recipientEnvelope` (`sendCommunication.response.202.data.recipientEnvelope`; object, optional) - `to` (`sendCommunication.response.202.data.recipientEnvelope.to`; array, optional) - format `email` - `cc` (`sendCommunication.response.202.data.recipientEnvelope.cc`; array, optional) - format `email` - `bcc` (`sendCommunication.response.202.data.recipientEnvelope.bcc`; array, optional) - format `email` - `strategy` (`sendCommunication.response.202.data.strategy`; string, optional) - example `"customer-statement"` - `netsuiteCustomerId` (`sendCommunication.response.202.data.netsuiteCustomerId`; string, optional) — NetSuite customer ID used for statement generation when applicable. - `dateRange` (`sendCommunication.response.202.data.dateRange`; object, optional) - `startDate` (`sendCommunication.response.202.data.dateRange.startDate`; string, optional) - format `date` - `endDate` (`sendCommunication.response.202.data.dateRange.endDate`; string, optional) - format `date` ### 400 Invalid request or organization scope. #### Example ```json { "success": false, "error": "string", "details": [ { "path": "string", "message": "string" } ] } ``` - `success` (`sendCommunication.response.400.success`; boolean, optional) - example `false` - `error` (`sendCommunication.response.400.error`; string, optional) - `details` (`sendCommunication.response.400.details`; array, optional) - `path` (`sendCommunication.response.400.details.path`; string, optional) - `message` (`sendCommunication.response.400.details.message`; string, optional) ### 401 Missing or invalid API key. #### Example ```json { "success": false, "error": "string", "details": [ { "path": "string", "message": "string" } ] } ``` - `success` (`sendCommunication.response.401.success`; boolean, optional) - example `false` - `error` (`sendCommunication.response.401.error`; string, optional) - `details` (`sendCommunication.response.401.details`; array, optional) - `path` (`sendCommunication.response.401.details.path`; string, optional) - `message` (`sendCommunication.response.401.details.message`; string, optional) ### 403 API key lacks communications:write. #### Example ```json { "success": false, "error": "string", "details": [ { "path": "string", "message": "string" } ] } ``` - `success` (`sendCommunication.response.403.success`; boolean, optional) - example `false` - `error` (`sendCommunication.response.403.error`; string, optional) - `details` (`sendCommunication.response.403.details`; array, optional) - `path` (`sendCommunication.response.403.details.path`; string, optional) - `message` (`sendCommunication.response.403.details.message`; string, optional) ### 404 Recipient reference did not resolve to a local customer. #### Example ```json { "success": false, "error": "string", "details": [ { "path": "string", "message": "string" } ] } ``` - `success` (`sendCommunication.response.404.success`; boolean, optional) - example `false` - `error` (`sendCommunication.response.404.error`; string, optional) - `details` (`sendCommunication.response.404.details`; array, optional) - `path` (`sendCommunication.response.404.details.path`; string, optional) - `message` (`sendCommunication.response.404.details.message`; string, optional) # Communications Source: https://staging.caretlegal.net/docs/reference/communications/tags/Communications · Markdown: https://staging.caretlegal.net/docs/reference/communications/tags/Communications/index.md Path: Communications API ## Operations - [Send a customer communication](/docs/reference/communications/Communications/sendCommunication) - [Query customer communications](/docs/reference/communications/Communications/queryCommunications) # External Customer Access API > Provider-agnostic customer lookup, guarded customer/contact creation, and customer-access magic links. Source: https://staging.caretlegal.net/docs/reference/external-clients · Markdown: https://staging.caretlegal.net/docs/reference/external-clients/index.md Provider-agnostic customer lookup, guarded customer/contact creation, and customer-access magic links. Version: 1.0.0 ## Servers - `https://api.caretlegal.net` - `http://localhost:3061` # Create or send a customer-access magic link > Resolves or guarded-creates customer/contact records, ensures Clerk org/user membership, creates a Clerk sign-in token, and either sends or returns the link. Source: https://staging.caretlegal.net/docs/reference/external-clients/createCustomerAccessMagicLink · Markdown: https://staging.caretlegal.net/docs/reference/external-clients/createCustomerAccessMagicLink/index.md Path: External Customer Access API `POST /integrations/external-clients/magic-link` Resolves or guarded-creates customer/contact records, ensures Clerk org/user membership, creates a Clerk sign-in token, and either sends or returns the link. ## Authentication - `PartnerApiKey`, http, header `Authorization` ## Header parameters - `x-organization-id` (`createCustomerAccessMagicLink.header.x-organization-id`; string, required) ## Request body _Required._ - `provider` (`createCustomerAccessMagicLink.provider`; string, required) - `externalCustomerId` (`createCustomerAccessMagicLink.externalCustomerId`; string, required) — Provider-generated internal customer/account/entity primary key. - `email` (`createCustomerAccessMagicLink.email`; string, required) - format `email` - `externalContactId` (`createCustomerAccessMagicLink.externalContactId`; string, optional) — Provider-generated internal contact primary key. - `firstName` (`createCustomerAccessMagicLink.firstName`; string, optional) - `lastName` (`createCustomerAccessMagicLink.lastName`; string, optional) - `fullName` (`createCustomerAccessMagicLink.fullName`; string, optional) - `phone` (`createCustomerAccessMagicLink.phone`; string, optional) - `customerName` (`createCustomerAccessMagicLink.customerName`; string, optional) — Required when createIfMissing is true. - `mode` (`createCustomerAccessMagicLink.mode`; string, optional) - one of `"send"`, `"return_link"`; default `"return_link"` - `createIfMissing` (`createCustomerAccessMagicLink.createIfMissing`; boolean, optional) - default `false` - `overrideDuplicateGuard` (`createCustomerAccessMagicLink.overrideDuplicateGuard`; boolean, optional) - default `false` - `overrideDuplicateReason` (`createCustomerAccessMagicLink.overrideDuplicateReason`; string, optional) - `tokenExpiresInSeconds` (`createCustomerAccessMagicLink.tokenExpiresInSeconds`; integer, optional) - min 300; max 604800; default `604800` - `redirectPath` (`createCustomerAccessMagicLink.redirectPath`; string, optional) — Optional in-app redirect path after sign-in. - `metadata` (`createCustomerAccessMagicLink.metadata`; object, optional) ## Example requests ### NetSuite send mode ```json { "provider": "netsuite", "externalCustomerId": "12345", "externalContactId": "67890", "email": "ap@example.com", "firstName": "Ava", "lastName": "Parker", "customerName": "Example Law", "mode": "send", "createIfMissing": true } ``` ### Salesforce return-link mode ```json { "provider": "salesforce", "externalCustomerId": "001xx000003DGbYAAW", "externalContactId": "003xx000004TmiYAAS", "email": "owner@example.com", "customerName": "Example Law", "mode": "return_link", "createIfMissing": true, "tokenExpiresInSeconds": 604800 } ``` ## Code samples ### cURL ```bash curl --request POST \ --url https://api.caretlegal.net/integrations/external-clients/magic-link \ --header 'Authorization: Bearer ' \ --header 'Content-Type: application/json' \ --header 'x-organization-id: string' \ --data ' { "provider": "netsuite", "externalCustomerId": "12345", "externalContactId": "67890", "email": "ap@example.com", "firstName": "Ava", "lastName": "Parker", "customerName": "Example Law", "mode": "send", "createIfMissing": true } ' ``` ### TypeScript ```typescript const url = 'https://api.caretlegal.net/integrations/external-clients/magic-link'; const options = { method: 'POST', headers: { 'Content-Type': 'application/json', 'x-organization-id': 'string', Authorization: 'Bearer ' }, body: JSON.stringify({ provider: 'netsuite', externalCustomerId: '12345', externalContactId: '67890', email: 'ap@example.com', firstName: 'Ava', lastName: 'Parker', customerName: 'Example Law', mode: 'send', createIfMissing: true }) }; fetch(url, options) .then(res => res.json()) .then(json => console.log(json)) .catch(err => console.error(err)); ``` ### Python ```python import requests url = "https://api.caretlegal.net/integrations/external-clients/magic-link" payload = { "provider": "netsuite", "externalCustomerId": "12345", "externalContactId": "67890", "email": "ap@example.com", "firstName": "Ava", "lastName": "Parker", "customerName": "Example Law", "mode": "send", "createIfMissing": True } headers = { "Content-Type": "application/json", "x-organization-id": "string", "Authorization": "Bearer " } response = requests.post(url, json=payload, headers=headers) print(response.text) ``` ## Responses ### 200 Magic link returned #### Example ```json { "success": true, "data": { "customerId": "87d8e330-2878-4742-a86f-dbbb3bf522ac", "contactId": "b5ec5d98-4bee-4da1-ad24-dde86346cb1d", "clerkOrganizationId": "string", "clerkUserId": "string", "customerCreated": true, "contactCreated": true, "mappingCreated": true, "caretCustomerMappingCreated": true, "contactMappingCreated": true, "clerkOrganizationCreated": true, "clerkOrganizationMappingCreated": true, "clerkUserCreated": true, "membershipCreated": true, "clerkUserMappingCreated": true, "duplicateGuardStatus": "not_applicable", "magicLinkSent": true, "magicLinkUrl": "http://example.com", "tokenExpiresInSeconds": 0, "tokenExpiresAt": "2019-08-24T14:15:22Z", "communicationId": "string", "messageId": "string" } } ``` - `success` (`createCustomerAccessMagicLink.response.200.success`; boolean, required) - `data` (`createCustomerAccessMagicLink.response.200.data`; object, required) - `customerId` (`createCustomerAccessMagicLink.response.200.data.customerId`; string, optional) - format `uuid` - `contactId` (`createCustomerAccessMagicLink.response.200.data.contactId`; string, optional) - format `uuid` - `clerkOrganizationId` (`createCustomerAccessMagicLink.response.200.data.clerkOrganizationId`; string, optional) - `clerkUserId` (`createCustomerAccessMagicLink.response.200.data.clerkUserId`; string, optional) - `customerCreated` (`createCustomerAccessMagicLink.response.200.data.customerCreated`; boolean, optional) - `contactCreated` (`createCustomerAccessMagicLink.response.200.data.contactCreated`; boolean, optional) - `mappingCreated` (`createCustomerAccessMagicLink.response.200.data.mappingCreated`; boolean, optional) - `caretCustomerMappingCreated` (`createCustomerAccessMagicLink.response.200.data.caretCustomerMappingCreated`; boolean, optional) - `contactMappingCreated` (`createCustomerAccessMagicLink.response.200.data.contactMappingCreated`; boolean, optional) - `clerkOrganizationCreated` (`createCustomerAccessMagicLink.response.200.data.clerkOrganizationCreated`; boolean, optional) - `clerkOrganizationMappingCreated` (`createCustomerAccessMagicLink.response.200.data.clerkOrganizationMappingCreated`; boolean, optional) - `clerkUserCreated` (`createCustomerAccessMagicLink.response.200.data.clerkUserCreated`; boolean, optional) - `membershipCreated` (`createCustomerAccessMagicLink.response.200.data.membershipCreated`; boolean, optional) - `clerkUserMappingCreated` (`createCustomerAccessMagicLink.response.200.data.clerkUserMappingCreated`; boolean, optional) - `duplicateGuardStatus` (`createCustomerAccessMagicLink.response.200.data.duplicateGuardStatus`; string, optional) - one of `"not_applicable"`, `"passed"`, `"blocked"`, `"overridden"`, `"matched_existing"` - `magicLinkSent` (`createCustomerAccessMagicLink.response.200.data.magicLinkSent`; boolean, optional) - `magicLinkUrl` (`createCustomerAccessMagicLink.response.200.data.magicLinkUrl`; string, optional) — Only present for return_link mode. - format `uri` - `tokenExpiresInSeconds` (`createCustomerAccessMagicLink.response.200.data.tokenExpiresInSeconds`; integer, optional) - `tokenExpiresAt` (`createCustomerAccessMagicLink.response.200.data.tokenExpiresAt`; string, optional) - format `date-time` - `communicationId` (`createCustomerAccessMagicLink.response.200.data.communicationId`; string, optional) - `messageId` (`createCustomerAccessMagicLink.response.200.data.messageId`; string, optional) ### 202 Magic-link send accepted #### Example ```json { "success": true, "data": { "customerId": "87d8e330-2878-4742-a86f-dbbb3bf522ac", "contactId": "b5ec5d98-4bee-4da1-ad24-dde86346cb1d", "clerkOrganizationId": "string", "clerkUserId": "string", "customerCreated": true, "contactCreated": true, "mappingCreated": true, "caretCustomerMappingCreated": true, "contactMappingCreated": true, "clerkOrganizationCreated": true, "clerkOrganizationMappingCreated": true, "clerkUserCreated": true, "membershipCreated": true, "clerkUserMappingCreated": true, "duplicateGuardStatus": "not_applicable", "magicLinkSent": true, "magicLinkUrl": "http://example.com", "tokenExpiresInSeconds": 0, "tokenExpiresAt": "2019-08-24T14:15:22Z", "communicationId": "string", "messageId": "string" } } ``` - `success` (`createCustomerAccessMagicLink.response.202.success`; boolean, required) - `data` (`createCustomerAccessMagicLink.response.202.data`; object, required) - `customerId` (`createCustomerAccessMagicLink.response.202.data.customerId`; string, optional) - format `uuid` - `contactId` (`createCustomerAccessMagicLink.response.202.data.contactId`; string, optional) - format `uuid` - `clerkOrganizationId` (`createCustomerAccessMagicLink.response.202.data.clerkOrganizationId`; string, optional) - `clerkUserId` (`createCustomerAccessMagicLink.response.202.data.clerkUserId`; string, optional) - `customerCreated` (`createCustomerAccessMagicLink.response.202.data.customerCreated`; boolean, optional) - `contactCreated` (`createCustomerAccessMagicLink.response.202.data.contactCreated`; boolean, optional) - `mappingCreated` (`createCustomerAccessMagicLink.response.202.data.mappingCreated`; boolean, optional) - `caretCustomerMappingCreated` (`createCustomerAccessMagicLink.response.202.data.caretCustomerMappingCreated`; boolean, optional) - `contactMappingCreated` (`createCustomerAccessMagicLink.response.202.data.contactMappingCreated`; boolean, optional) - `clerkOrganizationCreated` (`createCustomerAccessMagicLink.response.202.data.clerkOrganizationCreated`; boolean, optional) - `clerkOrganizationMappingCreated` (`createCustomerAccessMagicLink.response.202.data.clerkOrganizationMappingCreated`; boolean, optional) - `clerkUserCreated` (`createCustomerAccessMagicLink.response.202.data.clerkUserCreated`; boolean, optional) - `membershipCreated` (`createCustomerAccessMagicLink.response.202.data.membershipCreated`; boolean, optional) - `clerkUserMappingCreated` (`createCustomerAccessMagicLink.response.202.data.clerkUserMappingCreated`; boolean, optional) - `duplicateGuardStatus` (`createCustomerAccessMagicLink.response.202.data.duplicateGuardStatus`; string, optional) - one of `"not_applicable"`, `"passed"`, `"blocked"`, `"overridden"`, `"matched_existing"` - `magicLinkSent` (`createCustomerAccessMagicLink.response.202.data.magicLinkSent`; boolean, optional) - `magicLinkUrl` (`createCustomerAccessMagicLink.response.202.data.magicLinkUrl`; string, optional) — Only present for return_link mode. - format `uri` - `tokenExpiresInSeconds` (`createCustomerAccessMagicLink.response.202.data.tokenExpiresInSeconds`; integer, optional) - `tokenExpiresAt` (`createCustomerAccessMagicLink.response.202.data.tokenExpiresAt`; string, optional) - format `date-time` - `communicationId` (`createCustomerAccessMagicLink.response.202.data.communicationId`; string, optional) - `messageId` (`createCustomerAccessMagicLink.response.202.data.messageId`; string, optional) ### 400 Invalid request #### Example ```json { "success": false, "error": "string", "details": [ {} ] } ``` - `success` (`createCustomerAccessMagicLink.response.400.success`; boolean, required) - `error` (`createCustomerAccessMagicLink.response.400.error`; string, required) - `details` (`createCustomerAccessMagicLink.response.400.details`; array, optional) ### 401 Invalid API key #### Example ```json { "success": false, "error": "string", "details": [ {} ] } ``` - `success` (`createCustomerAccessMagicLink.response.401.success`; boolean, required) - `error` (`createCustomerAccessMagicLink.response.401.error`; string, required) - `details` (`createCustomerAccessMagicLink.response.401.details`; array, optional) ### 403 Missing scope #### Example ```json { "success": false, "error": "string", "details": [ {} ] } ``` - `success` (`createCustomerAccessMagicLink.response.403.success`; boolean, required) - `error` (`createCustomerAccessMagicLink.response.403.error`; string, required) - `details` (`createCustomerAccessMagicLink.response.403.details`; array, optional) ### 404 Missing customer/contact without createIfMissing #### Example ```json { "success": false, "error": "string", "details": [ {} ] } ``` - `success` (`createCustomerAccessMagicLink.response.404.success`; boolean, required) - `error` (`createCustomerAccessMagicLink.response.404.error`; string, required) - `details` (`createCustomerAccessMagicLink.response.404.details`; array, optional) ### 409 Duplicate guard blocked creation #### Example ```json { "success": false, "error": "string", "details": [ {} ] } ``` - `success` (`createCustomerAccessMagicLink.response.409.success`; boolean, required) - `error` (`createCustomerAccessMagicLink.response.409.error`; string, required) - `details` (`createCustomerAccessMagicLink.response.409.details`; array, optional) # Get Salesforce Opportunity payment setup status > Looks up the durable payment setup intent by Salesforce Opportunity Id. Source: https://staging.caretlegal.net/docs/reference/external-clients/getSalesforceOpportunityPaymentSetupStatus · Markdown: https://staging.caretlegal.net/docs/reference/external-clients/getSalesforceOpportunityPaymentSetupStatus/index.md Path: External Customer Access API `GET /integrations/external-clients/salesforce/opportunity-payment-setup` Looks up the durable payment setup intent by Salesforce Opportunity Id. ## Authentication - `PartnerApiKey`, http, header `Authorization` ## Query parameters - `opportunity_id` (`getSalesforceOpportunityPaymentSetupStatus.query.opportunity_id`; string, required) ## Code samples ### cURL ```bash curl --request GET \ --url 'https://api.caretlegal.net/integrations/external-clients/salesforce/opportunity-payment-setup?opportunity_id=string' \ --header 'Authorization: Bearer ' ``` ### TypeScript ```typescript const url = 'https://api.caretlegal.net/integrations/external-clients/salesforce/opportunity-payment-setup?opportunity_id=string'; const options = {method: 'GET', headers: {Authorization: 'Bearer '}}; fetch(url, options) .then(res => res.json()) .then(json => console.log(json)) .catch(err => console.error(err)); ``` ### Python ```python import requests url = "https://api.caretlegal.net/integrations/external-clients/salesforce/opportunity-payment-setup?opportunity_id=string" headers = {"Authorization": "Bearer "} response = requests.get(url, headers=headers) print(response.text) ``` ## Responses ### 200 Status lookup completed ### 400 Invalid request #### Example ```json { "success": false, "error": "string", "details": [ {} ] } ``` - `success` (`getSalesforceOpportunityPaymentSetupStatus.response.400.success`; boolean, required) - `error` (`getSalesforceOpportunityPaymentSetupStatus.response.400.error`; string, required) - `details` (`getSalesforceOpportunityPaymentSetupStatus.response.400.details`; array, optional) ### 401 Invalid API key #### Example ```json { "success": false, "error": "string", "details": [ {} ] } ``` - `success` (`getSalesforceOpportunityPaymentSetupStatus.response.401.success`; boolean, required) - `error` (`getSalesforceOpportunityPaymentSetupStatus.response.401.error`; string, required) - `details` (`getSalesforceOpportunityPaymentSetupStatus.response.401.details`; array, optional) ### 403 Missing scope #### Example ```json { "success": false, "error": "string", "details": [ {} ] } ``` - `success` (`getSalesforceOpportunityPaymentSetupStatus.response.403.success`; boolean, required) - `error` (`getSalesforceOpportunityPaymentSetupStatus.response.403.error`; string, required) - `details` (`getSalesforceOpportunityPaymentSetupStatus.response.403.details`; array, optional) # Merge two ACF customer masters > Moves mappings from targetMasterId to sourceMasterId. Requires an elevated merge scope and an auditable reason. Source: https://staging.caretlegal.net/docs/reference/external-clients/mergeAcfCustomerMasters · Markdown: https://staging.caretlegal.net/docs/reference/external-clients/mergeAcfCustomerMasters/index.md Path: External Customer Access API `POST /integrations/external-clients/customers/merge` Moves mappings from targetMasterId to sourceMasterId. Requires an elevated merge scope and an auditable reason. ## Authentication - `PartnerApiKey`, http, header `Authorization` ## Header parameters - `x-organization-id` (`mergeAcfCustomerMasters.header.x-organization-id`; string, required) ## Request body _Required._ - `sourceMasterId` (`mergeAcfCustomerMasters.sourceMasterId`; string, required) — ACF masterId to keep. - format `uuid` - `targetMasterId` (`mergeAcfCustomerMasters.targetMasterId`; string, required) — ACF masterId to merge into sourceMasterId. - format `uuid` - `reason` (`mergeAcfCustomerMasters.reason`; string, required) — Auditable reason for the merge. ## Example request ```json { "sourceMasterId": "fc6918af-80d6-4ac6-bb6b-d490eba07bb2", "targetMasterId": "5d8777e4-f10d-4fb5-85a9-c6636d70a705", "reason": "string" } ``` ## Code samples ### cURL ```bash curl --request POST \ --url https://api.caretlegal.net/integrations/external-clients/customers/merge \ --header 'Authorization: Bearer ' \ --header 'Content-Type: application/json' \ --header 'x-organization-id: string' \ --data ' { "sourceMasterId": "fc6918af-80d6-4ac6-bb6b-d490eba07bb2", "targetMasterId": "5d8777e4-f10d-4fb5-85a9-c6636d70a705", "reason": "string" } ' ``` ### TypeScript ```typescript const url = 'https://api.caretlegal.net/integrations/external-clients/customers/merge'; const options = { method: 'POST', headers: { 'Content-Type': 'application/json', 'x-organization-id': 'string', Authorization: 'Bearer ' }, body: JSON.stringify({ sourceMasterId: 'fc6918af-80d6-4ac6-bb6b-d490eba07bb2', targetMasterId: '5d8777e4-f10d-4fb5-85a9-c6636d70a705', reason: 'string' }) }; fetch(url, options) .then(res => res.json()) .then(json => console.log(json)) .catch(err => console.error(err)); ``` ### Python ```python import requests url = "https://api.caretlegal.net/integrations/external-clients/customers/merge" payload = { "sourceMasterId": "fc6918af-80d6-4ac6-bb6b-d490eba07bb2", "targetMasterId": "5d8777e4-f10d-4fb5-85a9-c6636d70a705", "reason": "string" } headers = { "Content-Type": "application/json", "x-organization-id": "string", "Authorization": "Bearer " } response = requests.post(url, json=payload, headers=headers) print(response.text) ``` ## Responses ### 200 Masters merged #### Example ```json { "success": true, "data": { "sourceMasterId": "fc6918af-80d6-4ac6-bb6b-d490eba07bb2", "targetMasterId": "5d8777e4-f10d-4fb5-85a9-c6636d70a705", "merged": 0, "reason": "string", "initiatedBy": "string" } } ``` - `success` (`mergeAcfCustomerMasters.response.200.success`; boolean, required) - `data` (`mergeAcfCustomerMasters.response.200.data`; object, required) - `sourceMasterId` (`mergeAcfCustomerMasters.response.200.data.sourceMasterId`; string, optional) - format `uuid` - `targetMasterId` (`mergeAcfCustomerMasters.response.200.data.targetMasterId`; string, optional) - format `uuid` - `merged` (`mergeAcfCustomerMasters.response.200.data.merged`; integer, optional) - `reason` (`mergeAcfCustomerMasters.response.200.data.reason`; string, optional) - `initiatedBy` (`mergeAcfCustomerMasters.response.200.data.initiatedBy`; string, optional) ### 400 Invalid request #### Example ```json { "success": false, "error": "string", "details": [ {} ] } ``` - `success` (`mergeAcfCustomerMasters.response.400.success`; boolean, required) - `error` (`mergeAcfCustomerMasters.response.400.error`; string, required) - `details` (`mergeAcfCustomerMasters.response.400.details`; array, optional) ### 401 Invalid API key #### Example ```json { "success": false, "error": "string", "details": [ {} ] } ``` - `success` (`mergeAcfCustomerMasters.response.401.success`; boolean, required) - `error` (`mergeAcfCustomerMasters.response.401.error`; string, required) - `details` (`mergeAcfCustomerMasters.response.401.details`; array, optional) ### 403 Missing merge scope #### Example ```json { "success": false, "error": "string", "details": [ {} ] } ``` - `success` (`mergeAcfCustomerMasters.response.403.success`; boolean, required) - `error` (`mergeAcfCustomerMasters.response.403.error`; string, required) - `details` (`mergeAcfCustomerMasters.response.403.details`; array, optional) # Publish a DealHub DealRoom for a CRM Opportunity > Uses the API-owned DealHub service and credential to generate a published DealRoom, waits for asynchronous publication, and returns the quote ID and URL. Requires the payment-setup create scope. Source: https://staging.caretlegal.net/docs/reference/external-clients/publishDealHubDealRoom · Markdown: https://staging.caretlegal.net/docs/reference/external-clients/publishDealHubDealRoom/index.md Path: External Customer Access API `POST /integrations/external-clients/dealhub/deal-rooms` Uses the API-owned DealHub service and credential to generate a published DealRoom, waits for asynchronous publication, and returns the quote ID and URL. Requires the payment-setup create scope. ## Authentication - `PartnerApiKey`, http, header `Authorization` ## Request body _Required._ - `external_opportunity_id` (`publishDealHubDealRoom.external_opportunity_id`; string, required) — CRM Opportunity ID linked to the DealHub quote. - maxLength 50 - `opportunity_name` (`publishDealHubDealRoom.opportunity_name`; string, required) — Quote and published DealRoom name. - maxLength 250 ## Example request ```json { "external_opportunity_id": "string", "opportunity_name": "string" } ``` ## Code samples ### cURL ```bash curl --request POST \ --url https://api.caretlegal.net/integrations/external-clients/dealhub/deal-rooms \ --header 'Authorization: Bearer ' \ --header 'Content-Type: application/json' \ --data ' { "external_opportunity_id": "string", "opportunity_name": "string" } ' ``` ### TypeScript ```typescript const url = 'https://api.caretlegal.net/integrations/external-clients/dealhub/deal-rooms'; const options = { method: 'POST', headers: {'Content-Type': 'application/json', Authorization: 'Bearer '}, body: JSON.stringify({external_opportunity_id: 'string', opportunity_name: 'string'}) }; fetch(url, options) .then(res => res.json()) .then(json => console.log(json)) .catch(err => console.error(err)); ``` ### Python ```python import requests url = "https://api.caretlegal.net/integrations/external-clients/dealhub/deal-rooms" payload = { "external_opportunity_id": "string", "opportunity_name": "string" } headers = { "Content-Type": "application/json", "Authorization": "Bearer " } response = requests.post(url, json=payload, headers=headers) print(response.text) ``` ## Responses ### 200 DealRoom published #### Example ```json { "success": true, "data": { "externalOpportunityId": "string", "opportunityName": "string", "dealhubQuoteId": "string", "dealRoomUrl": "http://example.com" } } ``` - `success` (`publishDealHubDealRoom.response.200.success`; boolean, required) - `data` (`publishDealHubDealRoom.response.200.data`; object, required) - `externalOpportunityId` (`publishDealHubDealRoom.response.200.data.externalOpportunityId`; string, required) - `opportunityName` (`publishDealHubDealRoom.response.200.data.opportunityName`; string, required) - `dealhubQuoteId` (`publishDealHubDealRoom.response.200.data.dealhubQuoteId`; string, required) - `dealRoomUrl` (`publishDealHubDealRoom.response.200.data.dealRoomUrl`; string, required) - format `uri` ### 400 Invalid request #### Example ```json { "success": false, "error": "string", "details": [ {} ] } ``` - `success` (`publishDealHubDealRoom.response.400.success`; boolean, required) - `error` (`publishDealHubDealRoom.response.400.error`; string, required) - `details` (`publishDealHubDealRoom.response.400.details`; array, optional) ### 401 Invalid API key #### Example ```json { "success": false, "error": "string", "details": [ {} ] } ``` - `success` (`publishDealHubDealRoom.response.401.success`; boolean, required) - `error` (`publishDealHubDealRoom.response.401.error`; string, required) - `details` (`publishDealHubDealRoom.response.401.details`; array, optional) ### 403 Missing payment-setup scope #### Example ```json { "success": false, "error": "string", "details": [ {} ] } ``` - `success` (`publishDealHubDealRoom.response.403.success`; boolean, required) - `error` (`publishDealHubDealRoom.response.403.error`; string, required) - `details` (`publishDealHubDealRoom.response.403.details`; array, optional) ### 502 DealHub provider request failed #### Example ```json { "success": false, "error": "string", "details": [ {} ] } ``` - `success` (`publishDealHubDealRoom.response.502.success`; boolean, required) - `error` (`publishDealHubDealRoom.response.502.error`; string, required) - `details` (`publishDealHubDealRoom.response.502.details`; array, optional) ### 503 DealHub API runtime configuration is missing #### Example ```json { "success": false, "error": "string", "details": [ {} ] } ``` - `success` (`publishDealHubDealRoom.response.503.success`; boolean, required) - `error` (`publishDealHubDealRoom.response.503.error`; string, required) - `details` (`publishDealHubDealRoom.response.503.details`; array, optional) ### 504 DealRoom publication did not complete before the polling deadline #### Example ```json { "success": false, "error": "string", "details": [ {} ] } ``` - `success` (`publishDealHubDealRoom.response.504.success`; boolean, required) - `error` (`publishDealHubDealRoom.response.504.error`; string, required) - `details` (`publishDealHubDealRoom.response.504.details`; array, optional) # Resolve an external customer identity > Checks whether a provider internal customer ID maps to an existing local customer. Source: https://staging.caretlegal.net/docs/reference/external-clients/resolveExternalCustomer · Markdown: https://staging.caretlegal.net/docs/reference/external-clients/resolveExternalCustomer/index.md Path: External Customer Access API `GET /integrations/external-clients/customers/resolve` Checks whether a provider internal customer ID maps to an existing local customer. ## Authentication - `PartnerApiKey`, http, header `Authorization` ## Query parameters - `provider` (`resolveExternalCustomer.query.provider`; string, required) - `externalCustomerId` (`resolveExternalCustomer.query.externalCustomerId`; string, required) — Provider-generated internal customer/account/entity primary key. ## Header parameters - `x-organization-id` (`resolveExternalCustomer.header.x-organization-id`; string, required) ## Code samples ### cURL ```bash curl --request GET \ --url 'https://api.caretlegal.net/integrations/external-clients/customers/resolve?provider=netsuite&externalCustomerId=string' \ --header 'Authorization: Bearer ' \ --header 'x-organization-id: string' ``` ### TypeScript ```typescript const url = 'https://api.caretlegal.net/integrations/external-clients/customers/resolve?provider=netsuite&externalCustomerId=string'; const options = { method: 'GET', headers: {'x-organization-id': 'string', Authorization: 'Bearer '} }; fetch(url, options) .then(res => res.json()) .then(json => console.log(json)) .catch(err => console.error(err)); ``` ### Python ```python import requests url = "https://api.caretlegal.net/integrations/external-clients/customers/resolve?provider=netsuite&externalCustomerId=string" headers = { "x-organization-id": "string", "Authorization": "Bearer " } response = requests.get(url, headers=headers) print(response.text) ``` ## Responses ### 200 Lookup completed #### Example ```json { "success": true, "data": { "exists": true, "provider": "netsuite", "externalCustomerId": "string", "customerId": "87d8e330-2878-4742-a86f-dbbb3bf522ac", "customerName": "string", "customerEmail": "user@example.com", "clerkOrganizationId": "string", "masterId": "773333e0-2d32-466f-b4b2-e6afdbf6dd5e" } } ``` - `success` (`resolveExternalCustomer.response.200.success`; boolean, required) - `data` (`resolveExternalCustomer.response.200.data`; object, required) - `exists` (`resolveExternalCustomer.response.200.data.exists`; boolean, required) - `provider` (`resolveExternalCustomer.response.200.data.provider`; string, required) - `externalCustomerId` (`resolveExternalCustomer.response.200.data.externalCustomerId`; string, required) - `customerId` (`resolveExternalCustomer.response.200.data.customerId`; string, optional) - format `uuid` - `customerName` (`resolveExternalCustomer.response.200.data.customerName`; string, optional) - `customerEmail` (`resolveExternalCustomer.response.200.data.customerEmail`; string, optional) - format `email` - `clerkOrganizationId` (`resolveExternalCustomer.response.200.data.clerkOrganizationId`; string, optional) - `masterId` (`resolveExternalCustomer.response.200.data.masterId`; string, optional) - format `uuid` ### 400 Invalid request #### Example ```json { "success": false, "error": "string", "details": [ {} ] } ``` - `success` (`resolveExternalCustomer.response.400.success`; boolean, required) - `error` (`resolveExternalCustomer.response.400.error`; string, required) - `details` (`resolveExternalCustomer.response.400.details`; array, optional) ### 401 Invalid API key #### Example ```json { "success": false, "error": "string", "details": [ {} ] } ``` - `success` (`resolveExternalCustomer.response.401.success`; boolean, required) - `error` (`resolveExternalCustomer.response.401.error`; string, required) - `details` (`resolveExternalCustomer.response.401.details`; array, optional) ### 403 Missing scope #### Example ```json { "success": false, "error": "string", "details": [ {} ] } ``` - `success` (`resolveExternalCustomer.response.403.success`; boolean, required) - `error` (`resolveExternalCustomer.response.403.error`; string, required) - `details` (`resolveExternalCustomer.response.403.details`; array, optional) # Start Salesforce Opportunity payment setup > For an eligible Salesforce Opportunity, resolves or creates the customer and bootstrap contact from Account.Email__c, provisions customer portal access, creates a durable payment setup intent, and either sends or returns the one-time link. Source: https://staging.caretlegal.net/docs/reference/external-clients/startSalesforceOpportunityPaymentSetup · Markdown: https://staging.caretlegal.net/docs/reference/external-clients/startSalesforceOpportunityPaymentSetup/index.md Path: External Customer Access API `POST /integrations/external-clients/salesforce/opportunity-payment-setup` For an eligible Salesforce Opportunity, resolves or creates the customer and bootstrap contact from Account.Email__c, provisions customer portal access, creates a durable payment setup intent, and either sends or returns the one-time link. ## Authentication - `PartnerApiKey`, http, header `Authorization` ## Request body _Required._ - `source` (`startSalesforceOpportunityPaymentSetup.source`; string, required) - default `"salesforce"` - `account_id` (`startSalesforceOpportunityPaymentSetup.account_id`; string, required) — Salesforce Account Id. - `contact_email` (`startSalesforceOpportunityPaymentSetup.contact_email`; string, required) — Authorized bootstrap email. For CARET Legal v1 this is Salesforce Account.Email__c. - format `email` - `opportunity_id` (`startSalesforceOpportunityPaymentSetup.opportunity_id`; string, required) — Salesforce Opportunity Id. - `account_name` (`startSalesforceOpportunityPaymentSetup.account_name`; string, optional) — Required when create_if_missing is true. - `contact_id` (`startSalesforceOpportunityPaymentSetup.contact_id`; string, optional) — Optional Salesforce Contact Id. Omit when Account.Email__c is the bootstrap recipient. - `contact_first_name` (`startSalesforceOpportunityPaymentSetup.contact_first_name`; string, optional) - `contact_last_name` (`startSalesforceOpportunityPaymentSetup.contact_last_name`; string, optional) - `stage_name` (`startSalesforceOpportunityPaymentSetup.stage_name`; string, optional) — Optional eligibility guard for CARET Legal onboarding. - default `"4 - Proposal"` - `mode` (`startSalesforceOpportunityPaymentSetup.mode`; string, optional) - one of `"send"`, `"return_link"`; default `"send"` - `create_if_missing` (`startSalesforceOpportunityPaymentSetup.create_if_missing`; boolean, optional) - default `false` - `token_expires_in_seconds` (`startSalesforceOpportunityPaymentSetup.token_expires_in_seconds`; integer, optional) - min 300; max 604800; default `604800` - `redirect_path` (`startSalesforceOpportunityPaymentSetup.redirect_path`; string, optional) — Optional in-app redirect path. Defaults to the Salesforce Opportunity payment setup route. - `Deal_Room_URL__c` (`startSalesforceOpportunityPaymentSetup.Deal_Room_URL__c`; string, optional) — Salesforce Opportunity Deal Room URL used by the confirmation return action. - format `uri` - `salesforceReturnUrl` (`startSalesforceOpportunityPaymentSetup.salesforceReturnUrl`; string, optional, deprecated) — Compatibility alias for Deal_Room_URL__c. - format `uri` - `returnCtaLabel` (`startSalesforceOpportunityPaymentSetup.returnCtaLabel`; string, optional) - default `"Return to Deal Room"` - `metadata` (`startSalesforceOpportunityPaymentSetup.metadata`; object, optional) ## Example requests ### Account-email bootstrap send mode ```json { "source": "salesforce", "account_id": "001xx000003DGbYAAW", "account_name": "Example Law", "contact_email": "owner@example.com", "opportunity_id": "006xx000004XYZAAA4", "stage_name": "4 - Proposal", "mode": "send", "create_if_missing": true, "returnCtaLabel": "Return to Deal Room" } ``` ### Account-email bootstrap return-link mode ```json { "source": "salesforce", "account_id": "001xx000003DGbYAAW", "account_name": "Example Law", "contact_email": "owner@example.com", "opportunity_id": "006xx000004XYZAAA4", "stage_name": "4 - Proposal", "mode": "return_link", "create_if_missing": true, "Deal_Room_URL__c": "https://deal-room.example.com/opportunities/006xx000004XYZAAA4" } ``` ## Code samples ### cURL ```bash curl --request POST \ --url https://api.caretlegal.net/integrations/external-clients/salesforce/opportunity-payment-setup \ --header 'Authorization: Bearer ' \ --header 'Content-Type: application/json' \ --data ' { "source": "salesforce", "account_id": "001xx000003DGbYAAW", "account_name": "Example Law", "contact_email": "owner@example.com", "opportunity_id": "006xx000004XYZAAA4", "stage_name": "4 - Proposal", "mode": "send", "create_if_missing": true, "returnCtaLabel": "Return to Deal Room" } ' ``` ### TypeScript ```typescript const url = 'https://api.caretlegal.net/integrations/external-clients/salesforce/opportunity-payment-setup'; const options = { method: 'POST', headers: {'Content-Type': 'application/json', Authorization: 'Bearer '}, body: JSON.stringify({ source: 'salesforce', account_id: '001xx000003DGbYAAW', account_name: 'Example Law', contact_email: 'owner@example.com', opportunity_id: '006xx000004XYZAAA4', stage_name: '4 - Proposal', mode: 'send', create_if_missing: true, returnCtaLabel: 'Return to Deal Room' }) }; fetch(url, options) .then(res => res.json()) .then(json => console.log(json)) .catch(err => console.error(err)); ``` ### Python ```python import requests url = "https://api.caretlegal.net/integrations/external-clients/salesforce/opportunity-payment-setup" payload = { "source": "salesforce", "account_id": "001xx000003DGbYAAW", "account_name": "Example Law", "contact_email": "owner@example.com", "opportunity_id": "006xx000004XYZAAA4", "stage_name": "4 - Proposal", "mode": "send", "create_if_missing": True, "returnCtaLabel": "Return to Deal Room" } headers = { "Content-Type": "application/json", "Authorization": "Bearer " } response = requests.post(url, json=payload, headers=headers) print(response.text) ``` ## Responses ### 200 Magic link returned #### Example ```json { "success": true, "data": { "paymentSetupIntentId": "d5f22666-bb3c-442e-bf88-2d5dcb5913ae", "organizationId": "7bc05553-4b68-44e8-b7bc-37be63c6d9e9", "status": "created", "source": "salesforce", "provider": "salesforce", "account_id": "string", "contact_id": "string", "opportunity_id": "string", "externalCustomerId": "string", "externalContactId": "string", "opportunityId": "string", "customerId": "87d8e330-2878-4742-a86f-dbbb3bf522ac", "contactId": "b5ec5d98-4bee-4da1-ad24-dde86346cb1d", "clerkOrganizationId": "string", "clerkUserId": "string", "salesforceCustomerMappingCreated": true, "caretCustomerMappingCreated": true, "caretContactMappingCreated": true, "clerkOrganizationMappingCreated": true, "clerkUserMappingCreated": true, "netsuiteCustomerId": "string", "netsuiteContactId": "string", "netsuiteCustomerCreated": true, "netsuiteCustomerMappingCreated": true, "netsuiteContactMappingCreated": true, "customerAccessStatus": "payment_setup_enabled", "paymentOnlyAccess": true, "magicLinkSent": true, "magicLinkUrl": "http://example.com", "redirectPath": "string", "returnCtaLabel": "string", "salesforceReturnUrl": "http://example.com", "tokenExpiresInSeconds": 0, "tokenExpiresAt": "2019-08-24T14:15:22Z", "communicationId": "string", "messageId": "string" } } ``` - `success` (`startSalesforceOpportunityPaymentSetup.response.200.success`; boolean, required) - `data` (`startSalesforceOpportunityPaymentSetup.response.200.data`; object, required) - `paymentSetupIntentId` (`startSalesforceOpportunityPaymentSetup.response.200.data.paymentSetupIntentId`; string, optional) - format `uuid` - `organizationId` (`startSalesforceOpportunityPaymentSetup.response.200.data.organizationId`; string, optional) — Local organization created or resolved by the platform from the Salesforce payload. - format `uuid` - `status` (`startSalesforceOpportunityPaymentSetup.response.200.data.status`; string, optional) - one of `"created"`, `"link_sent"`, `"link_returned"`, `"started"`, `"completed"`, `"failed"` - `source` (`startSalesforceOpportunityPaymentSetup.response.200.data.source`; string, optional) - `provider` (`startSalesforceOpportunityPaymentSetup.response.200.data.provider`; string, optional) - `account_id` (`startSalesforceOpportunityPaymentSetup.response.200.data.account_id`; string, optional) — Salesforce Account Id. - `contact_id` (`startSalesforceOpportunityPaymentSetup.response.200.data.contact_id`; string, optional, nullable) — Salesforce Contact Id when supplied; null for Account-email bootstrap. - `opportunity_id` (`startSalesforceOpportunityPaymentSetup.response.200.data.opportunity_id`; string, optional) — Salesforce Opportunity Id. - `externalCustomerId` (`startSalesforceOpportunityPaymentSetup.response.200.data.externalCustomerId`; string, optional) - `externalContactId` (`startSalesforceOpportunityPaymentSetup.response.200.data.externalContactId`; string, optional, nullable) - `opportunityId` (`startSalesforceOpportunityPaymentSetup.response.200.data.opportunityId`; string, optional) - `customerId` (`startSalesforceOpportunityPaymentSetup.response.200.data.customerId`; string, optional) - format `uuid` - `contactId` (`startSalesforceOpportunityPaymentSetup.response.200.data.contactId`; string, optional) - format `uuid` - `clerkOrganizationId` (`startSalesforceOpportunityPaymentSetup.response.200.data.clerkOrganizationId`; string, optional) - `clerkUserId` (`startSalesforceOpportunityPaymentSetup.response.200.data.clerkUserId`; string, optional) - `salesforceCustomerMappingCreated` (`startSalesforceOpportunityPaymentSetup.response.200.data.salesforceCustomerMappingCreated`; boolean, optional) - `caretCustomerMappingCreated` (`startSalesforceOpportunityPaymentSetup.response.200.data.caretCustomerMappingCreated`; boolean, optional) - `caretContactMappingCreated` (`startSalesforceOpportunityPaymentSetup.response.200.data.caretContactMappingCreated`; boolean, optional) - `clerkOrganizationMappingCreated` (`startSalesforceOpportunityPaymentSetup.response.200.data.clerkOrganizationMappingCreated`; boolean, optional) - `clerkUserMappingCreated` (`startSalesforceOpportunityPaymentSetup.response.200.data.clerkUserMappingCreated`; boolean, optional) - `netsuiteCustomerId` (`startSalesforceOpportunityPaymentSetup.response.200.data.netsuiteCustomerId`; string, optional, nullable) — Resolved NetSuite customer internal id when a NetSuite customer has externalid equal to the Salesforce account_id. - `netsuiteContactId` (`startSalesforceOpportunityPaymentSetup.response.200.data.netsuiteContactId`; string, optional, nullable) — Resolved NetSuite contact internal id when a contact is found under the resolved NetSuite customer. - `netsuiteCustomerCreated` (`startSalesforceOpportunityPaymentSetup.response.200.data.netsuiteCustomerCreated`; boolean, optional) — True when the platform created a NetSuite customer because no customer existed with externalid equal to the Salesforce account_id. - `netsuiteCustomerMappingCreated` (`startSalesforceOpportunityPaymentSetup.response.200.data.netsuiteCustomerMappingCreated`; boolean, optional) - `netsuiteContactMappingCreated` (`startSalesforceOpportunityPaymentSetup.response.200.data.netsuiteContactMappingCreated`; boolean, optional) - `customerAccessStatus` (`startSalesforceOpportunityPaymentSetup.response.200.data.customerAccessStatus`; string, optional) - example `"payment_setup_enabled"` - `paymentOnlyAccess` (`startSalesforceOpportunityPaymentSetup.response.200.data.paymentOnlyAccess`; boolean, optional) - `magicLinkSent` (`startSalesforceOpportunityPaymentSetup.response.200.data.magicLinkSent`; boolean, optional) - `magicLinkUrl` (`startSalesforceOpportunityPaymentSetup.response.200.data.magicLinkUrl`; string, optional) — Short CARET onboarding URL, present only for return_link mode and suitable for the 255-character Salesforce field. - format `uri` - `redirectPath` (`startSalesforceOpportunityPaymentSetup.response.200.data.redirectPath`; string, optional) - `returnCtaLabel` (`startSalesforceOpportunityPaymentSetup.response.200.data.returnCtaLabel`; string, optional) - `salesforceReturnUrl` (`startSalesforceOpportunityPaymentSetup.response.200.data.salesforceReturnUrl`; string, optional) - format `uri` - `tokenExpiresInSeconds` (`startSalesforceOpportunityPaymentSetup.response.200.data.tokenExpiresInSeconds`; integer, optional) - `tokenExpiresAt` (`startSalesforceOpportunityPaymentSetup.response.200.data.tokenExpiresAt`; string, optional) - format `date-time` - `communicationId` (`startSalesforceOpportunityPaymentSetup.response.200.data.communicationId`; string, optional) - `messageId` (`startSalesforceOpportunityPaymentSetup.response.200.data.messageId`; string, optional) ### 202 Magic-link send accepted #### Example ```json { "success": true, "data": { "paymentSetupIntentId": "d5f22666-bb3c-442e-bf88-2d5dcb5913ae", "organizationId": "7bc05553-4b68-44e8-b7bc-37be63c6d9e9", "status": "created", "source": "salesforce", "provider": "salesforce", "account_id": "string", "contact_id": "string", "opportunity_id": "string", "externalCustomerId": "string", "externalContactId": "string", "opportunityId": "string", "customerId": "87d8e330-2878-4742-a86f-dbbb3bf522ac", "contactId": "b5ec5d98-4bee-4da1-ad24-dde86346cb1d", "clerkOrganizationId": "string", "clerkUserId": "string", "salesforceCustomerMappingCreated": true, "caretCustomerMappingCreated": true, "caretContactMappingCreated": true, "clerkOrganizationMappingCreated": true, "clerkUserMappingCreated": true, "netsuiteCustomerId": "string", "netsuiteContactId": "string", "netsuiteCustomerCreated": true, "netsuiteCustomerMappingCreated": true, "netsuiteContactMappingCreated": true, "customerAccessStatus": "payment_setup_enabled", "paymentOnlyAccess": true, "magicLinkSent": true, "magicLinkUrl": "http://example.com", "redirectPath": "string", "returnCtaLabel": "string", "salesforceReturnUrl": "http://example.com", "tokenExpiresInSeconds": 0, "tokenExpiresAt": "2019-08-24T14:15:22Z", "communicationId": "string", "messageId": "string" } } ``` - `success` (`startSalesforceOpportunityPaymentSetup.response.202.success`; boolean, required) - `data` (`startSalesforceOpportunityPaymentSetup.response.202.data`; object, required) - `paymentSetupIntentId` (`startSalesforceOpportunityPaymentSetup.response.202.data.paymentSetupIntentId`; string, optional) - format `uuid` - `organizationId` (`startSalesforceOpportunityPaymentSetup.response.202.data.organizationId`; string, optional) — Local organization created or resolved by the platform from the Salesforce payload. - format `uuid` - `status` (`startSalesforceOpportunityPaymentSetup.response.202.data.status`; string, optional) - one of `"created"`, `"link_sent"`, `"link_returned"`, `"started"`, `"completed"`, `"failed"` - `source` (`startSalesforceOpportunityPaymentSetup.response.202.data.source`; string, optional) - `provider` (`startSalesforceOpportunityPaymentSetup.response.202.data.provider`; string, optional) - `account_id` (`startSalesforceOpportunityPaymentSetup.response.202.data.account_id`; string, optional) — Salesforce Account Id. - `contact_id` (`startSalesforceOpportunityPaymentSetup.response.202.data.contact_id`; string, optional, nullable) — Salesforce Contact Id when supplied; null for Account-email bootstrap. - `opportunity_id` (`startSalesforceOpportunityPaymentSetup.response.202.data.opportunity_id`; string, optional) — Salesforce Opportunity Id. - `externalCustomerId` (`startSalesforceOpportunityPaymentSetup.response.202.data.externalCustomerId`; string, optional) - `externalContactId` (`startSalesforceOpportunityPaymentSetup.response.202.data.externalContactId`; string, optional, nullable) - `opportunityId` (`startSalesforceOpportunityPaymentSetup.response.202.data.opportunityId`; string, optional) - `customerId` (`startSalesforceOpportunityPaymentSetup.response.202.data.customerId`; string, optional) - format `uuid` - `contactId` (`startSalesforceOpportunityPaymentSetup.response.202.data.contactId`; string, optional) - format `uuid` - `clerkOrganizationId` (`startSalesforceOpportunityPaymentSetup.response.202.data.clerkOrganizationId`; string, optional) - `clerkUserId` (`startSalesforceOpportunityPaymentSetup.response.202.data.clerkUserId`; string, optional) - `salesforceCustomerMappingCreated` (`startSalesforceOpportunityPaymentSetup.response.202.data.salesforceCustomerMappingCreated`; boolean, optional) - `caretCustomerMappingCreated` (`startSalesforceOpportunityPaymentSetup.response.202.data.caretCustomerMappingCreated`; boolean, optional) - `caretContactMappingCreated` (`startSalesforceOpportunityPaymentSetup.response.202.data.caretContactMappingCreated`; boolean, optional) - `clerkOrganizationMappingCreated` (`startSalesforceOpportunityPaymentSetup.response.202.data.clerkOrganizationMappingCreated`; boolean, optional) - `clerkUserMappingCreated` (`startSalesforceOpportunityPaymentSetup.response.202.data.clerkUserMappingCreated`; boolean, optional) - `netsuiteCustomerId` (`startSalesforceOpportunityPaymentSetup.response.202.data.netsuiteCustomerId`; string, optional, nullable) — Resolved NetSuite customer internal id when a NetSuite customer has externalid equal to the Salesforce account_id. - `netsuiteContactId` (`startSalesforceOpportunityPaymentSetup.response.202.data.netsuiteContactId`; string, optional, nullable) — Resolved NetSuite contact internal id when a contact is found under the resolved NetSuite customer. - `netsuiteCustomerCreated` (`startSalesforceOpportunityPaymentSetup.response.202.data.netsuiteCustomerCreated`; boolean, optional) — True when the platform created a NetSuite customer because no customer existed with externalid equal to the Salesforce account_id. - `netsuiteCustomerMappingCreated` (`startSalesforceOpportunityPaymentSetup.response.202.data.netsuiteCustomerMappingCreated`; boolean, optional) - `netsuiteContactMappingCreated` (`startSalesforceOpportunityPaymentSetup.response.202.data.netsuiteContactMappingCreated`; boolean, optional) - `customerAccessStatus` (`startSalesforceOpportunityPaymentSetup.response.202.data.customerAccessStatus`; string, optional) - example `"payment_setup_enabled"` - `paymentOnlyAccess` (`startSalesforceOpportunityPaymentSetup.response.202.data.paymentOnlyAccess`; boolean, optional) - `magicLinkSent` (`startSalesforceOpportunityPaymentSetup.response.202.data.magicLinkSent`; boolean, optional) - `magicLinkUrl` (`startSalesforceOpportunityPaymentSetup.response.202.data.magicLinkUrl`; string, optional) — Short CARET onboarding URL, present only for return_link mode and suitable for the 255-character Salesforce field. - format `uri` - `redirectPath` (`startSalesforceOpportunityPaymentSetup.response.202.data.redirectPath`; string, optional) - `returnCtaLabel` (`startSalesforceOpportunityPaymentSetup.response.202.data.returnCtaLabel`; string, optional) - `salesforceReturnUrl` (`startSalesforceOpportunityPaymentSetup.response.202.data.salesforceReturnUrl`; string, optional) - format `uri` - `tokenExpiresInSeconds` (`startSalesforceOpportunityPaymentSetup.response.202.data.tokenExpiresInSeconds`; integer, optional) - `tokenExpiresAt` (`startSalesforceOpportunityPaymentSetup.response.202.data.tokenExpiresAt`; string, optional) - format `date-time` - `communicationId` (`startSalesforceOpportunityPaymentSetup.response.202.data.communicationId`; string, optional) - `messageId` (`startSalesforceOpportunityPaymentSetup.response.202.data.messageId`; string, optional) ### 400 Invalid request #### Example ```json { "success": false, "error": "string", "details": [ {} ] } ``` - `success` (`startSalesforceOpportunityPaymentSetup.response.400.success`; boolean, required) - `error` (`startSalesforceOpportunityPaymentSetup.response.400.error`; string, required) - `details` (`startSalesforceOpportunityPaymentSetup.response.400.details`; array, optional) ### 401 Invalid API key #### Example ```json { "success": false, "error": "string", "details": [ {} ] } ``` - `success` (`startSalesforceOpportunityPaymentSetup.response.401.success`; boolean, required) - `error` (`startSalesforceOpportunityPaymentSetup.response.401.error`; string, required) - `details` (`startSalesforceOpportunityPaymentSetup.response.401.details`; array, optional) ### 403 Missing scope #### Example ```json { "success": false, "error": "string", "details": [ {} ] } ``` - `success` (`startSalesforceOpportunityPaymentSetup.response.403.success`; boolean, required) - `error` (`startSalesforceOpportunityPaymentSetup.response.403.error`; string, required) - `details` (`startSalesforceOpportunityPaymentSetup.response.403.details`; array, optional) ### 409 Wrong Opportunity stage or duplicate guard block #### Example ```json { "success": false, "error": "string", "details": [ {} ] } ``` - `success` (`startSalesforceOpportunityPaymentSetup.response.409.success`; boolean, required) - `error` (`startSalesforceOpportunityPaymentSetup.response.409.error`; string, required) - `details` (`startSalesforceOpportunityPaymentSetup.response.409.details`; array, optional) # Troubleshoot portal access > Recover from connection and sign-in problems in the hosted Billing Center. Source: https://staging.caretlegal.net/docs/restarting-your-server · Markdown: https://staging.caretlegal.net/docs/restarting-your-server/index.md The Caret Billing Center is a hosted service. Customers do not restart its servers from the portal. ## A page does not load 1. Check your internet connection and reload the page. 2. Open the [Billing Center](https://my.caretlegal.com) again and sign in if prompted. 3. Check that the correct company is selected. 4. If a payment was in progress, check its result before submitting it again. ## Your company or invoices are missing Follow [Get access to your company](/docs/getting-access). Missing records can require an access or company-association review; restarting your computer does not grant company permissions. ## Report the problem Share the affected page, the time the issue occurred, your company name and the exact error message with Billing Support. Include the invoice reference when relevant. Leave out passwords, verification codes, full card numbers and bank details. This page retains its former URL so existing help links continue to work.