OpenAPI 3.1.0

Avisator API

Dock scheduling and supplier communication API. Manage locations, docks, booking slots, reservations, suppliers, and vehicle types.

Version
1.0.0
Operations
18
Server
https://avisator.locura.tech
Download JSON

Showing 18 of 18 operations

get/api/v1/bookings

List bookings

BookingsBearer API keyavisator:bookings:read
Schema details

Parameters

[
  {
    "in": "query",
    "name": "status",
    "schema": {
      "enum": [
        "pending",
        "approved",
        "rejected",
        "cancelled",
        "arrived",
        "in_progress",
        "completed",
        "no_show"
      ],
      "type": "string"
    }
  },
  {
    "in": "query",
    "name": "date_from",
    "schema": {
      "format": "date",
      "type": "string"
    }
  },
  {
    "in": "query",
    "name": "date_to",
    "schema": {
      "format": "date",
      "type": "string"
    }
  },
  {
    "in": "query",
    "name": "supplier_id",
    "schema": {
      "type": "string"
    }
  },
  {
    "in": "query",
    "name": "dock_id",
    "schema": {
      "type": "string"
    }
  },
  {
    "in": "query",
    "name": "location_id",
    "schema": {
      "type": "string"
    }
  },
  {
    "in": "query",
    "name": "page",
    "schema": {
      "default": 1,
      "type": "integer"
    }
  },
  {
    "in": "query",
    "name": "per_page",
    "schema": {
      "default": 50,
      "type": "integer"
    }
  }
]

Responses

{
  "200": {
    "description": "Success"
  },
  "401": {
    "description": "Unauthorized - missing or invalid API key"
  },
  "403": {
    "description": "Forbidden - missing required scope"
  },
  "429": {
    "description": "Rate limit exceeded"
  },
  "500": {
    "description": "Internal server error"
  }
}
post/api/v1/bookings

Create a booking

BookingsBearer API keyavisator:bookings:write
Schema details

Request body

{
  "content": {
    "application/json": {
      "schema": {
        "properties": {
          "cargo_description": {
            "type": "string"
          },
          "date": {
            "format": "date",
            "type": "string"
          },
          "dock_id": {
            "type": "string"
          },
          "driver_name": {
            "type": "string"
          },
          "driver_phone": {
            "type": "string"
          },
          "license_plate": {
            "type": "string"
          },
          "location_id": {
            "type": "string"
          },
          "reference_number": {
            "type": "string"
          },
          "start_time": {
            "pattern": "^[0-2]\\d:[0-5]\\d$",
            "type": "string"
          },
          "supplier_id": {
            "type": "string"
          },
          "vehicle_type_id": {
            "type": "string"
          }
        },
        "required": [
          "location_id",
          "dock_id",
          "supplier_id",
          "vehicle_type_id",
          "date",
          "start_time"
        ],
        "type": "object"
      }
    }
  },
  "required": true
}

Responses

{
  "200": {
    "description": "Success"
  },
  "401": {
    "description": "Unauthorized - missing or invalid API key"
  },
  "403": {
    "description": "Forbidden - missing required scope"
  },
  "429": {
    "description": "Rate limit exceeded"
  },
  "500": {
    "description": "Internal server error"
  }
}
get/api/v1/bookings/{id}

Get booking details

BookingsBearer API keyavisator:bookings:read
Schema details

Parameters

[
  {
    "in": "path",
    "name": "id",
    "required": true,
    "schema": {
      "type": "string"
    }
  }
]

Responses

{
  "200": {
    "description": "Success"
  },
  "401": {
    "description": "Unauthorized - missing or invalid API key"
  },
  "403": {
    "description": "Forbidden - missing required scope"
  },
  "429": {
    "description": "Rate limit exceeded"
  },
  "500": {
    "description": "Internal server error"
  }
}
patch/api/v1/bookings/{id}

Update/reschedule a booking

BookingsBearer API keyavisator:bookings:write
Schema details

Parameters

[
  {
    "in": "path",
    "name": "id",
    "required": true,
    "schema": {
      "type": "string"
    }
  }
]

Request body

{
  "content": {
    "application/json": {
      "schema": {
        "properties": {
          "cargo_description": {
            "type": "string"
          },
          "date": {
            "format": "date",
            "type": "string"
          },
          "dock_id": {
            "type": "string"
          },
          "driver_name": {
            "type": "string"
          },
          "driver_phone": {
            "type": "string"
          },
          "license_plate": {
            "type": "string"
          },
          "reference_number": {
            "type": "string"
          },
          "start_time": {
            "pattern": "^[0-2]\\d:[0-5]\\d$",
            "type": "string"
          },
          "vehicle_type_id": {
            "type": "string"
          }
        },
        "type": "object"
      }
    }
  },
  "required": true
}

Responses

{
  "200": {
    "description": "Success"
  },
  "401": {
    "description": "Unauthorized - missing or invalid API key"
  },
  "403": {
    "description": "Forbidden - missing required scope"
  },
  "429": {
    "description": "Rate limit exceeded"
  },
  "500": {
    "description": "Internal server error"
  }
}
delete/api/v1/bookings/{id}

