Skip to main content

Validate Customer ExternalId

Check whether an ExternalId from your system can be safely projected into Azotte (i.e. not already in use by another Azotte customer record for the same tenant). Call this before store to avoid a duplicate-identifier collision.

URL​

POST /api/c2a/customer/validate

Request Parameters​

NameTypeDescription
externalIdstringRequired. Tenant-side identifier to test for uniqueness within this tenant.

Request Example​

{
"externalId": "crm-9981273"
}

Response Parameters​

ValidateCustomerResponse.

NameTypeDescription
isAvailablebooleantrue if the ExternalId is free to use.
statusobject (AzotteStatus)Operation status envelope.
status.messageCodestringSUCCESS on hit.

Sample Response​

{
"isAvailable": true,
"status": { "messageCode": "SUCCESS" }
}

Sample Codes​

curl --location 'https://acme.sandbox.azotte.com/api/v1/c2a/customer/validate' \
--header 'Content-Type: application/json' \
--header 'x-tn: e2a1c7b2-4f3a-4b8e-9c2d-1a2b3c4d5e6f' \
--header 'x-api-key: sk_dev_acme_sample_123456789' \
--data '{ "externalId": "crm-9981273" }'