Skip to content

Create staff types in batch

Request

Create staff types in batch

Creates up to 100 staff types in a single request.

Notes:

  • The request body is JSON { "items": [ ... ] } where items is an array of staff type objects (same shape as single /create).
  • items must contain 1–100 elements; otherwise the request is rejected with 400.
  • Successful creates appear under succeeded; failures appear under failed with 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.

Real Example:

curl --location 'https://{{host}}/api/v1/staff/type/batch/create' \
--header 'Authorization: bearer {{token}}' \
--header 'Content-Type: application/json' \
--data '{
  "items": [
    { "display": "Associate", "description": "Associate staff type" },
    { "display": "Manager", "description": "Manager staff type" }
  ]
}'
Security
BearerAuth
Bodyapplication/jsonrequired
itemsArray of objectsrequired

Items

curl -i -X POST \
  https://api.doc.aiwyn.ai/_mock/bundle/api/v1/staff/type/batch/create \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "items": [
      {
        "display": "string",
        "description": "string",
        "permissionSetId": 0
      }
    ]
  }'

Responses

All staff types were created successfully

Bodyapplication/json
dataobject
errorobject or null
metaobject
Response
{ "data": { "index": 0, "display": "string", "id": 0 }, "error": {}, "meta": { "success": true, "message": "string", "timestamp": "2019-08-24T14:15:22Z", "version": "string" } }