Create shift assignment
POSThttps://api.maple.com/api/v1/shifts/:shiftId/assignments
Authorization: x-api-key
name: x-api-keytype: apiKeyin: headerdescription: Your Maple API Key
Create a shift assignment, creating the worker if it does not exist.
Request
Path Parameters
shiftId stringrequired
- application/json
Body
required
data objectrequired
Responses
- 200
- 4XX
- 5XX
- application/json
- Schema
- Example (from schema)
Schema
data objectrequired
{
"data": {
"attributes": {
"externalUserId": "string",
"firstName": "string",
"lastName": "string",
"email": "string",
"phone": "string"
},
"id": "string",
"type": "string"
}
}
- application/json
- Schema
- Example (from schema)
Schema
errors object[]required
{
"errors": [
{
"code": "string",
"id": "string",
"status": "string",
"title": "string"
}
]
}
- application/json
- Schema
- Example (from schema)
Schema
errors object[]required
{
"errors": [
{
"code": "string",
"id": "string",
"status": "string",
"title": "string"
}
]
}
- curl
- python
- go
- nodejs
- ruby
- csharp
- php
- java
- powershell
- CURL
curl -L -X POST 'https://api.maple.com/api/v1/shifts/:shiftId/assignments' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'x-api-key: <API_KEY_VALUE>' \
--data-raw '{
"data": {
"attributes": {
"externalUserId": "string",
"firstName": "string",
"lastName": "string",
"workerType": "string",
"email": "string",
"phone": "string"
},
"type": "string"
}
}'
ResponseClear