Floyd Engine uses HTTP status codes to express semantics. Your agent should branch on status codes.
- Resource, service, booking, or allocation ID does not exist.
Input didn't match the schema.
Response shape:
{
"error": {
"code": "invalid_input",
"message": "Invalid input",
"issues": [...]
}
}409 means "this request is semantically valid, but cannot be completed".
Common causes:
Another active allocation already blocks that time range on that resource.
{
"error": {
"code": "allocation.overlap",
"message": "Conflict",
"details": {
"conflictingAllocationIds": ["alc_..."]
}
}
}The service's policy rejects the booking request (wrong hours, invalid duration, etc.). The top-level code is always policy.rejected; the specific reason is in details.code.
{
"error": {
"code": "policy.rejected",
"message": "Conflict",
"details": {
"code": "policy.blackout",
"message": "Blackout window"
}
}
}Policy sub-codes:
details.code |
Meaning |
|---|---|
policy.blackout |
Date falls in a blackout window |
policy.closed |
Service is closed at that time |
policy.invalid_duration |
Duration not allowed by policy |
policy.misaligned_start |
Start time doesn't align to scheduling grid |
policy.lead_time_violation |
Too short notice |
policy.horizon_exceeded |
Too far in advance |
policy.overnight_not_supported |
Overnight bookings not supported |
The requested resource does not belong to the specified service.
{
"error": {
"code": "service.resource_not_member",
"message": "Conflict",
"details": {
"serviceId": "svc_...",
"resourceId": "rsc_..."
}
}
}Trying to create a booking against a service that has no policy attached.
{
"error": {
"code": "service.no_policy",
"message": "Conflict"
}
}Trying to confirm a booking whose hold has already expired.
{
"error": {
"code": "booking.hold_expired",
"message": "Conflict",
"details": {
"expiresAt": "2026-03-01T10:15:00.000Z",
"serverTime": "2026-03-01T10:20:00.000Z"
}
}
}Trying to confirm or cancel a booking that is not in the expected state.
{
"error": {
"code": "booking.invalid_transition",
"message": "Conflict",
"details": {
"currentStatus": "confirmed",
"requestedStatus": "confirmed"
}
}
}Trying to delete a service that has bookings in hold or confirmed status.
{
"error": {
"code": "service.active_bookings",
"message": "Conflict"
}
}Trying to delete a resource that has allocations or service associations.
{
"error": {
"code": "resource.in_use",
"message": "Conflict",
"details": {
"message": "Resource has active allocations or service associations"
}
}
}Trying to delete a policy that is referenced by one or more services or bookings.
{
"error": {
"code": "policy.in_use",
"message": "Conflict",
"details": {
"message": "Policy is referenced by one or more services or bookings"
}
}
}Trying to delete an allocation that belongs to a booking. Use the booking cancel endpoint instead.
{
"error": {
"code": "allocation.managed_by_booking",
"message": "Conflict",
"details": {
"bookingId": "bkg_..."
}
}
}Same Idempotency-Key header but different request body or path.
{
"error": {
"code": "idempotency_payload_mismatch",
"message": "Idempotency key already used with different payload"
}
}A previous request with the same Idempotency-Key is still processing. Wait and retry.
{
"error": {
"code": "idempotency_in_progress",
"message": "Previous request still in progress"
}
}Unexpected failure. Retry with backoff and the same Idempotency-Key header when possible.
200/201- proceed409- pick a new time slot, adjust parameters, or ask the user422- fix your payload (bug)425- wait and retry with the sameIdempotency-Key5xx- retry with backoff + idempotency