Skip to content

Latest commit

 

History

History
2877 lines (1527 loc) · 83.3 KB

api.md

File metadata and controls

2877 lines (1527 loc) · 83.3 KB

pg_scheduleserv API

This is an API for scheduling VRP tasks. Source code can be found on https://github.com/Georepublic/pg_scheduleserv

Informations

Version

0.2.0

License

GNU Affero General Public License

Contact

Team Georepublic [email protected]

Terms Of Service

https://swagger.io/terms/

Content negotiation

URI Schemes

  • http
  • https

Consumes

  • application/json

Produces

  • application/json
  • text/calendar

All endpoints

break

Method URI Name Summary
DELETE /breaks/{break_id} delete breaks break ID Delete a break
GET /breaks/{break_id} get breaks break ID Fetch a break
GET /vehicles/{vehicle_id}/breaks get vehicles vehicle ID breaks List breaks
PATCH /breaks/{break_id} patch breaks break ID Update a break
POST /vehicles/{vehicle_id}/breaks post vehicles vehicle ID breaks Create a new break

job

Method URI Name Summary
DELETE /jobs/{job_id} delete jobs job ID Delete a job
GET /jobs/{job_id} get jobs job ID Fetch a job
GET /jobs/{job_id}/schedule get jobs job ID schedule Get the schedule for a job
GET /projects/{project_id}/jobs get projects project ID jobs List jobs for a project
PATCH /jobs/{job_id} patch jobs job ID Update a job
POST /projects/{project_id}/jobs post projects project ID jobs Create a new job

project

Method URI Name Summary
DELETE /projects/{project_id} delete projects project ID Delete a project
GET /projects get projects List projects
GET /projects/{project_id} get projects project ID Fetch a project
PATCH /projects/{project_id} patch projects project ID Update a project
POST /projects post projects Create a new project

schedule

Method URI Name Summary
DELETE /projects/{project_id}/schedule delete projects project ID schedule Delete the schedule
GET /projects/{project_id}/schedule get projects project ID schedule Get the schedule
POST /projects/{project_id}/schedule post projects project ID schedule Schedule the tasks

shipment

Method URI Name Summary
DELETE /shipments/{shipment_id} delete shipments shipment ID Delete a shipment
GET /projects/{project_id}/shipments get projects project ID shipments List shipments for a project
GET /shipments/{shipment_id} get shipments shipment ID Fetch a shipment
GET /shipments/{shipment_id}/schedule get shipments shipment ID schedule Get the schedule for a shipment
PATCH /shipments/{shipment_id} patch shipments shipment ID Update a shipment
POST /projects/{project_id}/shipments post projects project ID shipments Create a new shipment

vehicle

Method URI Name Summary
DELETE /vehicles/{vehicle_id} delete vehicles vehicle ID Delete a vehicle
GET /projects/{project_id}/vehicles get projects project ID vehicles List vehicles for a project
GET /vehicles/{vehicle_id} get vehicles vehicle ID Fetch a vehicle
GET /vehicles/{vehicle_id}/schedule get vehicles vehicle ID schedule Get the schedule for a vehicle
PATCH /vehicles/{vehicle_id} patch vehicles vehicle ID Update a vehicle
POST /projects/{project_id}/vehicles post projects project ID vehicles Create a new vehicle

Paths

Delete a break (DeleteBreaksBreakID)

DELETE /breaks/{break_id}

Delete a break with its break_id

Consumes

  • application/json

Produces

  • application/json

Parameters

Name Source Type Go type Separator Required Default Description
break_id path integer int64 Break ID

All responses

Code Status Description Has headers Schema
200 OK OK schema
400 Bad Request Bad Request schema
404 Not Found Not Found schema

Responses

200 - OK

Status: OK

Schema

UtilSuccess

400 - Bad Request

Status: Bad Request

Schema

UtilErrorResponse

404 - Not Found

Status: Not Found

Schema

UtilNotFound

Delete a job (DeleteJobsJobID)

DELETE /jobs/{job_id}

Delete a job with its job_id

Consumes

  • application/json

Produces

  • application/json

Parameters

Name Source Type Go type Separator Required Default Description
job_id path integer int64 Job ID

All responses

Code Status Description Has headers Schema
200 OK OK schema
400 Bad Request Bad Request schema
404 Not Found Not Found schema

Responses

200 - OK

Status: OK

Schema

UtilSuccess

400 - Bad Request

Status: Bad Request

Schema

UtilErrorResponse

404 - Not Found

Status: Not Found

Schema

UtilNotFound

Delete a project (DeleteProjectsProjectID)

DELETE /projects/{project_id}

Delete a project with its project_id

Consumes

  • application/json

Produces

  • application/json

Parameters

Name Source Type Go type Separator Required Default Description
project_id path integer int64 Project ID

All responses

