Skip to main content

Clients — Create & Update

Create new clients and update existing ones with partial updates.


Create Client

POST/apidev/v1/clients
PermissionAPICLI_CLIENTS_WRITE
Rate Limit10 req/min

Request Body

FieldTypeRequiredMaxDescription
namestringYes200Client display name.
external_codestringNo120External system identifier.
statusstringNo10Client status.
documentstringNo60Document number.
document_typenumberNoDocument type identifier.
business_namestringNo200Legal business name.
tax_idstringNo60Tax identification number.
phonestringNo60Phone number.
mobilestringNo60Mobile phone.
emailstringNo200Email address.
notesstringNo1000Free-text notes.
image_urlstringNo500Image URL.
streetstringNo200Street name.
door_numberstringNo20Door number.
apartmentstringNo20Apartment or suite.
cornerstringNo200Cross street.
zip_codestringNo20Postal code.
latitudenumberNoLatitude coordinate.
longitudenumberNoLongitude coordinate.
country_idstringNo30Country ID.
department_idstringNo30Department ID.

Code Examples

curl -s -X POST "https://$TENANT/apidev/v1/clients" \
-H "Authorization: Bearer $TOKEN" \
-H "X-API-Key: $APIKEY" \
-H "tenant: $TENANT" \
-H "Content-Type: application/json" \
-d '{
"name": "Regional Distributors",
"business_name": "Regional Distributors S.A.",
"tax_id": "219900005018",
"email": "info@regionaldist.com",
"phone": "+59821009876",
"street": "Bvar. Artigas",
"door_number": "567",
"country_id": "1",
"department_id": "10"
}'

Example Response

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

Update Client

Update an existing client. 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/clients/{id}
PermissionAPICLI_CLIENTS_WRITE
Rate Limit10 req/min

Path Parameters

ParameterTypeRequiredDescription
idstringYesClient unique identifier.

Request Body

All fields from Create Client are accepted (none required). Only include the fields you want to modify.

Code Examples

curl -s -X PUT "https://$TENANT/apidev/v1/clients/982710394857200005" \
-H "Authorization: Bearer $TOKEN" \
-H "X-API-Key: $APIKEY" \
-H "tenant: $TENANT" \
-H "Content-Type: application/json" \
-d '{
"email": "new-info@regionaldist.com",
"phone": "+59821005555",
"notes": "Updated primary contact"
}'

Example Response

{
"success": true,
"data": {
"id": "982710394857200005",
"updated_fields": ["email", "phone", "notes"]
},
"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.