{
"code": 400,
"message": null,
"body": "",
"errors": [
{
"accountId": "ORD-2025-001",
"errors": [
"firstName is required",
"principal must be a valid number"
]
}
]
}
{
"error": "Unauthorized"
}
This is the primary endpoint for managing accounts in Command. It supports creating new accounts, updating existing accounts (e.g., reflecting payments), and withdrawing accounts — all through a single unified request. Accounts are processed asynchronously in the background after the request is accepted.
Request
Endpoint
POST {{base_url}}/lenders/{{lenderPublicId}}/accounts
Environment
Base URL
Production
https://v3-api.cleargrid.ai/admin/v3
Staging
https://stage-v3-api.cleargrid.ai/admin/v3
Headers
string
required
Bearer token obtained from the Lender Login endpoint. Format: Bearer <access_token>
Body Parameters
The request body contains an accounts array. Each item represents an account or sub-account to create, update, or withdraw.
array
required
An array of account objects. You can include multiple accounts and sub-accounts in a single request.
Show Account object fields
integer
required
The operation to perform on this account.
Value
Operation
Description
1
Create
Creates a new account/sub-account
2
Update
Updates an existing account/sub-account
3
Withdraw
Withdraws (cancels) an account/sub-account
string
required
Unique identifier for the debtor/customer in your system.
string
required
The borrower’s first name.
string
required
The borrower’s last name.
string
required
Preferred language for communication. Use en for English, ar for Arabic.
string
National identification number. For UAE, use the Emirates ID. For Saudi Arabia, use the National ID.
string
Borrower’s passport number.
string
Date of birth in dd/MM/yyyy format.
string
Borrower’s gender. Accepted values: male, female.
string
Borrower’s nationality.
array
Array of phone number objects.
Show Phone object fields
string
required
The phone number.
string
The phone type. Examples: work, home, mobile.
array
Array of email address objects.
Show Email object fields
string
required
The email address.
string
The email type. Examples: work, personal.
array
Array of address objects.
Show Address object fields
string
External UUID for the address in your system.
string
Street address.
string
City name.
string
Area or district.
string
Postal / ZIP code.
string
Three-character country code (ISO 3166-1 alpha-3). Example: ARE for UAE, SAU for Saudi Arabia.
string
Address type. Examples: home, work, billing.
string
required
The main account identifier representing the primary contract with the debtor. All related sub-accounts are grouped under this ID.
string
required
A unique identifier for an individual obligation or installment under the main account. Each installment or fee is tracked as a distinct sub-account.
string
The merchant or business associated with the debt.
string
The due date for this account/installment in dd/MM/yyyy format.
string
required
The principal amount owed.
string
The interest amount.
string
Any additional fees.
string
The amount already paid by the borrower.
string
The date of the last payment in dd/MM/yyyy format.
object
A flexible key-value object for storing any additional metadata about the account. Common fields include productType, purpose, and other business-specific attributes.
The accountId represents the main account or primary contract with a debtor. For example, a mobile phone purchase from an online store would be a single accountId. All related financial obligations (installments, fees) are grouped under this identifier.
What is a subAccountId?
The subAccountId represents an individual obligation or installment under the main account. Each installment or fee is tracked as a unique subAccountId, enabling itemized tracking of payments and dues. For example, a 4-installment BNPL plan would have 4 sub-accounts under one accountId.
How does the status field work?
The status field controls the operation:
Status
Operation
Use Case
1
Create
Onboarding a new account or sub-account
2
Update
Reflecting a payment, fee adjustment, or data correction
3
Withdraw
Removing or cancelling an account/sub-account
Example lifecycle:
Status 1: Create account with principal of 100, paidAmount of 0
Status 2: Update with paidAmount of 30 (balance becomes 70)
Status 2: Update with paidAmount of 50 (balance becomes 50)
Dynamic sub-account management
Sub-accounts are uniquely identified via subAccountId, which enables flexible real-time updates:
Add anytime — New sub-accounts (e.g., a new installment or charge) can be added independently at any time
Update anytime — Existing sub-accounts can be updated (e.g., fees change, payments received)
Withdraw anytime — A sub-account can be withdrawn (e.g., removed or marked as cancelled)
Automatic aggregation — Any operation on a sub-account automatically updates the main accountId aggregate (outstanding balance, status, etc.)
There is no requirement to submit all sub-accounts at once. The system is designed for incremental updates over time.
Important Notes
Date format: All dates must be in dd/MM/yyyy format (e.g., 15/03/2026).
Country codes: Use ISO 3166-1 alpha-3 three-character codes (e.g., ARE for UAE, SAU for Saudi Arabia, BHR for Bahrain).
Additional data: Any additional information about the debt or borrower that doesn’t fit into the standard fields should be placed in the additionalData object.
Response
200 — Success
400 — Validation Error
401 — Unauthorized
500 — Server Error
Data has been accepted and processing has started in the background.
One or more accounts in the request failed validation. The errors array contains details for each failed account.
{ "code": 400, "message": null, "body": "", "errors": [ { "accountId": "ORD-2025-001", "errors": [ "firstName is required", "principal must be a valid number" ] } ]}
{ "error": "Unauthorized"}
The access token is missing, invalid, or expired. Re-authenticate using the Lender Login or Refresh Token endpoint.
{ "error": "Something went wrong. Please try again later."}
An unexpected server error occurred. If this persists, contact ClearGrid support.
Authorizations
Authorization
string
header
required
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
lenderPublicId
string
required
Lender public ID (UUID) returned by the Lender Login endpoint.
Body
application/json
accounts
object[]
required
Array of account objects to create, update, or withdraw.
Show child attributes
Response
Processing started successfully
code
integer
message
string | null
body
string
errors
object[]
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"Command by ClearGrid AI","colors":{"primary":"#3b82f6","light":"#60a5fa","dark":"#2563eb"},"logo":{"light":"https://mintcdn.com/cleargrid-79e917fe/nx_A5WjULU0TbN1j/logo/light.svg?fit=max\u0026auto=format\u0026n=nx_A5WjULU0TbN1j\u0026q=85\u0026s=ca657d9a629c6f5ecc3aee8de0f0ac24","dark":"https://mintcdn.com/cleargrid-79e917fe/nx_A5WjULU0TbN1j/logo/dark.svg?fit=max\u0026auto=format\u0026n=nx_A5WjULU0TbN1j\u0026q=85\u0026s=531f22398803ffca1ce8d6722a7b74b9"},"favicon":"https://mintcdn.com/cleargrid-79e917fe/nx_A5WjULU0TbN1j/favicon.svg?fit=max\u0026auto=format\u0026n=nx_A5WjULU0TbN1j\u0026q=85\u0026s=0b61c1368131923d7b3ff2c8b66c0cd5","api":{"playground":{"display":"interactive"},"examples":{"defaults":"required","languages":["curl","python","javascript"],"prefill":true}},"background":{"decoration":"windows","color":{"light":"#ffffff","dark":"#09090b"}},"navbar":{"links":[{"href":"mailto:support@cleargrid.co","label":"Support"}],"primary":{"type":"button","label":"Dashboard","href":"https://command.cleargrid.ai"}},"footer":{"socials":{"linkedin":"https://www.linkedin.com/company/cleargrid-ai"}},"styling":{"latex":true},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"cleargrid-79e917fe","hasAudioNarration":false,"actualSubdomain":"cleargrid-79e917fe","customDomains":["docs.command.cleargrid.ai"],"gitSource":{"type":"github","owner":"cleargrid-org","repo":"command-docs","deployBranch":"master","contentDirectory":"","isPrivate":true,"mountPath":"","label":""},"entitlements":{},"buildId":"6ae947a368675ea9cfd2c684:success","clientVersion":"0.0.4352","searchFilterCounts":[{"language":"default","tag":"API Reference","count":30},{"language":"default","tag":"Exports","count":25},{"language":"default","tag":"Datasets","count":19},{"language":"default","tag":"Overview","count":8},{"language":"default","tag":"Features","count":6},{"language":"default","tag":"Getting Started","count":3},{"language":"default","tag":"Accounts","count":2},{"language":"default","tag":"Authentication","count":2},{"language":"default","tag":"Endpoints","count":2},{"language":"default","tag":"Data Exports","count":2}]},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":false,"enableAskAiSearchBar":true},"basePath":"","hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-rbac-roles","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"site-roles","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-metadata","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"live-agents","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"starter-pricing","enabled":true,"variant":{"name":"control","enabled":true,"payload":{"type":"string","value":"control"},"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"wildcard-email-auth","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"starterQuestions":[],"googleFontsInlined":false},"customCss":[]}
{"page":{"pagePath":"api-reference/accounts/create-update","slug":"/api-reference/accounts/create-update","pageMetadata":{"title":"Create \u0026 Update Account","description":"Create new accounts, update existing ones, or withdraw accounts from the collection portfolio","sidebarTitle":"Create \u0026 Update","openapi":"/api-reference/openapi.json POST /admin/v3/lenders/{lenderPublicId}/accounts","href":"/api-reference/accounts/create-update"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"Create new accounts, update existing ones, or withdraw accounts from the collection portfolio\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,code:`code`,li:`li`,ol:`ol`,p:`p`,pre:`pre`,span:`span`,strong:`strong`,tbody:`tbody`,td:`td`,th:`th`,thead:`thead`,tr:`tr`,ul:`ul`,..._provideComponents(),...props.components},{Accordion,AccordionGroup,CodeBlock,Expandable,Heading,Info,ParamField,Tab,Table,Tabs}=_components;if(!Accordion)_missingMdxReference(`Accordion`,true);if(!AccordionGroup)_missingMdxReference(`AccordionGroup`,true);if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Expandable)_missingMdxReference(`Expandable`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Info)_missingMdxReference(`Info`,true);if(!ParamField)_missingMdxReference(`ParamField`,true);if(!Tab)_missingMdxReference(`Tab`,true);if(!Table)_missingMdxReference(`Table`,true);if(!Tabs)_missingMdxReference(`Tabs`,true);return _jsxs(_Fragment,{children:[_jsx(_components.p,{children:`This is the primary endpoint for managing accounts in Command. It supports creating new accounts, updating existing accounts (e.g., reflecting payments), and withdrawing accounts — all through a single unified request. Accounts are processed asynchronously in the background after the request is accepted.`}),`\n`,_jsx(Heading,{level:`2`,id:`request`,children:`Request`}),`\n`,_jsx(Heading,{level:`3`,id:`endpoint`,children:`Endpoint`}),`\n`,_jsx(CodeBlock,{numberOfLines:`2`,language:`text`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`text`,children:_jsxs(_components.code,{language:`text`,numberOfLines:`2`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`POST {{base_url}}/lenders/{{lenderPublicId}}/accounts`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})})]})})}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Environment`}),_jsx(_components.th,{children:`Base URL`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.strong,{children:`Production`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`https://v3-api.cleargrid.ai/admin/v3`})})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.strong,{children:`Staging`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`https://stage-v3-api.cleargrid.ai/admin/v3`})})]})]})]}),`\n`,_jsx(Heading,{level:`3`,id:`headers`,children:`Headers`}),`\n`,_jsx(ParamField,{header:`Authorization`,type:`string`,required:true,id:`param-authorization`,children:_jsxs(_components.p,{children:[`Bearer token obtained from the `,_jsx(_components.a,{href:`/api-reference/authentication/lender-login`,children:`Lender Login`}),` endpoint. Format: `,_jsx(_components.code,{children:`Bearer \u003caccess_token>`})]})}),`\n`,_jsx(Heading,{level:`3`,id:`body-parameters`,children:`Body Parameters`}),`\n`,_jsxs(_components.p,{children:[`The request body contains an `,_jsx(_components.code,{children:`accounts`}),` array. Each item represents an account or sub-account to create, update, or withdraw.`]}),`\n`,_jsxs(ParamField,{body:`accounts`,type:`array`,required:true,id:`param-accounts`,children:[_jsx(_components.p,{children:`An array of account objects. You can include multiple accounts and sub-accounts in a single request.`}),_jsxs(Expandable,{title:`Account object fields`,children:[_jsxs(ParamField,{body:`status`,type:`integer`,required:true,id:`param-status`,children:[_jsx(_components.p,{children:`The operation to perform on this account.`}),_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Value`}),_jsx(_components.th,{children:`Operation`}),_jsx(_components.th,{children:`Description`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`1`})}),_jsx(_components.td,{children:_jsx(_components.strong,{children:`Create`})}),_jsx(_components.td,{children:`Creates a new account/sub-account`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`2`})}),_jsx(_components.td,{children:_jsx(_components.strong,{children:`Update`})}),_jsx(_components.td,{children:`Updates an existing account/sub-account`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`3`})}),_jsx(_components.td,{children:_jsx(_components.strong,{children:`Withdraw`})}),_jsx(_components.td,{children:`Withdraws (cancels) an account/sub-account`})]})]})]})]}),_jsx(ParamField,{body:`debtorCompanyId`,type:`string`,required:true,id:`param-debtor-company-id`,children:_jsx(_components.p,{children:`Unique identifier for the debtor/customer in your system.`})}),_jsx(ParamField,{body:`firstName`,type:`string`,required:true,id:`param-first-name`,children:_jsx(_components.p,{children:`The borrower’s first name.`})}),_jsx(ParamField,{body:`lastName`,type:`string`,required:true,id:`param-last-name`,children:_jsx(_components.p,{children:`The borrower’s last name.`})}),_jsx(ParamField,{body:`language`,type:`string`,required:true,id:`param-language`,children:_jsxs(_components.p,{children:[`Preferred language for communication. Use `,_jsx(_components.code,{children:`en`}),` for English, `,_jsx(_components.code,{children:`ar`}),` for Arabic.`]})}),_jsx(ParamField,{body:`idNumber`,type:`string`,id:`param-id-number`,children:_jsx(_components.p,{children:`National identification number. For UAE, use the Emirates ID. For Saudi Arabia, use the National ID.`})}),_jsx(ParamField,{body:`passportNumber`,type:`string`,id:`param-passport-number`,children:_jsx(_components.p,{children:`Borrower’s passport number.`})}),_jsx(ParamField,{body:`birthDate`,type:`string`,id:`param-birth-date`,children:_jsxs(_components.p,{children:[`Date of birth in `,_jsx(_components.code,{children:`dd/MM/yyyy`}),` format.`]})}),_jsx(ParamField,{body:`gender`,type:`string`,id:`param-gender`,children:_jsxs(_components.p,{children:[`Borrower’s gender. Accepted values: `,_jsx(_components.code,{children:`male`}),`, `,_jsx(_components.code,{children:`female`}),`.`]})}),_jsx(ParamField,{body:`nationality`,type:`string`,id:`param-nationality`,children:_jsx(_components.p,{children:`Borrower’s nationality.`})}),_jsxs(ParamField,{body:`phones`,type:`array`,id:`param-phones`,children:[_jsx(_components.p,{children:`Array of phone number objects.`}),_jsxs(Expandable,{title:`Phone object fields`,children:[_jsx(ParamField,{body:`number`,type:`string`,required:true,id:`param-number`,children:_jsx(_components.p,{children:`The phone number.`})}),_jsx(ParamField,{body:`type`,type:`string`,id:`param-type`,children:_jsxs(_components.p,{children:[`The phone type. Examples: `,_jsx(_components.code,{children:`work`}),`, `,_jsx(_components.code,{children:`home`}),`, `,_jsx(_components.code,{children:`mobile`}),`.`]})})]})]}),_jsxs(ParamField,{body:`emails`,type:`array`,id:`param-emails`,children:[_jsx(_components.p,{children:`Array of email address objects.`}),_jsxs(Expandable,{title:`Email object fields`,children:[_jsx(ParamField,{body:`email`,type:`string`,required:true,id:`param-email`,children:_jsx(_components.p,{children:`The email address.`})}),_jsx(ParamField,{body:`type`,type:`string`,id:`param-type-1`,children:_jsxs(_components.p,{children:[`The email type. Examples: `,_jsx(_components.code,{children:`work`}),`, `,_jsx(_components.code,{children:`personal`}),`.`]})})]})]}),_jsxs(ParamField,{body:`addresses`,type:`array`,id:`param-addresses`,children:[_jsx(_components.p,{children:`Array of address objects.`}),_jsxs(Expandable,{title:`Address object fields`,children:[_jsx(ParamField,{body:`externalId`,type:`string`,id:`param-external-id`,children:_jsx(_components.p,{children:`External UUID for the address in your system.`})}),_jsx(ParamField,{body:`street`,type:`string`,id:`param-street`,children:_jsx(_components.p,{children:`Street address.`})}),_jsx(ParamField,{body:`city`,type:`string`,id:`param-city`,children:_jsx(_components.p,{children:`City name.`})}),_jsx(ParamField,{body:`area`,type:`string`,id:`param-area`,children:_jsx(_components.p,{children:`Area or district.`})}),_jsx(ParamField,{body:`zip`,type:`string`,id:`param-zip`,children:_jsx(_components.p,{children:`Postal / ZIP code.`})}),_jsx(ParamField,{body:`country`,type:`string`,id:`param-country`,children:_jsxs(_components.p,{children:[`Three-character country code (`,_jsx(_components.a,{href:`https://en.wikipedia.org/wiki/ISO_3166-1_alpha-3`,children:`ISO 3166-1 alpha-3`}),`). Example: `,_jsx(_components.code,{children:`ARE`}),` for UAE, `,_jsx(_components.code,{children:`SAU`}),` for Saudi Arabia.`]})}),_jsx(ParamField,{body:`type`,type:`string`,id:`param-type-2`,children:_jsxs(_components.p,{children:[`Address type. Examples: `,_jsx(_components.code,{children:`home`}),`, `,_jsx(_components.code,{children:`work`}),`, `,_jsx(_components.code,{children:`billing`}),`.`]})})]})]}),_jsx(ParamField,{body:`accountId`,type:`string`,required:true,id:`param-account-id`,children:_jsx(_components.p,{children:`The main account identifier representing the primary contract with the debtor. All related sub-accounts are grouped under this ID.`})}),_jsx(ParamField,{body:`subAccountId`,type:`string`,required:true,id:`param-sub-account-id`,children:_jsx(_components.p,{children:`A unique identifier for an individual obligation or installment under the main account. Each installment or fee is tracked as a distinct sub-account.`})}),_jsx(ParamField,{body:`merchant`,type:`string`,id:`param-merchant`,children:_jsx(_components.p,{children:`The merchant or business associated with the debt.`})}),_jsx(ParamField,{body:`dateDue`,type:`string`,id:`param-date-due`,children:_jsxs(_components.p,{children:[`The due date for this account/installment in `,_jsx(_components.code,{children:`dd/MM/yyyy`}),` format.`]})}),_jsx(ParamField,{body:`principal`,type:`string`,required:true,id:`param-principal`,children:_jsx(_components.p,{children:`The principal amount owed.`})}),_jsx(ParamField,{body:`interest`,type:`string`,id:`param-interest`,children:_jsx(_components.p,{children:`The interest amount.`})}),_jsx(ParamField,{body:`fees`,type:`string`,id:`param-fees`,children:_jsx(_components.p,{children:`Any additional fees.`})}),_jsx(ParamField,{body:`paidAmount`,type:`string`,id:`param-paid-amount`,children:_jsx(_components.p,{children:`The amount already paid by the borrower.`})}),_jsx(ParamField,{body:`paidDate`,type:`string`,id:`param-paid-date`,children:_jsxs(_components.p,{children:[`The date of the last payment in `,_jsx(_components.code,{children:`dd/MM/yyyy`}),` format.`]})}),_jsx(ParamField,{body:`additionalData`,type:`object`,id:`param-additional-data`,children:_jsxs(_components.p,{children:[`A flexible key-value object for storing any additional metadata about the account. Common fields include `,_jsx(_components.code,{children:`productType`}),`, `,_jsx(_components.code,{children:`purpose`}),`, and other business-specific attributes.`]})}),_jsxs(ParamField,{body:`loanType`,type:`integer`,id:`param-loan-type`,children:[_jsx(_components.p,{children:`The type of loan or debt. Accepted values:`}),_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Value`}),_jsx(_components.th,{children:`Type`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`1`})}),_jsx(_components.td,{children:`Credit Card`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`2`})}),_jsx(_components.td,{children:`Lease`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`3`})}),_jsx(_components.td,{children:`Personal Loan`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`4`})}),_jsx(_components.td,{children:`BNPL (Buy Now Pay Later)`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`5`})}),_jsx(_components.td,{children:`Car Rental`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`6`})}),_jsx(_components.td,{children:`Subscription`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`7`})}),_jsx(_components.td,{children:`Charge Back`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`8`})}),_jsx(_components.td,{children:`Salary Advance Loan`})]})]})]})]})]})]}),`\n`,_jsx(Heading,{level:`2`,id:`example-request`,children:`Example Request`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`85`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`85`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"accounts\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"status\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`1`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"debtorCompanyId\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"customer_001\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"firstName\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Ahmed\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"lastName\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Al Maktoum\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"language\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"en\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"idNumber\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"784-1990-1234567-1\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"passportNumber\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"P1234567\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"birthDate\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"15/06/1990\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"gender\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"male\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"nationality\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Emirati\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"phones\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"number\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"+971501234567\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"type\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"mobile\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ],`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"emails\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"email\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"ahmed@example.com\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"type\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"personal\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ],`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"addresses\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"externalId\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"addr-uuid-001\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"street\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Sheikh Zayed Road\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"city\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Dubai\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"area\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Downtown\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"zip\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"00000\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"country\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"ARE\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"type\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"home\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ],`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"accountId\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"ORD-2025-001\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"subAccountId\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"PMT-2025-001-01\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"merchant\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"TechStore UAE\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"dateDue\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"01/03/2026\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"principal\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"5000\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"interest\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"250\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"fees\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"50\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"paidAmount\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"0\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"paidDate\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"additionalData\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"productType\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Electronics\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"purpose\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Mobile phone purchase\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"loanType\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`4`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"status\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`1`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"debtorCompanyId\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"customer_001\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"firstName\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Ahmed\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"lastName\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Al Maktoum\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"language\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"en\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"idNumber\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"784-1990-1234567-1\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"phones\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"number\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"+971501234567\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"type\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"mobile\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ],`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"emails\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"email\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"ahmed@example.com\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"type\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"personal\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ],`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"accountId\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"ORD-2025-001\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"subAccountId\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"PMT-2025-001-02\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"merchant\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"TechStore UAE\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"dateDue\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"01/04/2026\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"principal\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"5000\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"interest\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"250\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"fees\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"50\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"paidAmount\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"0\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"additionalData\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"productType\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Electronics\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"loanType\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`4`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ]`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\n`,_jsx(Heading,{level:`2`,id:`understanding-accounts-\u0026-sub-accounts`,children:`Understanding Accounts \u0026 Sub-Accounts`}),`\n`,_jsxs(AccordionGroup,{children:[_jsx(Accordion,{title:`What is an accountId?`,id:`what-is-an-accountid`,children:_jsxs(_components.p,{children:[`The `,_jsx(_components.code,{children:`accountId`}),` represents the `,_jsx(_components.strong,{children:`main account or primary contract`}),` with a debtor. For example, a mobile phone purchase from an online store would be a single `,_jsx(_components.code,{children:`accountId`}),`. All related financial obligations (installments, fees) are grouped under this identifier.`]})}),_jsx(Accordion,{title:`What is a subAccountId?`,id:`what-is-a-subaccountid`,children:_jsxs(_components.p,{children:[`The `,_jsx(_components.code,{children:`subAccountId`}),` represents an `,_jsx(_components.strong,{children:`individual obligation or installment`}),` under the main account. Each installment or fee is tracked as a unique `,_jsx(_components.code,{children:`subAccountId`}),`, enabling itemized tracking of payments and dues. For example, a 4-installment BNPL plan would have 4 sub-accounts under one `,_jsx(_components.code,{children:`accountId`}),`.`]})}),_jsxs(Accordion,{title:`How does the status field work?`,id:`how-does-the-status-field-work`,children:[_jsxs(_components.p,{children:[`The `,_jsx(_components.code,{children:`status`}),` field controls the operation:`]}),_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Status`}),_jsx(_components.th,{children:`Operation`}),_jsx(_components.th,{children:`Use Case`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`1`})}),_jsx(_components.td,{children:_jsx(_components.strong,{children:`Create`})}),_jsx(_components.td,{children:`Onboarding a new account or sub-account`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`2`})}),_jsx(_components.td,{children:_jsx(_components.strong,{children:`Update`})}),_jsx(_components.td,{children:`Reflecting a payment, fee adjustment, or data correction`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`3`})}),_jsx(_components.td,{children:_jsx(_components.strong,{children:`Withdraw`})}),_jsx(_components.td,{children:`Removing or cancelling an account/sub-account`})]})]})]}),_jsx(_components.p,{children:_jsx(_components.strong,{children:`Example lifecycle:`})}),_jsxs(_components.ol,{children:[`\n`,_jsxs(_components.li,{children:[`Status `,_jsx(_components.code,{children:`1`}),`: Create account with principal of 100, paidAmount of 0`]}),`\n`,_jsxs(_components.li,{children:[`Status `,_jsx(_components.code,{children:`2`}),`: Update with paidAmount of 30 (balance becomes 70)`]}),`\n`,_jsxs(_components.li,{children:[`Status `,_jsx(_components.code,{children:`2`}),`: Update with paidAmount of 50 (balance becomes 50)`]}),`\n`]})]}),_jsxs(Accordion,{title:`Dynamic sub-account management`,id:`dynamic-sub-account-management`,children:[_jsxs(_components.p,{children:[`Sub-accounts are uniquely identified via `,_jsx(_components.code,{children:`subAccountId`}),`, which enables flexible real-time updates:`]}),_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Add anytime`}),` — New sub-accounts (e.g., a new installment or charge) can be added independently at any time`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Update anytime`}),` — Existing sub-accounts can be updated (e.g., fees change, payments received)`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Withdraw anytime`}),` — A sub-account can be withdrawn (e.g., removed or marked as cancelled)`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Automatic aggregation`}),` — Any operation on a sub-account automatically updates the main `,_jsx(_components.code,{children:`accountId`}),` aggregate (outstanding balance, status, etc.)`]}),`\n`]}),_jsx(_components.p,{children:`There is no requirement to submit all sub-accounts at once. The system is designed for incremental updates over time.`})]})]}),`\n`,_jsx(Heading,{level:`2`,id:`important-notes`,children:`Important Notes`}),`\n`,_jsx(Info,{children:_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Date format:`}),` All dates must be in `,_jsx(_components.code,{children:`dd/MM/yyyy`}),` format (e.g., `,_jsx(_components.code,{children:`15/03/2026`}),`).`]})}),`\n`,_jsx(Info,{children:_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Country codes:`}),` Use `,_jsx(_components.a,{href:`https://en.wikipedia.org/wiki/ISO_3166-1_alpha-3`,children:`ISO 3166-1 alpha-3`}),` three-character codes (e.g., `,_jsx(_components.code,{children:`ARE`}),` for UAE, `,_jsx(_components.code,{children:`SAU`}),` for Saudi Arabia, `,_jsx(_components.code,{children:`BHR`}),` for Bahrain).`]})}),`\n`,_jsx(Info,{children:_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Additional data:`}),` Any additional information about the debt or borrower that doesn’t fit into the standard fields should be placed in the `,_jsx(_components.code,{children:`additionalData`}),` object.`]})}),`\n`,_jsx(Heading,{level:`2`,id:`response`,children:`Response`}),`\n`,_jsxs(Tabs,{children:[_jsxs(Tab,{title:`200 — Success`,id:`200-%E2%80%94-success`,children:[_jsx(_components.p,{children:`Data has been accepted and processing has started in the background.`}),_jsx(CodeBlock,{filename:``,numberOfLines:`6`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`6`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"code\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`200`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"message\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"success\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"body\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Processing started successfully\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"errors\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: []`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})})]}),_jsxs(Tab,{title:`400 — Validation Error`,id:`400-%E2%80%94-validation-error`,children:[_jsxs(_components.p,{children:[`One or more accounts in the request failed validation. The `,_jsx(_components.code,{children:`errors`}),` array contains details for each failed account.`]}),_jsx(CodeBlock,{filename:``,numberOfLines:`14`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`14`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"code\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`400`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"message\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`null`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"body\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"errors\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"accountId\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"ORD-2025-001\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"errors\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"firstName is required\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"principal must be a valid number\"`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ]`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ]`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})})]}),_jsxs(Tab,{title:`401 — Unauthorized`,id:`401-%E2%80%94-unauthorized`,children:[_jsx(CodeBlock,{filename:``,numberOfLines:`3`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`3`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"error\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Unauthorized\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),_jsxs(_components.p,{children:[`The access token is missing, invalid, or expired. Re-authenticate using the `,_jsx(_components.a,{href:`/api-reference/authentication/lender-login`,children:`Lender Login`}),` or `,_jsx(_components.a,{href:`/api-reference/authentication/refresh-token`,children:`Refresh Token`}),` endpoint.`]})]}),_jsxs(Tab,{title:`500 — Server Error`,id:`500-%E2%80%94-server-error`,children:[_jsx(CodeBlock,{filename:``,numberOfLines:`3`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`3`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"error\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Something went wrong. Please try again later.\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),_jsx(_components.p,{children:`An unexpected server error occurred. If this persists, contact ClearGrid support.`})]})]})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Create \u0026 Update Account","description":"Create new accounts, update existing ones, or withdraw accounts from the collection portfolio","sidebarTitle":"Create \u0026 Update","openapi":"/api-reference/openapi.json POST /admin/v3/lenders/{lenderPublicId}/accounts","href":"/api-reference/accounts/create-update"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Request","slug":"request","depth":2,"children":[{"title":"Endpoint","slug":"endpoint","depth":3,"children":[]},{"title":"Headers","slug":"headers","depth":3,"children":[]},{"title":"Body Parameters","slug":"body-parameters","depth":3,"children":[]}]},{"title":"Example Request","slug":"example-request","depth":2,"children":[]},{"title":"Understanding Accounts \u0026 Sub-Accounts","slug":"understanding-accounts-\u0026-sub-accounts","depth":2,"children":[]},{"title":"Important Notes","slug":"important-notes","depth":2,"children":[]},{"title":"Response","slug":"response","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":[],"openApiReferenceData":{"operation":{"operationId":"upsertAccounts","summary":"Create or update accounts","description":"Create new accounts, update existing ones, or withdraw accounts from the collection portfolio","tags":["Lender Accounts"],"security":["06a6c9a5-e277-4bb2-aedc-5b5a31fba9f7"],"parameters":["14f67a7a-d50d-4504-83c2-b15b83e84965"],"requestBody":"6ecedde6-f665-4288-8229-64e6a522b410","responses":{"200":"69a51cb4-dc41-4e23-9865-aa2c46f5aa16","400":"76c13179-6c69-42ae-9ad5-fe65f9e87bb1","401":"39d7ff4c-875c-4272-8562-7902b75f989a"},"method":"post","type":"path","servers":["f2e2b701-160e-4b64-841b-67d0295dccbb","3a501f04-c413-45c2-921c-6beb8b2fa94a"],"path":"/admin/v3/lenders/{lenderPublicId}/accounts","baseUrlOptions":["https://v3-api.cleargrid.ai","https://stage-v3-api.cleargrid.ai"],"title":"Create or update accounts","codeSamples":[],"requestExampleLanguages":["bash","python","javascript"],"requiredOnlyExamples":true,"requestExampleType":"generated","responseExampleType":"generated","prefillPlaygroundWithExample":true,"prefillPlaygroundExamples":[{"body.accounts.items.0.accountId":"ORD-2025-001","body.accounts.items.0.status":1,"body.accounts.items.0.debtorCompanyId":"customer_001","body.accounts.items.0.firstName":"Ahmed","body.accounts.items.0.birthDate":"15/06/1990","body.accounts.items.0.dateDue":"01/03/2026","body.accounts.items.0.principal":"5000","body.accounts.items.0.phones.items.0.number":"+971501234567","body.accounts.items.0.phones.items.0.type":"mobile","body.accounts.items.0.loanType":4,"body.accounts.items.0.subAccountId":"PMT-2025-001-01","body.accounts.items.0.lastName":"Al Maktoum","body.accounts.items.0.language":"en","body.accounts.items.0.idNumber":"784-1990-1234567-1","body.accounts.items.0.gender":"male","body.accounts.items.0.nationality":"Emirati","body.accounts.items.0.merchant":"TechStore UAE","body.accounts.items.0.interest":"250","body.accounts.items.0.fees":"50","body.accounts.items.0.paidAmount":"0","body.accounts.items.0.emails.items.0.email":"ahmed@example.com","body.accounts.items.0.emails.items.0.type":"personal","body.accounts.items.0.addresses.items.0.street":"Sheikh Zayed Road","body.accounts.items.0.addresses.items.0.city":"Dubai","body.accounts.items.0.addresses.items.0.area":"Downtown","body.accounts.items.0.addresses.items.0.country":"ARE","body.accounts.items.0.addresses.items.0.type":"home","body.accounts.items.0.additionalData":{"productType":"Electronics"}}]},"dependencies":{"parameters":{"14f67a7a-d50d-4504-83c2-b15b83e84965":{"in":"path","name":"lenderPublicId","required":true,"schema":{"type":"string","isRequired":true,"description":"Lender public ID (UUID) returned by the Lender Login endpoint.","uniqueKey":"","typeLabel":"string"},"description":"Lender public ID (UUID) returned by the Lender Login endpoint.","example":"550e8400-e29b-41d4-a716-446655440000"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["accounts"],"properties":{"accounts":{"type":"array","description":"Array of account objects to create, update, or withdraw.","items":{"type":"object","required":["accountId","status","debtorCompanyId","firstName","birthDate","dateDue","principal","phones","loanType"],"properties":{"accountId":{"type":"string","example":"ORD-2025-001","description":"The main account identifier representing the primary contract with the debtor.","isRequired":true,"uniqueKey":"accounts.items.[INDEX].accountId","typeLabel":"string"},"status":{"type":"integer","enum":[1,2,3],"example":1,"description":"Operation: 1 = Create, 2 = Update, 3 = Withdraw","isRequired":true,"uniqueKey":"accounts.items.[INDEX].status","typeLabel":"enum\u003cinteger>"},"debtorCompanyId":{"type":"string","example":"customer_001","description":"Unique identifier for the debtor/customer in your system.","isRequired":true,"uniqueKey":"accounts.items.[INDEX].debtorCompanyId","typeLabel":"string"},"firstName":{"type":"string","example":"Ahmed","description":"The borrower's first name.","isRequired":true,"uniqueKey":"accounts.items.[INDEX].firstName","typeLabel":"string"},"birthDate":{"type":"string","example":"15/06/1990","description":"Date of birth in dd/MM/yyyy format.","isRequired":true,"uniqueKey":"accounts.items.[INDEX].birthDate","typeLabel":"string"},"dateDue":{"type":"string","example":"01/03/2026","description":"The due date for this account/installment in dd/MM/yyyy format.","isRequired":true,"uniqueKey":"accounts.items.[INDEX].dateDue","typeLabel":"string"},"principal":{"type":"string","example":"5000","description":"The principal amount owed.","isRequired":true,"uniqueKey":"accounts.items.[INDEX].principal","typeLabel":"string"},"phones":{"type":"array","description":"Array of phone number objects.","items":{"type":"object","properties":{"number":{"type":"string","example":"+971501234567","uniqueKey":"accounts.items.[INDEX].phones.items.[INDEX].number","typeLabel":"string"},"type":{"type":"string","example":"mobile","uniqueKey":"accounts.items.[INDEX].phones.items.[INDEX].type","typeLabel":"string"}},"uniqueKey":"accounts.items.[INDEX].phones.items.[INDEX]","typeLabel":"object"},"isRequired":true,"uniqueKey":"accounts.items.[INDEX].phones","typeLabel":"object[]"},"loanType":{"type":"integer","enum":[1,2,3,4,5,6,7,8],"example":4,"description":"Type of loan: 1=Credit Card, 2=Lease, 3=Personal Loan, 4=BNPL, 5=Car Rental, 6=Subscription, 7=Charge Back, 8=Salary Advance Loan","isRequired":true,"uniqueKey":"accounts.items.[INDEX].loanType","typeLabel":"enum\u003cinteger>"},"subAccountId":{"type":"string","example":"PMT-2025-001-01","description":"A unique identifier for an individual obligation or installment under the main account.","uniqueKey":"accounts.items.[INDEX].subAccountId","typeLabel":"string"},"lastName":{"type":"string","example":"Al Maktoum","description":"The borrower's last name.","uniqueKey":"accounts.items.[INDEX].lastName","typeLabel":"string"},"language":{"type":"string","enum":["en","ar"],"example":"en","description":"Preferred language for communication.","uniqueKey":"accounts.items.[INDEX].language","typeLabel":"enum\u003cstring>"},"emiratesId":{"type":"string","example":"784-1990-1234567-1","description":"Emirates ID number (UAE).","uniqueKey":"accounts.items.[INDEX].emiratesId","typeLabel":"string"},"idNumber":{"type":"string","example":"784-1990-1234567-1","description":"National identification number. For UAE use Emirates ID; for Saudi Arabia use National ID.","uniqueKey":"accounts.items.[INDEX].idNumber","typeLabel":"string"},"passportNumber":{"type":"string","example":"P1234567","description":"Borrower's passport number.","uniqueKey":"accounts.items.[INDEX].passportNumber","typeLabel":"string"},"gender":{"type":"string","example":"male","description":"Borrower's gender. Accepted: male, female.","uniqueKey":"accounts.items.[INDEX].gender","typeLabel":"string"},"nationality":{"type":"string","example":"Emirati","description":"Borrower's nationality.","uniqueKey":"accounts.items.[INDEX].nationality","typeLabel":"string"},"merchant":{"type":"string","example":"TechStore UAE","description":"The merchant or business associated with the debt.","uniqueKey":"accounts.items.[INDEX].merchant","typeLabel":"string"},"interest":{"type":"string","example":"250","description":"The interest amount.","uniqueKey":"accounts.items.[INDEX].interest","typeLabel":"string"},"fees":{"type":"string","example":"50","description":"Any additional fees.","uniqueKey":"accounts.items.[INDEX].fees","typeLabel":"string"},"paidAmount":{"type":"string","example":"0","description":"The amount already paid by the borrower.","uniqueKey":"accounts.items.[INDEX].paidAmount","typeLabel":"string"},"paidDate":{"type":"string","example":"01/02/2026","description":"The date of the last payment in dd/MM/yyyy format.","uniqueKey":"accounts.items.[INDEX].paidDate","typeLabel":"string"},"emails":{"type":"array","description":"Array of email address objects.","items":{"type":"object","properties":{"email":{"type":"string","example":"ahmed@example.com","uniqueKey":"accounts.items.[INDEX].emails.items.[INDEX].email","typeLabel":"string"},"type":{"type":"string","example":"personal","uniqueKey":"accounts.items.[INDEX].emails.items.[INDEX].type","typeLabel":"string"}},"uniqueKey":"accounts.items.[INDEX].emails.items.[INDEX]","typeLabel":"object"},"uniqueKey":"accounts.items.[INDEX].emails","typeLabel":"object[]"},"addresses":{"type":"array","description":"Array of address objects.","items":{"type":"object","properties":{"externalId":{"type":"string","example":"addr-uuid-001","uniqueKey":"accounts.items.[INDEX].addresses.items.[INDEX].externalId","typeLabel":"string"},"street":{"type":"string","example":"Sheikh Zayed Road","uniqueKey":"accounts.items.[INDEX].addresses.items.[INDEX].street","typeLabel":"string"},"city":{"type":"string","example":"Dubai","uniqueKey":"accounts.items.[INDEX].addresses.items.[INDEX].city","typeLabel":"string"},"area":{"type":"string","example":"Downtown","uniqueKey":"accounts.items.[INDEX].addresses.items.[INDEX].area","typeLabel":"string"},"zip":{"type":"string","example":"00000","uniqueKey":"accounts.items.[INDEX].addresses.items.[INDEX].zip","typeLabel":"string"},"country":{"type":"string","example":"ARE","description":"ISO 3166-1 alpha-3 country code (e.g. ARE, SAU, BHR)","uniqueKey":"accounts.items.[INDEX].addresses.items.[INDEX].country","typeLabel":"string"},"type":{"type":"string","example":"home","uniqueKey":"accounts.items.[INDEX].addresses.items.[INDEX].type","typeLabel":"string"}},"uniqueKey":"accounts.items.[INDEX].addresses.items.[INDEX]","typeLabel":"object"},"uniqueKey":"accounts.items.[INDEX].addresses","typeLabel":"object[]"},"additionalData":{"type":"object","example":{"productType":"Electronics","purpose":"Mobile phone purchase"},"description":"Flexible key-value object for any additional metadata about the account.","uniqueKey":"accounts.items.[INDEX].additionalData","typeLabel":"object"}},"uniqueKey":"accounts.items.[INDEX]","typeLabel":"object"},"isRequired":true,"uniqueKey":"accounts","typeLabel":"object[]"}},"uniqueKey":"","typeLabel":"object"},"example":{"accounts":[{"status":1,"debtorCompanyId":"customer_001","firstName":"Ahmed","lastName":"Al Maktoum","language":"en","idNumber":"784-1990-1234567-1","birthDate":"15/06/1990","gender":"male","nationality":"Emirati","phones":[{"number":"+971501234567","type":"mobile"}],"emails":[{"email":"ahmed@example.com","type":"personal"}],"addresses":[{"street":"Sheikh Zayed Road","city":"Dubai","area":"Downtown","country":"ARE","type":"home"}],"accountId":"ORD-2025-001","subAccountId":"PMT-2025-001-01","merchant":"TechStore UAE","dateDue":"01/03/2026","principal":"5000","interest":"250","fees":"50","paidAmount":"0","loanType":4,"additionalData":{"productType":"Electronics"}}]},"examples":{"Example":{"title":"Example","value":{"accounts":[{"status":1,"debtorCompanyId":"customer_001","firstName":"Ahmed","lastName":"Al Maktoum","language":"en","idNumber":"784-1990-1234567-1","birthDate":"15/06/1990","gender":"male","nationality":"Emirati","phones":[{"number":"+971501234567","type":"mobile"}],"emails":[{"email":"ahmed@example.com","type":"personal"}],"addresses":[{"street":"Sheikh Zayed Road","city":"Dubai","area":"Downtown","country":"ARE","type":"home"}],"accountId":"ORD-2025-001","subAccountId":"PMT-2025-001-01","merchant":"TechStore UAE","dateDue":"01/03/2026","principal":"5000","interest":"250","fees":"50","paidAmount":"0","loanType":4,"additionalData":{"productType":"Electronics"}}]}}},"exampleType":"examples"}},"exampleType":"examples"},"responses":{"69a51cb4-dc41-4e23-9865-aa2c46f5aa16":{"description":"Processing started successfully","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"integer","uniqueKey":"code","typeLabel":"integer"},"message":{"oneOf":[{"type":"string","uniqueKey":"message.oneOf.0","typeLabel":"string"},{"type":"null","uniqueKey":"message.oneOf.1","typeLabel":"null"}],"uniqueKey":"message","typeLabel":"string | null"},"body":{"type":"string","uniqueKey":"body","typeLabel":"string"},"errors":{"type":"array","items":{"type":"object","uniqueKey":"errors.items.[INDEX]","typeLabel":"object"},"uniqueKey":"errors","typeLabel":"object[]"}},"uniqueKey":"","typeLabel":"object"},"example":{"code":200,"message":"success","body":"Processing started successfully","errors":[]},"examples":{"Example":{"title":"Example","value":{"code":200,"message":"success","body":"Processing started successfully","errors":[]}}},"exampleType":"examples"}},"exampleType":"examples"},"76c13179-6c69-42ae-9ad5-fe65f9e87bb1":{"description":"Bad request — one or more accounts failed validation","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"integer","uniqueKey":"code","typeLabel":"integer"},"message":{"oneOf":[{"type":"string","uniqueKey":"message.oneOf.0","typeLabel":"string"},{"type":"null","uniqueKey":"message.oneOf.1","typeLabel":"null"}],"uniqueKey":"message","typeLabel":"string | null"},"body":{"type":"string","uniqueKey":"body","typeLabel":"string"},"errors":{"type":"array","items":{"type":"object","uniqueKey":"errors.items.[INDEX]","typeLabel":"object"},"uniqueKey":"errors","typeLabel":"object[]"}},"uniqueKey":"","typeLabel":"object"},"example":{"code":400,"message":null,"body":"","errors":[{"accountId":"ORD-2025-001","errors":["firstName is required","principal must be a valid number"]}]},"examples":{"Example":{"title":"Example","value":{"code":400,"message":null,"body":"","errors":[{"accountId":"ORD-2025-001","errors":["firstName is required","principal must be a valid number"]}]}}},"exampleType":"examples"}},"exampleType":"examples"},"39d7ff4c-875c-4272-8562-7902b75f989a":{"description":"Unauthorized — missing, invalid, or expired token","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","uniqueKey":"error","typeLabel":"string"}},"uniqueKey":"","typeLabel":"object"},"example":{"error":"Unauthorized"},"examples":{"Example":{"title":"Example","value":{"error":"Unauthorized"}}},"exampleType":"examples"}},"exampleType":"examples"}},"security":{"06a6c9a5-e277-4bb2-aedc-5b5a31fba9f7":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","scopes":[]}}},"servers":{"f2e2b701-160e-4b64-841b-67d0295dccbb":{"url":"https://v3-api.cleargrid.ai","description":"Production"},"3a501f04-c413-45c2-921c-6beb8b2fa94a":{"url":"https://stage-v3-api.cleargrid.ai","description":"Staging"}},"processedSecurityOptions":[{"schemes":[{"scheme":{"type":"http","scheme":"bearer","bearerFormat":"JWT","scopes":[]},"schema":{"title":"Bearer Auth","type":"string","isRequired":true,"description":"Bearer authentication header of the form `Bearer \u003ctoken>`, where `\u003ctoken>` is your auth token.","format":"bearer","typeLabel":"string\u003cbearer>","deprecated":false},"schemeName":"bearerAuth","name":"Authorization"}],"title":"bearerAuth"}]},"originalFileLocation":"api-reference/openapi.json"},"subdomain":"cleargrid-79e917fe","siteName":"Command by ClearGrid AI","title":"Create \u0026 Update Account - Command by ClearGrid AI","contextualStarterQuestions":[],"navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-02-24T16:12:50.122Z","originalFileLocation":"api-reference/accounts/create-update.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Create new accounts, update existing ones, or withdraw accounts from the collection portfolio\">\u003cmeta data-mint-head name=\"application-name\" content=\"Command by ClearGrid AI\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/cleargrid-79e917fe/OFgLU-jsmNGhV0vR/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/cleargrid-79e917fe/OFgLU-jsmNGhV0vR/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/cleargrid-79e917fe/OFgLU-jsmNGhV0vR/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/cleargrid-79e917fe/OFgLU-jsmNGhV0vR/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/cleargrid-79e917fe/OFgLU-jsmNGhV0vR/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/cleargrid-79e917fe/OFgLU-jsmNGhV0vR/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/cleargrid-79e917fe/OFgLU-jsmNGhV0vR/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/cleargrid-79e917fe/OFgLU-jsmNGhV0vR/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/cleargrid-79e917fe/OFgLU-jsmNGhV0vR/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Create \u0026amp; Update Account - Command by ClearGrid AI\">\u003cmeta data-mint-head property=\"og:description\" content=\"Create new accounts, update existing ones, or withdraw accounts from the collection portfolio\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Command by ClearGrid AI\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.command.cleargrid.ai/api-reference/accounts/create-update\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://cleargrid-79e917fe.mintlify.site/_mintlify/api/og/v2?division=Accounts\u0026amp;title=Create+%26+Update+Account\u0026amp;description=Create+new+accounts%2C+update+existing+ones%2C+or+withdraw+accounts+from+the+collection+portfolio\u0026amp;theme=68014c7356663797ece21de9\u0026amp;signature=5726f5cc7ce032ba550018aeae180646e0d8437cbfabc4a6dae8b22d147af447\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Create \u0026amp; Update Account - Command by ClearGrid AI\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Create new accounts, update existing ones, or withdraw accounts from the collection portfolio\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://cleargrid-79e917fe.mintlify.site/_mintlify/api/og/v2?division=Accounts\u0026amp;title=Create+%26+Update+Account\u0026amp;description=Create+new+accounts%2C+update+existing+ones%2C+or+withdraw+accounts+from+the+collection+portfolio\u0026amp;theme=68014c7356663797ece21de9\u0026amp;signature=5726f5cc7ce032ba550018aeae180646e0d8437cbfabc4a6dae8b22d147af447\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/cleargrid-79e917fe/OFgLU-jsmNGhV0vR/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Command by ClearGrid AI\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#3b82f6\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.command.cleargrid.ai/api-reference/accounts/create-update\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/api-reference/accounts/create-update.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.command.cleargrid.ai/#organization\",\"name\":\"Command by ClearGrid AI\",\"url\":\"https://docs.command.cleargrid.ai\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/cleargrid-79e917fe/nx_A5WjULU0TbN1j/logo/light.svg?fit=max\u0026auto=format\u0026n=nx_A5WjULU0TbN1j\u0026q=85\u0026s=ca657d9a629c6f5ecc3aee8de0f0ac24\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.command.cleargrid.ai#website\",\"name\":\"Command by ClearGrid AI\",\"url\":\"https://docs.command.cleargrid.ai\",\"publisher\":{\"@id\":\"https://docs.command.cleargrid.ai/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.command.cleargrid.ai/api-reference/accounts/create-update#webpage\",\"url\":\"https://docs.command.cleargrid.ai/api-reference/accounts/create-update\",\"name\":\"Create \u0026 Update Account\",\"description\":\"Create new accounts, update existing ones, or withdraw accounts from the collection portfolio\",\"dateModified\":\"2026-02-24T16:12:50.122Z\",\"isPartOf\":{\"@id\":\"https://docs.command.cleargrid.ai#website\"},\"breadcrumb\":{\"@id\":\"https://docs.command.cleargrid.ai/api-reference/accounts/create-update#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.command.cleargrid.ai/api-reference/accounts/create-update#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Command by ClearGrid AI\",\"item\":\"https://docs.command.cleargrid.ai\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Create \u0026 Update Account\",\"item\":\"https://docs.command.cleargrid.ai/api-reference/accounts/create-update\"}]},{\"@type\":[\"TechArticle\",\"APIReference\"],\"@id\":\"https://docs.command.cleargrid.ai/api-reference/accounts/create-update#apireference\",\"headline\":\"Create \u0026 Update Account\",\"name\":\"Create \u0026 Update Account\",\"description\":\"Create new accounts, update existing ones, or withdraw accounts from the collection portfolio\",\"url\":\"https://docs.command.cleargrid.ai/api-reference/accounts/create-update\",\"mainEntityOfPage\":{\"@id\":\"https://docs.command.cleargrid.ai/api-reference/accounts/create-update#webpage\"},\"dateModified\":\"2026-02-24T16:12:50.122Z\",\"publisher\":{\"@id\":\"https://docs.command.cleargrid.ai/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.command.cleargrid.ai#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Command by ClearGrid AI\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"Command by ClearGrid AI\"},\"provider\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","agentPointerHref":"/api-reference/accounts/create-update.md","siteName":"Command by ClearGrid AI","nav":{"global":null,"tabs":[{"tab":"Overview","pages":[{"title":"Overview","href":"/introduction"}]},{"tab":"API Reference","groups":[{"group":"Getting Started","pages":[{"title":"API Reference","icon":"code","sidebarTitle":"Overview","href":"/api-reference/overview"}]},{"group":"Authentication","pages":[{"title":"Lender Login","sidebarTitle":"Lender Login","openapi":"/api-reference/openapi.json POST /admin/auth/{lender}/login","href":"/api-reference/authentication/lender-login"},{"title":"Refresh Token","description":"Refresh an expired access token using the refresh token","sidebarTitle":"Refresh Token","openapi":"/api-reference/openapi.json POST /admin/auth/{lender}/refresh-token","href":"/api-reference/authentication/refresh-token"}]},{"group":"Accounts","pages":[{"title":"Create \u0026 Update Account","sidebarTitle":"Create \u0026 Update","openapi":"/api-reference/openapi.json POST /admin/v3/lenders/{lenderPublicId}/accounts","href":"/api-reference/accounts/create-update"},{"title":"Update Account Status","description":"Update account statuses such as disputed or do-not-contact","sidebarTitle":"Update Status","openapi":"/api-reference/openapi.json POST /admin/v3/lenders/{lenderPublicId}/accounts/update-status","href":"/api-reference/accounts/update-status"}]},{"group":"Exports","pages":[{"title":"Data Exports Overview","sidebarTitle":"Overview","icon":"download","href":"/api-reference/exports/overview"},{"title":"Pagination \u0026 Incremental Loads","sidebarTitle":"Pagination","icon":"arrow-right","href":"/api-reference/exports/pagination"},{"title":"Errors \u0026 Status Codes","sidebarTitle":"Errors","icon":"triangle-exclamation","href":"/api-reference/exports/errors"},{"title":"Changelog","sidebarTitle":"Changelog","icon":"clock-rotate-left","href":"/api-reference/exports/changelog"},{"group":"Endpoints","pages":[{"title":"List Export Catalog","sidebarTitle":"Catalog","href":"/api-reference/exports/endpoints/catalog"},{"title":"Fetch Dataset","sidebarTitle":"Fetch Dataset","href":"/api-reference/exports/endpoints/fetch-dataset"}]},{"group":"Datasets","pages":[{"title":"Borrowers","sidebarTitle":"Borrowers","href":"/api-reference/exports/datasets/d01-borrowers"},{"title":"Borrower Accounts","sidebarTitle":"Borrower Accounts","href":"/api-reference/exports/datasets/d02-borrower-accounts"},{"title":"Borrower Sub Accounts","sidebarTitle":"Borrower Sub Accounts","href":"/api-reference/exports/datasets/d03-borrower-sub-accounts"},{"title":"Borrower Account Events","sidebarTitle":"Borrower Account Events","href":"/api-reference/exports/datasets/d05-borrower-account-events"},{"title":"Borrower Payments","sidebarTitle":"Borrower Payments","href":"/api-reference/exports/datasets/d07-borrower-payments"},{"title":"Borrower Payment Plans","sidebarTitle":"Borrower Payment Plans","href":"/api-reference/exports/datasets/d08-borrower-payment-plans"},{"title":"Borrower Payment Plan Installments","sidebarTitle":"Payment Plan Installments","href":"/api-reference/exports/datasets/d09-borrower-payment-plan-installments"},{"title":"Scheduled Payments","sidebarTitle":"Scheduled Payments","href":"/api-reference/exports/datasets/d12-scheduled-payments"},{"title":"Payment Proofs","sidebarTitle":"Payment Proofs","href":"/api-reference/exports/datasets/d14-payment-proofs"},{"title":"Borrower Settlements","sidebarTitle":"Borrower Settlements","href":"/api-reference/exports/datasets/d15-borrower-settlements"},{"title":"Borrower Deals","sidebarTitle":"Borrower Deals","href":"/api-reference/exports/datasets/d16-borrower-deals"},{"title":"Borrower Deal Activity Logs","sidebarTitle":"Deal Activity Logs","href":"/api-reference/exports/datasets/d17-borrower-deal-activity-logs"},{"title":"Borrower Deal Logs","sidebarTitle":"Borrower Deal Logs","href":"/api-reference/exports/datasets/d18-borrower-deal-logs"},{"title":"Deal Activity Logs","sidebarTitle":"Deal Activity Logs","href":"/api-reference/exports/datasets/d19-deal-activity-logs"},{"title":"Deal Views","sidebarTitle":"Deal Views","href":"/api-reference/exports/datasets/d20-deal-views"},{"title":"Communication Logs","sidebarTitle":"Communication Logs","href":"/api-reference/exports/datasets/d21-communication-logs"},{"title":"Conversations","sidebarTitle":"Conversations","href":"/api-reference/exports/datasets/d22-conversations"},{"title":"Manual Communication Logs","sidebarTitle":"Manual Communication Logs","href":"/api-reference/exports/datasets/d23-manual-communication-logs"},{"title":"User Lender Details","sidebarTitle":"User Lender Details","href":"/api-reference/exports/datasets/d26-user-lender-details"}]}]}]},{"tab":"Data Exports","pages":[{"title":"Data Exports","href":"/data-exports/overview"}]}]},"basePath":"","title":"Create \u0026 Update Account - Command by ClearGrid AI","deploymentId":"dpl_5nNsUVHqbVdUHouroPPzwztSbjmH","buildId":"dpl_5nNsUVHqbVdUHouroPPzwztSbjmH","dynamics":["c2aa737661","2b790eda92","b0f84f53ff","a9bb46feb3"],"chunks":["OpenApiReferenceProvider-B564ZPEC.js","snippetPresets-L1o8HcxD.js","utils-CztB6GTn.js","style-to-object-BY3JEAdk.js","utils-CvVTgJWk.js","v4-DIgz8zy6.js","addTypeLabelsToSchema-DYi6_847.js","conditional-requirements-CFM0id0Q.js","cloneDeep-DthbVJn_.js","_Uint8Array-G4MDMcnE.js","isObject-FP1Yky1u.js","ApiExamples-BnQo4SxZ.js","usePlaygroundInputsStore-Dsmj0Yg6.js","shallow-Bp_wEvgz.js","isEqual-BwXlkqOR.js","CodeSnippets-D6Fi8DmN.js","CodeSnippet-DANVAYTI.js","use-playground-group-access-DaUWE1Sg.js","Page-Cwg6gQ2F.js","api-description-markdown-DFvICuUq.js","DynamicMarkdown-DHV3eOcf.js","SectionHeading-DLRZDaDn.js","MethodPill-CgqQYk5N.js","getPastedJson-k_txzq3J.js","Check2Icon-CO8ho5Tt.js","axios-CsQoIw0U.js","Markdown-C8ZpmBko.js","AssistantPageLink-AWAGfbYY.js","dist-CAcI43Vk.js","lib-DMeTj1gb.js","lib-B8HbPgcC.js","katex-Dbtb6Wk7.js","html-void-elements-mCSPHezU.js","marked.esm-CZWythHk.js"]}