Approve credential
curl --request POST \
--url https://api.sortx.co.uk/contractors/{contactId}/credentials/{credentialId}/approve \
--header 'x-api-key: <api-key>'const options = {method: 'POST', headers: {'x-api-key': '<api-key>'}};
fetch('https://api.sortx.co.uk/contractors/{contactId}/credentials/{credentialId}/approve', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.sortx.co.uk/contractors/{contactId}/credentials/{credentialId}/approve"
headers = {"x-api-key": "<api-key>"}
response = requests.post(url, headers=headers)
print(response.text){
"id": "<string>",
"contactId": "<string>",
"kind": "<string>",
"name": "<string>",
"reference": "<string>",
"provider": "<string>",
"coverMinor": 123,
"currency": "<string>",
"issuedOn": "<string>",
"expiresOn": "<string>",
"documentId": "<string>",
"approvedAt": "<string>",
"approvedByName": "<string>",
"status": "<string>",
"supersededById": "<string>",
"endedAt": "<string>",
"endReason": "<string>",
"actorUserId": "<string>",
"actorName": "<string>",
"createdAt": "<string>"
}{
"_tag": "TenantCreateRejected",
"reason": "<string>",
"field": "<string>"
}{
"_tag": "Unauthenticated"
}{
"_tag": "TenantSuspended",
"tenantId": "<string>",
"reason": "<string>"
}{
"_tag": "EntitlementMissing",
"tenantId": "<string>",
"moduleId": "<string>"
}{
"_tag": "TenantNotFound",
"slug": "<string>"
}{
"_tag": "WebhookDuplicate",
"integration": "<string>",
"externalId": "<string>"
}{
"_tag": "RateLimited",
"key": "<string>",
"retryAfterSeconds": 123,
"message": "<string>"
}{
"_tag": "IntegrationUnavailable",
"integration": "<string>",
"detail": "<string>"
}contractors
Approve credential
An owner or admin approves insurance the New company wizard filed, so the contractor can be given work
POST
/
contractors
/
{contactId}
/
credentials
/
{credentialId}
/
approve
Approve credential
curl --request POST \
--url https://api.sortx.co.uk/contractors/{contactId}/credentials/{credentialId}/approve \
--header 'x-api-key: <api-key>'const options = {method: 'POST', headers: {'x-api-key': '<api-key>'}};
fetch('https://api.sortx.co.uk/contractors/{contactId}/credentials/{credentialId}/approve', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.sortx.co.uk/contractors/{contactId}/credentials/{credentialId}/approve"
headers = {"x-api-key": "<api-key>"}
response = requests.post(url, headers=headers)
print(response.text){
"id": "<string>",
"contactId": "<string>",
"kind": "<string>",
"name": "<string>",
"reference": "<string>",
"provider": "<string>",
"coverMinor": 123,
"currency": "<string>",
"issuedOn": "<string>",
"expiresOn": "<string>",
"documentId": "<string>",
"approvedAt": "<string>",
"approvedByName": "<string>",
"status": "<string>",
"supersededById": "<string>",
"endedAt": "<string>",
"endReason": "<string>",
"actorUserId": "<string>",
"actorName": "<string>",
"createdAt": "<string>"
}{
"_tag": "TenantCreateRejected",
"reason": "<string>",
"field": "<string>"
}{
"_tag": "Unauthenticated"
}{
"_tag": "TenantSuspended",
"tenantId": "<string>",
"reason": "<string>"
}{
"_tag": "EntitlementMissing",
"tenantId": "<string>",
"moduleId": "<string>"
}{
"_tag": "TenantNotFound",
"slug": "<string>"
}{
"_tag": "WebhookDuplicate",
"integration": "<string>",
"externalId": "<string>"
}{
"_tag": "RateLimited",
"key": "<string>",
"retryAfterSeconds": 123,
"message": "<string>"
}{
"_tag": "IntegrationUnavailable",
"integration": "<string>",
"detail": "<string>"
}Authorizations
Response
Success