curl --request POST \
'https://www.app.wfa.team/api/1.1/wf/rwa_retrieve' \
--header "Authorization: Bearer $WFA_COMPANY_TOKEN" \
--header 'Content-Type: application/json' \
--data '{
"assessmentId": "YOUR_TEST_ASSESSMENT_ID"
}'
// Run on your server. Set WFA_COMPANY_TOKEN in its environment.
const response = await fetch('https://www.app.wfa.team/api/1.1/wf/rwa_retrieve', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.WFA_COMPANY_TOKEN}`,
'Content-Type': 'application/json'
},
body: JSON.stringify({
"assessmentId": "YOUR_TEST_ASSESSMENT_ID"
})
});
const result = await response.json();
if (!response.ok || result.status !== 'success' || result.success === false) {
throw new Error(result.message || JSON.stringify(result.errors || result));
}
console.log(result);
# Run on your server. Set WFA_COMPANY_TOKEN in its environment.
import os
import requests
response = requests.post(
'https://www.app.wfa.team/api/1.1/wf/rwa_retrieve',
headers={
'Authorization': f"Bearer {os.environ['WFA_COMPANY_TOKEN']}",
'Content-Type': 'application/json',
},
json={
"assessmentId": "YOUR_TEST_ASSESSMENT_ID"
},
timeout=45,
)
result = response.json()
if not response.ok or result.get('status') != 'success' or result.get('success') is False:
raise RuntimeError(result.get('message') or result.get('errors') or result)
print(result)
{
"status": "success",
"data": {
"workingRights": 0,
"payrollTax": 8.3,
"socialSecurity": 9.1,
"corporateTax": 7.5,
"employmentLaw": 4.4,
"overallTrip": 7.6,
"assessmentId": "YOUR_ASSESSMENT_ID",
"employeeId": "STAFF-001",
"complianceTeamMemberId": "",
"managerId": "",
"cumulativePeRiskLevel": "Low"
}
}
{
"status": "success",
"data": {
"workingRights": 0,
"payrollTax": 8.3,
"socialSecurity": 9.1,
"corporateTax": 7.5,
"employmentLaw": 4.4,
"overallTrip": 7.6,
"assessmentId": "YOUR_ASSESSMENT_ID",
"employeeId": "STAFF-001",
"complianceTeamMemberId": "",
"managerId": "",
"contractorMisclass": 6.2
}
}
{
"status": "error",
"success": false,
"message": "Pending"
}
{
"status": "error",
"success": false,
"message": "Not Found"
}
{
"status": "error",
"success": false,
"message": "Invalid Auth"
}
API reference
Retrieve an assessment
Retrieve risk results for an existing assessment.
POST
/
api
/
1.1
/
wf
/
rwa_retrieve
curl --request POST \
'https://www.app.wfa.team/api/1.1/wf/rwa_retrieve' \
--header "Authorization: Bearer $WFA_COMPANY_TOKEN" \
--header 'Content-Type: application/json' \
--data '{
"assessmentId": "YOUR_TEST_ASSESSMENT_ID"
}'
// Run on your server. Set WFA_COMPANY_TOKEN in its environment.
const response = await fetch('https://www.app.wfa.team/api/1.1/wf/rwa_retrieve', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.WFA_COMPANY_TOKEN}`,
'Content-Type': 'application/json'
},
body: JSON.stringify({
"assessmentId": "YOUR_TEST_ASSESSMENT_ID"
})
});
const result = await response.json();
if (!response.ok || result.status !== 'success' || result.success === false) {
throw new Error(result.message || JSON.stringify(result.errors || result));
}
console.log(result);
# Run on your server. Set WFA_COMPANY_TOKEN in its environment.
import os
import requests
response = requests.post(
'https://www.app.wfa.team/api/1.1/wf/rwa_retrieve',
headers={
'Authorization': f"Bearer {os.environ['WFA_COMPANY_TOKEN']}",
'Content-Type': 'application/json',
},
json={
"assessmentId": "YOUR_TEST_ASSESSMENT_ID"
},
timeout=45,
)
result = response.json()
if not response.ok or result.get('status') != 'success' or result.get('success') is False:
raise RuntimeError(result.get('message') or result.get('errors') or result)
print(result)
{
"status": "success",
"data": {
"workingRights": 0,
"payrollTax": 8.3,
"socialSecurity": 9.1,
"corporateTax": 7.5,
"employmentLaw": 4.4,
"overallTrip": 7.6,
"assessmentId": "YOUR_ASSESSMENT_ID",
"employeeId": "STAFF-001",
"complianceTeamMemberId": "",
"managerId": "",
"cumulativePeRiskLevel": "Low"
}
}
{
"status": "success",
"data": {
"workingRights": 0,
"payrollTax": 8.3,
"socialSecurity": 9.1,
"corporateTax": 7.5,
"employmentLaw": 4.4,
"overallTrip": 7.6,
"assessmentId": "YOUR_ASSESSMENT_ID",
"employeeId": "STAFF-001",
"complianceTeamMemberId": "",
"managerId": "",
"contractorMisclass": 6.2
}
}
{
"status": "error",
"success": false,
"message": "Pending"
}
{
"status": "error",
"success": false,
"message": "Not Found"
}
{
"status": "error",
"success": false,
"message": "Invalid Auth"
}
POST /rwa_retrieve
If results are still being calculated, the endpoint returns Pending. Wait briefly, then retrieve the same assessment again; do not create another assessment.
Authorization
Body parameters
Error responses
| Message | Meaning | Action |
|---|---|---|
Invalid Auth | Company authorization did not match. | Check the company token and environment. |
Not Found | No matching assessment was found. | Check the assessment ID and environment. |
Pending | The assessment exists but its risk results are not ready. | Wait briefly and retrieve the same ID again. Stop polling after a bounded timeout and contact support. |
Response
The documented success body containsstatus: "success" and a data object. Risk scores are numbers and can contain decimals; see risk ratings.
Risk score from 0 to 10. See risk ratings.
Risk score from 0 to 10. See risk ratings.
Risk score from 0 to 10. See risk ratings.
Risk score from 0 to 10. See risk ratings.
Risk score from 0 to 10. See risk ratings.
Risk score from 0 to 10. See risk ratings.
Company cumulative permanent-establishment risk level. Work From Anywhere only; separate from the 0–10 scores.
Check the JSON response as well as HTTP status. HTTP 200 can contain an API error. For Pending or an uncertain transport response, retrieve the same assessment ID again with a delay and bounded timeout. Do not create a replacement assessment.
curl --request POST \
'https://www.app.wfa.team/api/1.1/wf/rwa_retrieve' \
--header "Authorization: Bearer $WFA_COMPANY_TOKEN" \
--header 'Content-Type: application/json' \
--data '{
"assessmentId": "YOUR_TEST_ASSESSMENT_ID"
}'
// Run on your server. Set WFA_COMPANY_TOKEN in its environment.
const response = await fetch('https://www.app.wfa.team/api/1.1/wf/rwa_retrieve', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.WFA_COMPANY_TOKEN}`,
'Content-Type': 'application/json'
},
body: JSON.stringify({
"assessmentId": "YOUR_TEST_ASSESSMENT_ID"
})
});
const result = await response.json();
if (!response.ok || result.status !== 'success' || result.success === false) {
throw new Error(result.message || JSON.stringify(result.errors || result));
}
console.log(result);
# Run on your server. Set WFA_COMPANY_TOKEN in its environment.
import os
import requests
response = requests.post(
'https://www.app.wfa.team/api/1.1/wf/rwa_retrieve',
headers={
'Authorization': f"Bearer {os.environ['WFA_COMPANY_TOKEN']}",
'Content-Type': 'application/json',
},
json={
"assessmentId": "YOUR_TEST_ASSESSMENT_ID"
},
timeout=45,
)
result = response.json()
if not response.ok or result.get('status') != 'success' or result.get('success') is False:
raise RuntimeError(result.get('message') or result.get('errors') or result)
print(result)
{
"status": "success",
"data": {
"workingRights": 0,
"payrollTax": 8.3,
"socialSecurity": 9.1,
"corporateTax": 7.5,
"employmentLaw": 4.4,
"overallTrip": 7.6,
"assessmentId": "YOUR_ASSESSMENT_ID",
"employeeId": "STAFF-001",
"complianceTeamMemberId": "",
"managerId": "",
"cumulativePeRiskLevel": "Low"
}
}
{
"status": "success",
"data": {
"workingRights": 0,
"payrollTax": 8.3,
"socialSecurity": 9.1,
"corporateTax": 7.5,
"employmentLaw": 4.4,
"overallTrip": 7.6,
"assessmentId": "YOUR_ASSESSMENT_ID",
"employeeId": "STAFF-001",
"complianceTeamMemberId": "",
"managerId": "",
"contractorMisclass": 6.2
}
}
{
"status": "error",
"success": false,
"message": "Pending"
}
{
"status": "error",
"success": false,
"message": "Not Found"
}
{
"status": "error",
"success": false,
"message": "Invalid Auth"
}
