API reference
//
Create staff types in bat...
🔐 Required role:
STF_TYP_C📖 Data dictionary: Staff
Create staff types in batch
Creates up to 100 staff types in a single request.
Notes:
- The request body is JSON
{ "items": [ ... ] }whereitemsis an array of staff type objects (same shape as single/create). itemsmust contain 1–100 elements; otherwise the request is rejected with 400.- Successful creates appear under
succeeded; failures appear underfailedwith an error message (partial success is allowed). - 201 when every item succeeds; 422 when every item fails; 200 when there is a mix of successes and failures.
Response body (201, 200 and 422): the body is not wrapped in data/meta. It always has both arrays; index is the item's position in the request items.
{
"succeeded": [ { "index": 0, "display": "Associate", "id": 41 } ],
"failed": [ { "index": 1, "display": "Manager", "message": "Sorry, the specified permission set was not found or is not active." } ]
}succeeded[]:index(integer),display(string),id(integer, id of the new staff type)failed[]:index(integer),display(string),message(string, why the item was not created)
Security
(BearerAuth and CfAccessClientId and CfAccessClientSecret) or BearerAuth
- Sandbox (requires Cloudflare Access headers)https://api.sandbox.aiwyn.app/api/v1/staff/type/batch/create
- Staging (requires Cloudflare Access headers)https://api.staging.aiwyn.app/api/v1/staff/type/batch/create
- Production (your live firm data; no Cloudflare Access headers)https://api.aiwyn.ai/api/v1/staff/type/batch/create
curl -i -X POST \
https://api.sandbox.aiwyn.app/api/v1/staff/type/batch/create \
-H 'Authorization: Bearer <YOUR_JWT_HERE>' \
-H 'CF-Access-Client-Id: YOUR_API_KEY_HERE' \
-H 'CF-Access-Client-Secret: YOUR_API_KEY_HERE' \
-H 'Content-Type: application/json' \
-d '{
"items": [
{
"display": "Associate",
"description": "Associate staff type"
},
{
"display": "Manager",
"description": "Manager staff type"
}
]
}'Response
{ "succeeded": [ { … } ], "failed": [ { … } ] }