Code Status Description Has headers Schema
200 OK OK schema
400 Bad Request Bad Request schema
404 Not Found Not Found schema

Responses

200 - OK

Status: OK

Schema

UtilSuccess

400 - Bad Request

Status: Bad Request

Schema

UtilErrorResponse

404 - Not Found

Status: Not Found

Schema

UtilNotFound

Delete the schedule (DeleteProjectsProjectIDSchedule)

DELETE /projects/{project_id}/schedule

Delete the schedule for a project

Consumes

  • application/json

Produces

  • application/json

Parameters

Name Source Type Go type Separator Required Default Description
project_id path integer int64 Project ID

All responses

Code Status Description Has headers Schema
200 OK OK schema
400 Bad Request Bad Request schema
404 Not Found Not Found schema

Responses

200 - OK

Status: OK

Schema

UtilSuccess

400 - Bad Request

Status: Bad Request

Schema

UtilErrorResponse

404 - Not Found

Status: Not Found

Schema

UtilNotFound

Delete a shipment (DeleteShipmentsShipmentID)

DELETE /shipments/{shipment_id}

Delete a shipment with its shipment_id

Consumes

  • application/json

Produces

  • application/json

Parameters

Name Source Type Go type Separator Required Default Description
shipment_id path integer int64 Shipment ID

All responses

Code Status Description Has headers Schema
200 OK OK schema
400 Bad Request Bad Request schema
404 Not Found Not Found schema

Responses

200 - OK

Status: OK

Schema

UtilSuccess

400 - Bad Request

Status: Bad Request

Schema

UtilErrorResponse

404 - Not Found

Status: Not Found

Schema

UtilNotFound

Delete a vehicle (DeleteVehiclesVehicleID)

DELETE /vehicles/{vehicle_id}

Delete a vehicle with its vehicle_id

Consumes

  • application/json

Produces

  • application/json

Parameters

Name Source Type Go type Separator Required Default Description
vehicle_id path integer int64 Vehicle ID

All responses

Code Status Description Has headers Schema
200 OK OK schema
400 Bad Request Bad Request schema
404 Not Found Not Found schema

Responses

200 - OK

Status: OK

Schema

UtilSuccess

400 - Bad Request

Status: Bad Request

Schema

UtilErrorResponse

404 - Not Found

Status: Not Found

Schema

UtilNotFound

Fetch a break (GetBreaksBreakID)

GET /breaks/{break_id}

Fetch a break with its break_id

Consumes

  • application/json

Produces

  • application/json

Parameters

Name Source Type Go type Separator Required Default Description
break_id path integer int64 Break ID

All responses

Code Status Description Has headers Schema
200 OK OK schema
400 Bad Request Bad Request schema
404 Not Found Not Found schema

Responses

200 - OK

Status: OK

Schema

GetBreaksBreakIDOKBody

400 - Bad Request

Status: Bad Request

Schema

UtilErrorResponse

404 - Not Found

Status: Not Found

Schema

UtilNotFound

Inlined models

GetBreaksBreakIDOKBody

Properties

Name Type Go type Required Default Description Example
data DatabaseBreak models.DatabaseBreak

Fetch a job (GetJobsJobID)

GET /jobs/{job_id}

Fetch a job with its job_id

Consumes

  • application/json

Produces

  • application/json

Parameters

Name Source Type Go type Separator Required Default Description
job_id path integer int64 Job ID

All responses

Code Status Description Has headers Schema
200 OK OK schema
400 Bad Request Bad Request schema
404 Not Found Not Found schema

Responses

200 - OK

Status: OK

Schema

GetJobsJobIDOKBody

400 - Bad Request

Status: Bad Request

Schema

UtilErrorResponse

404 - Not Found

Status: Not Found

Schema

UtilNotFound

Inlined models

GetJobsJobIDOKBody

Properties

Name Type Go type Required Default Description Example
data DatabaseJob models.DatabaseJob

Get the schedule for a job (GetJobsJobIDSchedule)

GET /jobs/{job_id}/schedule

Get the schedule for a job using job_id

Consumes

  • application/json

Produces

  • application/json
  • text/calendar

Parameters

Name Source Type Go type Separator Required Default Description
job_id path integer int64 Job ID

All responses

Code Status Description Has headers Schema
200 OK OK schema
400 Bad Request Bad Request schema
404 Not Found Not Found schema

Responses

200 - OK

Status: OK

Schema

GetJobsJobIDScheduleOKBody

400 - Bad Request

Status: Bad Request

Schema

UtilErrorResponse

404 - Not Found

Status: Not Found

Schema

UtilNotFound

Inlined models

GetJobsJobIDScheduleOKBody

Properties

Name Type Go type Required Default Description Example
data []UtilScheduleDataTask []*models.UtilScheduleDataTask

List projects (GetProjects)

GET /projects

