Skip to main content

Accounts — Create & Update

Create new accounts and update existing ones with partial updates, products, and dynamic fields.


Create Account

POST/apidev/v1/accounts
PermissionAPICLI_ACCOUNTS_WRITE
Rate Limit10 req/min

Request Body

FieldTypeRequiredMaxDescription
namestringYes200Account display name.
external_codestringNo120External system identifier.
statusstringNo10Account status.
business_namestringNo200Legal business name.
tax_idstringNo60Tax identification number.
documentstringNo60Document number.
document_typenumberNoDocument type identifier.
phonestringNo60Phone number.
mobilestringNo60Mobile phone.
emailstringNo200Email address.
image_urlstringNo500Image URL.
notesstringNo1000Free-text notes.
streetstringNo200Street name.
door_numberstringNo20Door number.
apartmentstringNo20Apartment or suite.
cornerstringNo200Cross street.
zip_codestringNo20Postal code.
latitudenumberNoLatitude coordinate.
longitudenumberNoLongitude coordinate.
country_idstringNo30Country ID.
department_idstringNo30Department ID.
client_idstringNo30Associated client ID.
qr_codestringNo30QR code value.
start_datestringNo30Start date (ISO 8601).
end_datestringNo30End date (ISO 8601).
birth_datestringNo30Birth date (ISO 8601).

Code Examples

curl -s -X POST "https://$TENANT/apidev/v1/accounts" \
-H "Authorization: Bearer $TOKEN" \
-H "X-API-Key: $APIKEY" \
-H "tenant: $TENANT" \
-H "Content-Type: application/json" \
-d '{
"name": "Acme Corp",
"business_name": "Acme Corporation S.A.",
"tax_id": "214100001019",
"email": "contact@acme.com",
"phone": "+59821234567",
"street": "Av. Rivera",
"door_number": "1234",
"country_id": "1",
"department_id": "10",
"client_id": "982710394857200005",
"start_date": "2026-01-15"
}'

Example Response

{
"success": true,
"data": {
"id": "982710394857201664"
}
}

Update Account

Update an existing account. Only included fields are modified; omitted fields remain unchanged. Send null to clear a nullable field.

See Partial Updates for the general pattern.

PUT/apidev/v1/accounts/{id}
PermissionAPICLI_ACCOUNTS_WRITE
Rate Limit10 req/min

Path Parameters

ParameterTypeRequiredDescription
idstringYesAccount unique identifier.

Request Body

All fields from Create Account are accepted (none required). Additionally supports:

products array — Manage product associations:

ActionRequired FieldsDescription
addprovider_id, product_type_idAdd a new product. Optional: coverage_id, start_date, end_date, status.
updateproduct_id + fields to changeUpdate existing product.
removeproduct_idRemove a product.

dynamic_fields array — Set or clear custom fields:

FieldTypeRequiredDescription
field_idstringYesDynamic field identifier.
namestringNoField name.
typestringNoField type.
ordernumberNoDisplay order.
valueanyNoNew value (or null to clear).

Code Examples

curl -s -X PUT "https://$TENANT/apidev/v1/accounts/982710394857201664" \
-H "Authorization: Bearer $TOKEN" \
-H "X-API-Key: $APIKEY" \
-H "tenant: $TENANT" \
-H "Content-Type: application/json" \
-d '{
"email": "new-contact@acme.com",
"notes": "Upgraded to premium tier",
"products": [
{
"action": "add",
"provider_id": "982710394857200030",
"product_type_id": "8",
"coverage_id": "12",
"start_date": "2026-04-01",
"status": "A"
},
{
"action": "remove",
"product_id": "982710394857201700"
}
],
"dynamic_fields": [
{ "field_id": "10", "value": "Premium" },
{ "field_id": "11", "value": null }
]
}'

Example Response

{
"success": true,
"data": {
"id": "982710394857201664",
"updated_fields": ["email", "notes", "products", "dynamic_fields"]
},
"meta": {}
}

Errors

CodeHTTPDescription
BAD_REQUEST400Missing required headers.
VALIDATION_ERROR400Invalid parameters.
UNAUTHORIZED401Invalid or expired JWT / API Key.
FORBIDDEN403User lacks required permission.
NOT_FOUND404Resource not found (update endpoint).
RATE_LIMITED429Exceeded 10 req/min.
INTERNAL_ERROR500Unexpected server error.