Chapter 02 of 05 · UAE sandbox
Onboard your customer
Create your customer’s UAE company and first source in sandbox. You need the API key from the previous chapter and verified UAE onboarding details.
Send the onboarding request
curl --request POST 'https://prod.gets.complyance.io/v3/connect/companies' \
--header "X-API-Key: ${COMPLYANCE_API_KEY}" \
--header 'Content-Type: application/json' \
--data '{
"sourceName": "acme-dubai",
"sourceVersion": "v1",
"countryCode": "AE",
"tin": "1234567890",
"contactPersonEmail": "finance@example.com",
"contactPersonName": "Alex Morgan",
"branchName": "Dubai",
"platformEnvironment": "sandbox"
}' \
--output company-response.jsonRead company-response.json. A successful create returns HTTP 201 and success: true. See the example response for the returned fields.
Save the company and source
Store the returned company and branch identifiers in your application. Set COMPLYANCE_SOURCE using the exact returned source name and version:
export COMPLYANCE_SOURCE="$(jq -er '.data | .sourceName + ":" + .sourceVersion' company-response.json)"This walkthrough uses jq, a command-line JSON tool. Keep the key and saved response outside source control.
Confirm readiness
jq -e '.success == true and .data.readyForInvoicing == true' company-response.jsonThe command must print true. If it prints false, inspect mappingReadiness and resolve the mapping assignment.
If something goes wrong
ASP_LINKAGE_NOT_FOUND: check that tin and contactPersonEmail are the ones the customer’s ASP authorization was registered with, then complete the authorization if it is still missing. See UAE prerequisites.
Duplicate or uncertain response: find the company before submitting another create request.
Last updated
03 Next: prepare an invoice Build the invoice payload for your UAE customer.