Get a list of projects

Consumes

  • application/json

Produces

  • application/json

All responses

Code Status Description Has headers Schema
200 OK OK schema
400 Bad Request Bad Request schema

Responses

200 - OK

Status: OK

Schema

GetProjectsOKBody

400 - Bad Request

Status: Bad Request

Schema

UtilErrorResponse

Inlined models

GetProjectsOKBody

Properties

Name Type Go type Required Default Description Example
data []DatabaseProject []*models.DatabaseProject

Fetch a project (GetProjectsProjectID)

GET /projects/{project_id}

Fetch a project with its project_id

Consumes

  • application/json

Produces

  • application/json

Parameters

Name Source Type Go type Separator Required Default Description
project_id path integer int64 Project ID

All responses

Code Status Description Has headers Schema
200 OK OK schema
400 Bad Request Bad Request schema
404 Not Found Not Found schema

Responses

200 - OK

Status: OK

Schema

GetProjectsProjectIDOKBody

400 - Bad Request

Status: Bad Request

Schema

UtilErrorResponse

404 - Not Found

Status: Not Found

Schema

UtilNotFound

Inlined models

GetProjectsProjectIDOKBody

Properties

Name Type Go type Required Default Description Example
data DatabaseProject models.DatabaseProject

List jobs for a project (GetProjectsProjectIDJobs)

GET /projects/{project_id}/jobs

Get a list of jobs for a project with project_id

Consumes

  • application/json

Produces

  • application/json

Parameters

Name Source Type Go type Separator Required Default Description
project_id path integer int64 Project ID

All responses

Code Status Description Has headers Schema
200 OK OK schema
400 Bad Request Bad Request schema

Responses

200 - OK

Status: OK

Schema

GetProjectsProjectIDJobsOKBody

400 - Bad Request

Status: Bad Request

Schema

UtilErrorResponse

Inlined models

GetProjectsProjectIDJobsOKBody

Properties

Name Type Go type Required Default Description Example
data []DatabaseJob []*models.DatabaseJob

Get the schedule (GetProjectsProjectIDSchedule)

GET /projects/{project_id}/schedule

Get the schedule for a project.

For JSON content type: When overview = true, only the metadata is returned. Default value is false, which also returns the summary object.

Consumes

  • application/json

Produces

  • application/json
  • text/calendar

Parameters

Name Source Type Go type Separator Required Default Description
project_id path integer int64 Project ID
overview query boolean bool Overview

All responses

Code Status Description Has headers Schema
200 OK OK schema
400 Bad Request Bad Request schema
404 Not Found Not Found schema

Responses

200 - OK

Status: OK

Schema

GetProjectsProjectIDScheduleOKBody

400 - Bad Request

Status: Bad Request

Schema

UtilErrorResponse

404 - Not Found

Status: Not Found

Schema

UtilNotFound

Inlined models

GetProjectsProjectIDScheduleOKBody

Properties

Name Type Go type Required Default Description Example
data UtilScheduleData models.UtilScheduleData

List shipments for a project (GetProjectsProjectIDShipments)

GET /projects/{project_id}/shipments

Get a list of shipments for a project with project_id

Consumes

  • application/json

Produces

  • application/json

Parameters

Name Source Type Go type Separator Required Default Description
project_id path integer int64 Project ID

All responses

Code Status Description Has headers Schema
200 OK OK schema
400 Bad Request Bad Request schema

Responses

200 - OK

Status: OK

Schema

GetProjectsProjectIDShipmentsOKBody

400 - Bad Request

Status: Bad Request

Schema

UtilErrorResponse

Inlined models

GetProjectsProjectIDShipmentsOKBody

Properties

Name Type Go type Required Default Description Example
data []DatabaseShipment []*models.DatabaseShipment

List vehicles for a project (GetProjectsProjectIDVehicles)

GET /projects/{project_id}/vehicles

Get a list of vehicles for a project with project_id

Consumes

  • application/json

Produces

  • application/json

Parameters

Name Source Type Go type Separator Required Default Description
project_id path integer int64 Project ID

All responses

Code Status Description Has headers Schema
200 OK OK schema
400 Bad Request Bad Request schema

Responses

200 - OK

Status: OK

Schema

GetProjectsProjectIDVehiclesOKBody

400 - Bad Request

Status: Bad Request

Schema

UtilErrorResponse

Inlined models

GetProjectsProjectIDVehiclesOKBody

Properties

Name Type Go type Required Default Description Example
data []DatabaseVehicle []*models.DatabaseVehicle

Fetch a shipment (GetShipmentsShipmentID)

GET /shipments/{shipment_id}

Fetch a shipment with its shipment_id

Consumes

  • application/json

Produces

  • application/json

Parameters

Name Source Type Go type Separator Required Default Description
shipment_id path integer int64 Shipment ID