Cancel a booking

BookingsBearer API keyavisator:bookings:write
Schema details

Parameters

[
  {
    "in": "path",
    "name": "id",
    "required": true,
    "schema": {
      "type": "string"
    }
  }
]

Responses

{
  "200": {
    "description": "Success"
  },
  "401": {
    "description": "Unauthorized - missing or invalid API key"
  },
  "403": {
    "description": "Forbidden - missing required scope"
  },
  "429": {
    "description": "Rate limit exceeded"
  },
  "500": {
    "description": "Internal server error"
  }
}
post/api/v1/bookings/{id}/notes

Add a note to a booking

BookingsBearer API keyavisator:bookings:write
Schema details

Parameters

[
  {
    "in": "path",
    "name": "id",
    "required": true,
    "schema": {
      "type": "string"
    }
  }
]

Request body

{
  "content": {
    "application/json": {
      "schema": {
        "properties": {
          "content": {
            "type": "string"
          },
          "is_important": {
            "type": "boolean"
          }
        },
        "required": [
          "content"
        ],
        "type": "object"
      }
    }
  },
  "required": true
}

Responses

{
  "200": {
    "description": "Success"
  },
  "401": {
    "description": "Unauthorized - missing or invalid API key"
  },
  "403": {
    "description": "Forbidden - missing required scope"
  },
  "429": {
    "description": "Rate limit exceeded"
  },
  "500": {
    "description": "Internal server error"
  }
}
put/api/v1/bookings/{id}/status

Update booking status

BookingsBearer API keyavisator:bookings:write
Schema details

Parameters

[
  {
    "in": "path",
    "name": "id",
    "required": true,
    "schema": {
      "type": "string"
    }
  }
]

Request body

{
  "content": {
    "application/json": {
      "schema": {
        "properties": {
          "rejection_reason": {
            "type": "string"
          },
          "status": {
            "enum": [
              "approved",
              "rejected",
              "cancelled",
              "arrived",
              "in_progress",
              "completed",
              "no_show"
            ],
            "type": "string"
          }
        },
        "required": [
          "status"
        ],
        "type": "object"
      }
    }
  },
  "required": true
}

Responses

{
  "200": {
    "description": "Success"
  },
  "401": {
    "description": "Unauthorized - missing or invalid API key"
  },
  "403": {
    "description": "Forbidden - missing required scope"
  },
  "429": {
    "description": "Rate limit exceeded"
  },
  "500": {
    "description": "Internal server error"
  }
}
get/api/v1/dock-map/{location_id}

Get dock map occupancy data

Dock MapBearer API keyavisator:locations:read
Schema details

Parameters

[
  {
    "in": "path",
    "name": "location_id",
    "required": true,
    "schema": {
      "type": "string"
    }
  },
  {
    "in": "query",
    "name": "date",
    "required": true,
    "schema": {
      "format": "date",
      "type": "string"
    }
  }
]

Responses

{
  "200": {
    "description": "Success"
  },
  "401": {
    "description": "Unauthorized - missing or invalid API key"
  },
  "403": {
    "description": "Forbidden - missing required scope"
  },
  "429": {
    "description": "Rate limit exceeded"
  },
  "500": {
    "description": "Internal server error"
  }
}
get/api/v1/health

Health check

SystemPublic
Schema details

Responses

{
  "200": {
    "description": "Success"
  },
  "401": {
    "description": "Unauthorized - missing or invalid API key"
  },
  "403": {
    "description": "Forbidden - missing required scope"
  },
  "429": {
    "description": "Rate limit exceeded"
  },
  "500": {
    "description": "Internal server error"
  }
}
get/api/v1/locations

List locations

LocationsBearer API keyavisator:locations:read
Schema details

Parameters

[
  {
    "in": "query",
    "name": "page",
    "schema": {
      "default": 1,
      "type": "integer"
    }
  },
  {
    "in": "query",
    "name": "per_page",
    "schema": {
      "default": 50,
      "type": "integer"
    }
  }
]

Responses

{
  "200": {
    "description": "Success"
  },
  "401": {
    "description": "Unauthorized - missing or invalid API key"
  },
  "403": {
    "description": "Forbidden - missing required scope"
  },
  "429": {
    "description": "Rate limit exceeded"
  },
  "500": {
    "description": "Internal server error"
  }
}
get/api/v1/locations/{id}

Get location details with docks and schedules

LocationsBearer API keyavisator:locations:read
Schema details

Parameters

[
  {
    "in": "path",
    "name": "id",
    "required": true,
    "schema": {
      "type": "string"
    }
  }
]

Responses

{
  "200": {
    "description": "Success"
  },
  "401": {
    "description": "Unauthorized - missing or invalid API key"
  },
  "403": {
    "description": "Forbidden - missing required scope"
  },
  "429": {
    "description": "Rate limit exceeded"
  },
  "500": {
    "description": "Internal server error"
  }
}
get/api/v1/locations/{id}/docks

