Create shifts
POST/api/v2/public/marketplace/shifts/batch
General Information
When creating shift price quotation is based on from
, to
dates, and optional breakTime
params.
- Failure: The process uses transactions, so if one job fails, all changes are reverted.
- License Requirement: A valid licenseType must be provided when creating a shift.
- Facility Connection: If the authenticated user is not connected with the facility, the system will return a "facility not found" error. In this case, refer to the facility connection request guide. Ensure you account for this response in your implementation.
Potential Issues
- No Associated User: There is no user associated with the facility. At least one user must be created and associated with the facility.
- No Associated User: The user needs to have a connection with the facility
Request
- application/json
Body
required
- Array [
- ]
shifts object[]required
License Type of the shift
Description of the shift, you can provide detailed information about the shift, it can include any relevant details that would help nurses understand the nature and requirements of the shift.
Shift start date
Shift end date, must be less than 24 hours after from field
Break Time for the shift
If the facility has auto-scheduling feature enabled then this property can be set to false to disable auto-scheduling for this shift.
Responses
- 201
- 400
- 401
- 403
- application/json
- Schema
- Example (from schema)
Schema
- Array [
- ]
data object[]
Id of the shift
Id of the Facility
Description of the Shift
Shift start date
Shift end date
License Type of the shift
price objectrequired
Price per hour
Total price
Id of the user that created the shift
Break Time for the shift
{
"data": [
{
"shiftId": "12120878",
"facilityId": "NUR-0879",
"description": "Must take 30 minute break",
"from": "2022-09-13T00:00:00.000Z",
"to": "2022-09-14T00:00:00.000Z",
"licenseType": "RN",
"price": {
"billRatePerHour": 47.5,
"totalAmount": 178.8
},
"createdBy": "gsFu59GrbAhFmUB0QyYf1Ubg0Q5E",
"breakTime": "PT45M"
}
]
}
Bad request
- application/json
- Schema
- Example (from schema)
- Request Validation
Schema
Error description
The type of error
Status code of the error
{
"message": [
"Property must be a string"
],
"error": "Bad Request",
"statusCode": 400
}
Request Validation Error
{
"message": [
"facilityId must be a string",
"licenseType should not be empty",
"licenseType must be a string",
"description should not be empty",
"description must be a string",
"from must be RFC 3339 date",
"from must be a valid ISO 8601 date string",
"from should not be empty",
"to must be RFC 3339 date",
"to must be less than 24 hours after from field",
"to must be a valid ISO 8601 date string",
"to should not be empty",
"shifts must be an array"
],
"error": "Bad Request",
"statusCode": 400
}
Unauthorized
- application/json
- Schema
- Example (from schema)
Schema
Error description
Status code of the error
{
"message": "Unauthorized",
"statusCode": 401
}
Forbidden
- application/json
- Schema
- Example (from schema)
Schema
Error description
The type of error
Status code of the error
{
"message": "Forbidden Resource",
"error": "Forbidden",
"statusCode": 403
}