All responses

Code Status Description Has headers Schema
200 OK OK schema
400 Bad Request Bad Request schema
404 Not Found Not Found schema

Responses

200 - OK

Status: OK

Schema

GetShipmentsShipmentIDOKBody

400 - Bad Request

Status: Bad Request

Schema

UtilErrorResponse

404 - Not Found

Status: Not Found

Schema

UtilNotFound

Inlined models

GetShipmentsShipmentIDOKBody

Properties

Name Type Go type Required Default Description Example
data DatabaseShipment models.DatabaseShipment

Get the schedule for a shipment (GetShipmentsShipmentIDSchedule)

GET /shipments/{shipment_id}/schedule

Get the schedule for a shipment using shipment_id

Consumes

  • application/json

Produces

  • application/json
  • text/calendar

Parameters

Name Source Type Go type Separator Required Default Description
shipment_id path integer int64 Shipment ID

All responses

Code Status Description Has headers Schema
200 OK OK schema
400 Bad Request Bad Request schema
404 Not Found Not Found schema

Responses

200 - OK

Status: OK

Schema

GetShipmentsShipmentIDScheduleOKBody

400 - Bad Request

Status: Bad Request

Schema

UtilErrorResponse

404 - Not Found

Status: Not Found

Schema

UtilNotFound

Inlined models

GetShipmentsShipmentIDScheduleOKBody

Properties

Name Type Go type Required Default Description Example
data []UtilScheduleDataTask []*models.UtilScheduleDataTask

Fetch a vehicle (GetVehiclesVehicleID)

GET /vehicles/{vehicle_id}

Fetch a vehicle with its vehicle_id

Consumes

  • application/json

Produces

  • application/json

Parameters

Name Source Type Go type Separator Required Default Description
vehicle_id path integer int64 Vehicle ID

All responses

Code Status Description Has headers Schema
200 OK OK schema
400 Bad Request Bad Request schema
404 Not Found Not Found schema

Responses

200 - OK

Status: OK

Schema

GetVehiclesVehicleIDOKBody

400 - Bad Request

Status: Bad Request

Schema

UtilErrorResponse

404 - Not Found

Status: Not Found

Schema

UtilNotFound

Inlined models

GetVehiclesVehicleIDOKBody

Properties

Name Type Go type Required Default Description Example
data DatabaseVehicle models.DatabaseVehicle

List breaks (GetVehiclesVehicleIDBreaks)

GET /vehicles/{vehicle_id}/breaks

Get a list of breaks

Consumes

  • application/json

Produces

  • application/json

Parameters

Name Source Type Go type Separator Required Default Description
vehicle_id path integer int64 Vehicle ID

All responses

Code Status Description Has headers Schema
200 OK OK schema
400 Bad Request Bad Request schema

Responses

200 - OK

Status: OK

Schema

GetVehiclesVehicleIDBreaksOKBody

400 - Bad Request

Status: Bad Request

Schema

UtilErrorResponse

Inlined models

GetVehiclesVehicleIDBreaksOKBody

Properties

Name Type Go type Required Default Description Example
data []DatabaseBreak []*models.DatabaseBreak

Get the schedule for a vehicle (GetVehiclesVehicleIDSchedule)

GET /vehicles/{vehicle_id}/schedule

Get the schedule for a vehicle using vehicle_id

For JSON content type: When overview = true, only the metadata is returned. Default value is false, which also returns the summary object.

Consumes

  • application/json

Produces

  • application/json
  • text/calendar

Parameters

Name Source Type Go type Separator Required Default Description
vehicle_id path integer int64 Vehicle ID
overview query boolean bool Overview

All responses

Code Status Description Has headers Schema
200 OK OK schema
400 Bad Request Bad Request schema
404 Not Found Not Found schema

Responses

200 - OK

Status: OK

Schema

GetVehiclesVehicleIDScheduleOKBody

400 - Bad Request

Status: Bad Request

Schema

UtilErrorResponse

404 - Not Found

Status: Not Found

Schema

UtilNotFound

Inlined models

GetVehiclesVehicleIDScheduleOKBody

Properties

Name Type Go type Required Default Description Example
data []UtilScheduleDB []*models.UtilScheduleDB

Update a break (PatchBreaksBreakID)

PATCH /breaks/{break_id}

Update a break with its break_id

Consumes

  • application/json

Produces

  • application/json

Parameters

Name Source Type Go type Separator Required Default Description
break_id path integer int64 Break ID
Break body DatabaseCreateBreakParams models.DatabaseCreateBreakParams Update break

All responses

Code Status Description Has headers Schema
200 OK OK schema
400 Bad Request Bad Request schema
404 Not Found Not Found schema

Responses

200 - OK

Status: OK

Schema

PatchBreaksBreakIDOKBody

400 - Bad Request

Status: Bad Request