List docks at location

LocationsBearer API keyavisator:locations:read
Schema details

Parameters

[
  {
    "in": "path",
    "name": "id",
    "required": true,
    "schema": {
      "type": "string"
    }
  }
]

Responses

{
  "200": {
    "description": "Success"
  },
  "401": {
    "description": "Unauthorized - missing or invalid API key"
  },
  "403": {
    "description": "Forbidden - missing required scope"
  },
  "429": {
    "description": "Rate limit exceeded"
  },
  "500": {
    "description": "Internal server error"
  }
}
get/api/v1/slots

Get available booking slots

SlotsBearer API keyavisator:slots:read
Schema details

Parameters

[
  {
    "in": "query",
    "name": "location_id",
    "required": true,
    "schema": {
      "type": "string"
    }
  },
  {
    "in": "query",
    "name": "date",
    "required": true,
    "schema": {
      "format": "date",
      "type": "string"
    }
  },
  {
    "in": "query",
    "name": "dock_id",
    "schema": {
      "type": "string"
    }
  }
]

Responses

{
  "200": {
    "description": "Success"
  },
  "401": {
    "description": "Unauthorized - missing or invalid API key"
  },
  "403": {
    "description": "Forbidden - missing required scope"
  },
  "429": {
    "description": "Rate limit exceeded"
  },
  "500": {
    "description": "Internal server error"
  }
}
get/api/v1/suppliers

List suppliers

SuppliersBearer API keyavisator:suppliers:read
Schema details

Parameters

[
  {
    "in": "query",
    "name": "page",
    "schema": {
      "default": 1,
      "type": "integer"
    }
  },
  {
    "in": "query",
    "name": "per_page",
    "schema": {
      "default": 50,
      "type": "integer"
    }
  }
]

Responses

{
  "200": {
    "description": "Success"
  },
  "401": {
    "description": "Unauthorized - missing or invalid API key"
  },
  "403": {
    "description": "Forbidden - missing required scope"
  },
  "429": {
    "description": "Rate limit exceeded"
  },
  "500": {
    "description": "Internal server error"
  }
}
post/api/v1/suppliers

Create a supplier

SuppliersBearer API keyavisator:suppliers:write
Schema details

Request body

{
  "content": {
    "application/json": {
      "schema": {
        "properties": {
          "contact_email": {
            "format": "email",
            "type": "string"
          },
          "contact_phone": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "nip": {
            "type": "string"
          },
          "notes": {
            "type": "string"
          }
        },
        "required": [
          "name"
        ],
        "type": "object"
      }
    }
  },
  "required": true
}

Responses

{
  "200": {
    "description": "Success"
  },
  "401": {
    "description": "Unauthorized - missing or invalid API key"
  },
  "403": {
    "description": "Forbidden - missing required scope"
  },
  "429": {
    "description": "Rate limit exceeded"
  },
  "500": {
    "description": "Internal server error"
  }
}
get/api/v1/suppliers/{id}

Get supplier details

SuppliersBearer API keyavisator:suppliers:read
Schema details

Parameters

[
  {
    "in": "path",
    "name": "id",
    "required": true,
    "schema": {
      "type": "string"
    }
  }
]

Responses

{
  "200": {
    "description": "Success"
  },
  "401": {
    "description": "Unauthorized - missing or invalid API key"
  },
  "403": {
    "description": "Forbidden - missing required scope"
  },
  "429": {
    "description": "Rate limit exceeded"
  },
  "500": {
    "description": "Internal server error"
  }
}
patch/api/v1/suppliers/{id}

Update a supplier

SuppliersBearer API keyavisator:suppliers:write
Schema details

Parameters

[
  {
    "in": "path",
    "name": "id",
    "required": true,
    "schema": {
      "type": "string"
    }
  }
]

Request body

{
  "content": {
    "application/json": {
      "schema": {
        "properties": {
          "contact_email": {
            "format": "email",
            "type": "string"
          },
          "contact_phone": {
            "type": "string"
          },
          "is_active": {
            "type": "boolean"
          },
          "name": {
            "type": "string"
          },
          "nip": {
            "type": "string"
          },
          "notes": {
            "type": "string"
          }
        },
        "type": "object"
      }
    }
  },
  "required": true
}

Responses

{
  "200": {
    "description": "Success"
  },
  "401": {
    "description": "Unauthorized - missing or invalid API key"
  },
  "403": {
    "description": "Forbidden - missing required scope"
  },
  "429": {
    "description": "Rate limit exceeded"
  },
  "500": {
    "description": "Internal server error"
  }
}
get/api/v1/vehicles

List vehicle types

VehiclesBearer API keyavisator:vehicles:read
Schema details

Responses

{
  "200": {
    "description": "Success"
  },
  "401": {
    "description": "Unauthorized - missing or invalid API key"
  },
  "403": {
    "description": "Forbidden - missing required scope"
  },
  "429": {
    "description": "Rate limit exceeded"
  },
  "500": {
    "description": "Internal server error"
  }
}