Schema

UtilErrorResponse

404 - Not Found

Status: Not Found

Schema

UtilNotFound

Inlined models

PatchBreaksBreakIDOKBody

Properties

Name Type Go type Required Default Description Example
data DatabaseBreak models.DatabaseBreak

Update a job (PatchJobsJobID)

PATCH /jobs/{job_id}

Update a job (partial update) with its job_id

Consumes

  • application/json

Produces

  • application/json

Parameters

Name Source Type Go type Separator Required Default Description
job_id path integer int64 Job ID
Job body DatabaseUpdateJobParams models.DatabaseUpdateJobParams Job object

All responses

Code Status Description Has headers Schema
200 OK OK schema
400 Bad Request Bad Request schema
404 Not Found Not Found schema

Responses

200 - OK

Status: OK

Schema

PatchJobsJobIDOKBody

400 - Bad Request

Status: Bad Request

Schema

UtilErrorResponse

404 - Not Found

Status: Not Found

Schema

UtilNotFound

Inlined models

PatchJobsJobIDOKBody

Properties

Name Type Go type Required Default Description Example
data DatabaseJob models.DatabaseJob

Update a project (PatchProjectsProjectID)

PATCH /projects/{project_id}

Update a project with its project_id The "duration_calc" parameter must be either "euclidean", "valhalla" or "osrm"

Consumes

  • application/json

Produces

  • application/json

Parameters

Name Source Type Go type Separator Required Default Description
project_id path integer int64 Project ID
Project body DatabaseCreateProjectParams models.DatabaseCreateProjectParams Update project

All responses

Code Status Description Has headers Schema
200 OK OK schema
400 Bad Request Bad Request schema
404 Not Found Not Found schema

Responses

200 - OK

Status: OK

Schema

PatchProjectsProjectIDOKBody

400 - Bad Request

Status: Bad Request

Schema

UtilErrorResponse

404 - Not Found

Status: Not Found

Schema

UtilNotFound

Inlined models

PatchProjectsProjectIDOKBody

Properties

Name Type Go type Required Default Description Example
data DatabaseProject models.DatabaseProject

Update a shipment (PatchShipmentsShipmentID)

PATCH /shipments/{shipment_id}

Update a shipment with its shipment_id

Consumes

  • application/json

Produces

  • application/json

Parameters

Name Source Type Go type Separator Required Default Description
shipment_id path integer int64 Shipment ID
Shipment body DatabaseUpdateShipmentParams models.DatabaseUpdateShipmentParams Update shipment

All responses

Code Status Description Has headers Schema
200 OK OK schema
400 Bad Request Bad Request schema
404 Not Found Not Found schema

Responses

200 - OK

Status: OK

Schema

PatchShipmentsShipmentIDOKBody

400 - Bad Request

Status: Bad Request

Schema

UtilErrorResponse

404 - Not Found

Status: Not Found

Schema

UtilNotFound

Inlined models

PatchShipmentsShipmentIDOKBody

Properties

Name Type Go type Required Default Description Example
data DatabaseShipment models.DatabaseShipment

Update a vehicle (PatchVehiclesVehicleID)

PATCH /vehicles/{vehicle_id}

Update a vehicle with its vehicle_id

Consumes

  • application/json

Produces

  • application/json

Parameters

Name Source Type Go type Separator Required Default Description
vehicle_id path integer int64 Vehicle ID
Vehicle body DatabaseUpdateVehicleParams models.DatabaseUpdateVehicleParams Update vehicle

All responses

Code Status Description Has headers Schema
200 OK OK schema
400 Bad Request Bad Request schema
404 Not Found Not Found schema

Responses

200 - OK

Status: OK

Schema

PatchVehiclesVehicleIDOKBody

400 - Bad Request

Status: Bad Request

Schema

UtilErrorResponse

404 - Not Found

Status: Not Found

Schema

UtilNotFound

Inlined models

PatchVehiclesVehicleIDOKBody

Properties

Name Type Go type Required Default Description Example
data DatabaseVehicle models.DatabaseVehicle

Create a new project (PostProjects)

POST /projects

Create a new project with the input payload The "duration_calc" parameter must be either "euclidean", "valhalla" or "osrm"

Consumes

  • application/json

Produces

  • application/json

Parameters

Name Source Type Go type Separator Required Default Description
Project body DatabaseCreateProjectParams models.DatabaseCreateProjectParams Create project

All responses

Code Status Description Has headers Schema
200 OK OK schema
400 Bad Request Bad Request schema

Responses

200 - OK

Status: OK

Schema

PostProjectsOKBody

400 - Bad Request

Status: Bad Request

Schema

UtilErrorResponse

Inlined models

PostProjectsOKBody

Properties

Name Type Go type Required Default Description Example
data DatabaseProject models.DatabaseProject

Create a new job (PostProjectsProjectIDJobs)

POST /projects/{project_id}/jobs

Create a new job with the input payload

Consumes

  • application/json

Produces

  • application/json

Parameters

Name Source Type Go type Separator Required Default Description
project_id path integer int64 Project ID
Job body DatabaseCreateJobParams models.DatabaseCreateJobParams Job object

All responses

Code Status Description Has headers Schema
200 OK OK schema
400 Bad Request Bad Request schema

Responses

200 - OK

Status: OK

Schema

PostProjectsProjectIDJobsOKBody

400 - Bad Request

Status: Bad Request

Schema

UtilErrorResponse

Inlined models

PostProjectsProjectIDJobsOKBody

Properties

Name Type Go type Required Default Description Example
data DatabaseJob models.DatabaseJob

Schedule the tasks (PostProjectsProjectIDSchedule)

POST /projects/{project_id}/schedule

Schedule the tasks present in a project, deleting any previous schedule and return the new schedule.

When fresh = true, the old schedule is ignored and a fresh schedule is created. Otherwise, the old schedule of each task is altered such that it remains in the "max_shift" interval. Default value is false. For JSON content type: When overview = true, only the metadata is returned. Default value is false, which also returns the summary object.

Consumes

  • application/json

Produces

  • application/json

Parameters

Name Source Type Go type Separator Required Default Description
project_id path integer int64 Project ID
fresh query boolean bool Fresh
overview query boolean bool Overview

All responses

Code Status Description Has headers Schema
201 Created Created schema
400 Bad Request Bad Request schema

Responses

201 - Created

Status: Created

Schema

PostProjectsProjectIDScheduleCreatedBody

400 - Bad Request

Status: Bad Request

Schema

UtilErrorResponse

Inlined models

PostProjectsProjectIDScheduleCreatedBody

  • composed type UtilSuccessResponse
  • inlined member (postProjectsProjectIdScheduleCreatedBodyAO1)

Properties

Name Type Go type Required Default Description Example
data UtilScheduleData models.UtilScheduleData

Create a new shipment (PostProjectsProjectIDShipments)

POST /projects/{project_id}/shipments

Create a new shipment with the input payload

Consumes

  • application/json

Produces

  • application/json

Parameters

Name Source Type Go type Separator Required Default Description
project_id path integer int64 Project ID
Shipment body DatabaseCreateShipmentParams models.DatabaseCreateShipmentParams Create shipment

All responses

Code Status Description Has headers Schema
200 OK OK schema
400 Bad Request Bad Request schema

Responses

200 - OK

Status: OK

Schema

PostProjectsProjectIDShipmentsOKBody

400 - Bad Request

Status: Bad Request

Schema

UtilErrorResponse

Inlined models

PostProjectsProjectIDShipmentsOKBody

Properties

Name Type Go type Required Default Description Example
data DatabaseShipment models.DatabaseShipment

Create a new vehicle (PostProjectsProjectIDVehicles)

POST /projects/{project_id}/vehicles

Create a new vehicle with the input payload

Consumes

  • application/json

Produces

  • application/json

Parameters

Name Source Type Go type Separator Required Default Description
project_id path integer int64 Project ID
Vehicle body DatabaseCreateVehicleParams models.DatabaseCreateVehicleParams Create vehicle

All responses

Code Status Description Has headers Schema
200 OK OK schema
400 Bad Request Bad Request schema

Responses

200 - OK

Status: OK

Schema

PostProjectsProjectIDVehiclesOKBody

400 - Bad Request

Status: Bad Request

Schema

UtilErrorResponse

Inlined models

PostProjectsProjectIDVehiclesOKBody

Properties

Name Type Go type Required Default Description Example
data DatabaseVehicle models.DatabaseVehicle

Create a new break (PostVehiclesVehicleIDBreaks)

POST /vehicles/{vehicle_id}/breaks

Create a new break with the input payload

Consumes

  • application/json

Produces

  • application/json

Parameters

Name Source Type Go type Separator Required Default Description
vehicle_id path integer int64 Vehicle ID
Break body DatabaseCreateBreakParams models.DatabaseCreateBreakParams Create break

All responses

Code Status Description Has headers Schema
200 OK OK schema
400 Bad Request Bad Request schema

Responses

200 - OK

Status: OK

Schema

PostVehiclesVehicleIDBreaksOKBody

400 - Bad Request

Status: Bad Request

Schema

UtilErrorResponse

Inlined models

PostVehiclesVehicleIDBreaksOKBody

Properties

Name Type Go type Required Default Description Example
data DatabaseBreak models.DatabaseBreak

Models

database.Break

Properties

Name Type Go type Required Default Description Example
created_at string string 2021-12-01T13:00:00
data map of string map[string]string {"key1":"value1","key2":"value2"}
id string string 1234567812345678
service string string 00:02:00
time_windows [][]string [][]string
updated_at string string 2021-12-01T13:00:00
vehicle_id string string 1234567812345678

database.CreateBreakParams

Properties

Name Type Go type Required Default Description Example
data map of string map[string]string {"key1":"value1","key2":"value2"}
service string string 00:02:00
time_windows [][]string [][]string

database.CreateJobParams

Properties

Name Type Go type Required Default Description Example
data map of string map[string]string {"key1":"value1","key2":"value2"}
delivery []integer []int64 [10,20]
location UtilLocationParams UtilLocationParams
pickup []integer []int64 [5,15]
priority integer int64 10
service string string 00:02:00
setup string string 00:00:00
skills []integer []int64 [1,5]
time_windows [][]string [][]string

database.CreateProjectParams

Properties

Name Type Go type Required Default Description Example
data map of string map[string]string {"key1":"value1","key2":"value2"}
duration_calc string string euclidean
exploration_level integer int64 5
max_shift string string 00:30:00
name string string Sample Project
timeout string string 00:10:00

database.CreateShipmentParams

Properties

Name Type Go type Required Default Description Example
amount []integer []int64 [5,15]
d_data map of string map[string]string {"key1":"value1","key2":"value2"}
d_location UtilLocationParams UtilLocationParams
d_service string string 00:02:00
d_setup string string 00:00:00
d_time_windows [][]string [][]string
p_data map of string map[string]string {"key1":"value1","key2":"value2"}
p_location UtilLocationParams UtilLocationParams
p_service string string 00:02:00
p_setup string string 00:00:00
p_time_windows [][]string [][]string
priority integer int64 10
skills []integer []int64 [1,5]

database.CreateVehicleParams

Properties

Name Type Go type Required Default Description Example
capacity []integer []int64 [50,25]
data map of string map[string]string {"key1":"value1","key2":"value2"}
end_location UtilLocationParams UtilLocationParams
max_tasks integer int64 20
skills []integer []int64 [1,5]
speed_factor number float64 1
start_location UtilLocationParams UtilLocationParams
tw_close string string 2021-12-31T23:59:00
tw_open string string 2021-12-31T23:00:00

database.Job

Properties

Name Type Go type Required Default Description Example
created_at string string 2021-12-01T13:00:00
data map of string map[string]string {"key1":"value1","key2":"value2"}
delivery []integer []int64 [10,20]
id string string 1234567812345678
location UtilLocationParams UtilLocationParams
pickup []integer []int64 [5,15]
priority integer int64 10
project_id string string 1234567812345678
service string string 00:02:00
setup string string 00:00:00
skills []integer []int64 [1,5]
time_windows [][]string [][]string
updated_at string string 2021-12-01T13:00:00

database.Project

Properties

Name Type Go type Required Default Description Example
created_at string string 2021-12-01T13:00:00
data map of string map[string]string {"key1":"value1","key2":"value2"}
duration_calc string string euclidean
exploration_level integer int64 5
id string string 1234567812345678
max_shift string string 00:30:00
name string string Sample Project
timeout string string 00:10:00
updated_at string string 2021-12-01T13:00:00

database.Shipment

Properties

Name Type Go type Required Default Description Example
amount []integer []int64 [5,15]
created_at string string 2021-12-01T13:00:00
d_data map of string map[string]string {"key1":"value1","key2":"value2"}
d_location UtilLocationParams UtilLocationParams
d_service string string 00:02:00
d_setup string string 00:00:00
d_time_windows [][]string [][]string
id string string 1234567812345678
p_data map of string map[string]string {"key1":"value1","key2":"value2"}
p_location UtilLocationParams UtilLocationParams
p_service string string 00:02:00
p_setup string string 00:00:00
p_time_windows [][]string [][]string
priority integer int64 10
project_id string string 1234567812345678
skills []integer []int64 [1,5]
updated_at string string 2021-12-01T13:00:00

database.UpdateJobParams

Properties

Name Type Go type Required Default Description Example
data map of string map[string]string {"key1":"value1","key2":"value2"}
delivery []integer []int64 [10,20]
location UtilLocationParams UtilLocationParams
pickup []integer []int64 [5,15]
priority integer int64 10
service string string 00:02:00
setup string string 00:00:00
skills []integer []int64 [1,5]
time_windows [][]string [][]string

database.UpdateShipmentParams

Properties

Name Type Go type Required Default Description Example
amount []integer []int64 [5,15]
d_data map of string map[string]string {"key1":"value1","key2":"value2"}
d_location UtilLocationParams UtilLocationParams
d_service string string 00:02:00
d_setup string string 00:00:00
d_time_windows [][]string [][]string
p_data map of string map[string]string {"key1":"value1","key2":"value2"}
p_location UtilLocationParams UtilLocationParams
p_service string string 00:02:00
p_setup string string 00:00:00
p_time_windows [][]string [][]string
priority integer int64 10
skills []integer []int64 [1,5]

database.UpdateVehicleParams

Properties

Name Type Go type Required Default Description Example
capacity []integer []int64 [50,25]
data map of string map[string]string {"key1":"value1","key2":"value2"}
end_location UtilLocationParams UtilLocationParams
max_tasks integer int64 20
skills []integer []int64 [1,5]
speed_factor number float64 1
start_location UtilLocationParams UtilLocationParams
tw_close string string 2021-12-31T23:59:00
tw_open string string 2021-12-31T23:00:00

database.Vehicle

Properties

Name Type Go type Required Default Description Example
capacity []integer []int64 [50,25]
created_at string string 2021-12-01T13:00:00
data map of string map[string]string {"key1":"value1","key2":"value2"}
end_location UtilLocationParams UtilLocationParams
id string string 1234567812345678
max_tasks integer int64 20
project_id string string 1234567812345678
skills []integer []int64 [1,5]
speed_factor number float64 1
start_location UtilLocationParams UtilLocationParams
tw_close string string 2021-12-31T23:59:00
tw_open string string 2021-12-31T23:00:00
updated_at string string 2021-12-01T13:00:00

util.ErrorResponse

Properties

Name Type Go type Required Default Description Example
code string string 400
errors []string []string ["Error message1","Error message2"]
message string string Bad Request

util.LocationParams

Properties

Name Type Go type Required Default Description Example
latitude number float64 2.0365
longitude number float64 48.6113

util.MetadataResponse

Properties

Name Type Go type Required Default Description Example
summary []UtilScheduleSummary []*UtilScheduleSummary
total_service string string 00:10:00
total_setup string string 00:05:00
total_travel string string 01:00:00
total_waiting string string 00:30:00
unassigned []UtilScheduleUnassigned []*UtilScheduleUnassigned

util.NotFound

Properties

Name Type Go type Required Default Description Example
code string string 404
error string string Not Found

util.ScheduleDB

Properties

Name Type Go type Required Default Description Example
arrival string string 2021-12-01T13:00:00
created_at string string 2021-12-01T13:00:00
departure string string 2021-12-01T13:00:00
load []integer []int64 [0,0]
location UtilLocationParams UtilLocationParams
project_id string string 1234567812345678
service_time string string 00:02:00
setup_time string string 00:00:00
task_data map of string map[string]string {"key1":"value1","key2":"value2"}
task_id string string 1234567812345678
travel_time string string 00:16:40
type string string job
updated_at string string 2021-12-01T13:00:00
vehicle_data map of string map[string]string {"key1":"value1","key2":"value2"}
vehicle_id string string 1234567812345678
waiting_time string string 00:00:00

util.ScheduleData

Properties

Name Type Go type Required Default Description Example
metadata UtilMetadataResponse UtilMetadataResponse
project_id string string 1234567812345678
schedule []UtilScheduleResponse []*UtilScheduleResponse

util.ScheduleDataTask

Properties

Name Type Go type Required Default Description Example
project_id string string 1234567812345678
schedule []UtilScheduleResponse []*UtilScheduleResponse

util.ScheduleResponse

Properties

Name Type Go type Required Default Description Example
route []UtilScheduleRoute []*UtilScheduleRoute
vehicle_data map of string map[string]string {"key1":"value1","key2":"value2"}
vehicle_id string string 0

util.ScheduleRoute

Properties

Name Type Go type Required Default Description Example
arrival string string 2021-12-01T13:00:00
created_at string string 2021-12-01T13:00:00
departure string string 2021-12-01T13:00:00
load []integer []int64 [0,0]
location UtilLocationParams UtilLocationParams
service_time string string 00:02:00
setup_time string string 00:00:00
task_data map of string map[string]string {"key1":"value1","key2":"value2"}
task_id string string 1234567812345678
travel_time string string 00:16:40
type string string job
updated_at string string 2021-12-01T13:00:00
waiting_time string string 00:00:00

util.ScheduleSummary

Properties

Name Type Go type Required Default Description Example
service_time string string 00:02:00
setup_time string string 00:00:00
travel_time string string 00:16:40
vehicle_data map of string map[string]string {"key1":"value1","key2":"value2"}
vehicle_id string string 1234567812345678
waiting_time string string 00:00:00

util.ScheduleUnassigned

Properties

Name Type Go type Required Default Description Example
location UtilLocationParams UtilLocationParams
task_data map of string map[string]string {"key1":"value1","key2":"value2"}
task_id string string 1234567812345678
type string string job

util.Success

Properties

Name Type Go type Required Default Description Example
code string string 200
message string string OK

util.SuccessResponse

Properties

Name Type Go type Required Default Description Example
code string string 200
data interface{} interface{}
message string string OK