### GET clients example response Source: https://documentation.simpliroute.com/ Example response from the GET /v1/accounts/clients/ endpoint. Contains client fields such as id, key, title, address, coordinates, load values, time windows, duration, contact info, notes, and priority level. Use the id to generate visits. ```json [{ "id": 68156, "key": "123456", "title": "Cliente Ejemplo", "address": "Pedro Montt 2245, Valparaíso, V Región", "latitude": "-33.464115", "longitude": "-70.652859", "load": 4.0, "load_2": 2.0, "load_3": 1.0, "window_start": "09:00:00", "window_end": "17:00:00", "window_start_2": null, "window_end_2": null, "duration": "00:00:00", "contact_name": "", "contact_phone": "", "contact_email": "cliente2@email.com", "notes": "Notas de Texto", "priority_level": null } ] ``` -------------------------------- ### Webhook route started example payload Source: https://documentation.simpliroute.com/ Example payload sent by SimpliRoute when a route is started. The webhook uses POST with customer-specified headers and expects a 200 response; SimpliRoute retries up to 3 times over 120 seconds. Fields include vehicle, plan, timestamp, route_start, route_end, planned_date, visit_ids, info_visits, driver, and id. ```json { "vehicle": { "id": 101174, "name": "KGST" }, "plan": { "id": "728c5d34-ff14-4ccf-9fd8-16257f4332e9", "name": "26-05-2020 21:37:25" }, "timestamp": "2020-05-27 20:43:40.650476", "route_start": { "lat": "-33.459425", "start_time": "2020-05-27 16:35:00+00:00", "estimated_time_start": "09:00:00", "lon": "-70.654531", "address": "Aldunate 1047, Santiago, Región Metropolitana, Chile" }, "route_end": { "lat": "-33.459425", "lon": "-70.654531", "end_time": null, "estimated_time_end": "09:15:00", "address": "Aldunate 1047, Santiago, Región Metropolitana, Chile" }, "planned_date": "2020-05-26", "visit_ids": [ 32397185 ], "info_visits": [ { "id": 32397185, "reference": "", "tracking_id": "SR88515397622033", "order": 1, "estimated_time_arrival": "09:42:00", "notes": "notes", "extra_field_values": { "my_key": "my_value" } }, ], "driver": { "id": 26351, "name": "Flash" }, "id": "e1d12cf7-25c6-4f01-98d5-83a52c9b3aed" } ``` -------------------------------- ### Get Route Properties - Example Response Source: https://documentation.simpliroute.com/ Example response for the GET /v1/routes/routes-properties/{{ROUTE_ID}} endpoint. Shows the route UUID, color, and is_start_blocked properties. ```json { "route": "3d20088b-02b8-456b-80f9-ecfa8dbf27d6", "color": "#0000FF", "is_start_blocked": false } ``` -------------------------------- ### POST Webhook Route started Source: https://documentation.simpliroute.com/ Documentation for the webhook sent by SimpliRoute when a route is started. It includes the payload structure and expected response. ```APIDOC ## POST Webhook Route started ### Description SimpliRoute sends a webhook notification when a route is started. The webhook is sent using the POST method with headers that can be specified by the customer. The webhook expects a response with status code 200, and will retry 3 times up to 120 seconds. ### Method POST ### Endpoint Webhook URL (customer-specified) ### Headers - **Custom headers** (string) - Optional - Headers specified by the customer. ### Request Body - **vehicle** (object) - Required - Vehicle information. - **id** (int) - Vehicle ID. - **name** (string) - Vehicle name. - **plan** (object) - Required - Plan information. - **id** (string) - Plan ID. - **name** (string) - Plan name. - **timestamp** (timestamp) - Required - UTC timestamp of the creation of the route. - **route_start** (object) - Required - Route start information. - **lat** (float) - Latitude. - **lon** (float) - Longitude. - **start_time** (time) - Time the driver started the route (null at this point). - **estimated_time_start** (time) - Estimated start time. - **address** (string) - Address. - **route_end** (object) - Required - Route end information. - **lat** (float) - Latitude. - **lon** (float) - Longitude. - **end_time** (time) - End time (null if not ended). - **estimated_time_end** (time) - Estimated end time. - **address** (string) - Address. - **planned_date** (date) - Required - Date for the route in format YYYY-MM-DD. - **visit_ids** (array of int) - Required - List of visit IDs in the route. - **info_visits** (array of objects) - Required - Visit information. - **id** (int) - Visit ID. - **reference** (string) - Reference. - **tracking_id** (string) - Tracking ID. - **order** (int) - Order. - **estimated_time_arrival** (time) - Estimated time of arrival. - **notes** (string) - Notes. - **extra_field_values** (object) - Extra field values. - **driver** (object) - Required - Driver information. - **id** (int) - Driver ID. - **name** (string) - Driver name. - **id** (string) - Required - Route ID. ### Request Example ```json { "vehicle": { "id": 101174, "name": "KGST" }, "plan": { "id": "728c5d34-ff14-4ccf-9fd8-16257f4332e9", "name": "26-05-2020 21:37:25" }, "timestamp": "2020-05-27 20:43:40.650476", "route_start": { "lat": "-33.459425", "start_time": "2020-05-27 16:35:00+00:00", "estimated_time_start": "09:00:00", "lon": "-70.654531", "address": "Aldunate 1047, Santiago, Región Metropolitana, Chile" }, "route_end": { "lat": "-33.459425", "lon": "-70.654531", "end_time": null, "estimated_time_end": "09:15:00", "address": "Aldunate 1047, Santiago, Región Metropolitana, Chile" }, "planned_date": "2020-05-26", "visit_ids": [ 32397185 ], "info_visits": [ { "id": 32397185, "reference": "", "tracking_id": "SR88515397622033", "order": 1, "estimated_time_arrival": "09:42:00", "notes": "notes", "extra_field_values": { "my_key": "my_value" } } ], "driver": { "id": 26351, "name": "Flash" }, "id": "e1d12cf7-25c6-4f01-98d5-83a52c9b3aed" } ``` ### Response #### Success Response (200) - **status** (int) - Expected status code 200. #### Response Example ``` 200 OK ``` ### Error Handling - **Retries** - The webhook will retry 3 times up to 120 seconds if a non-200 response is received. ``` -------------------------------- ### Create Route Properties - Example Request Source: https://documentation.simpliroute.com/ Example request body for the POST /v1/routes/routes-properties/ endpoint. If properties for the route already exist, an error response is returned. ```json { "route": "3d20088b-02b8-456b-80f9-ecfa8dbf27d6", "color": null, "is_start_blocked": false } ``` -------------------------------- ### GET /v1/zones/ - Example response Source: https://documentation.simpliroute.com/ Example response from the GET /v1/zones/ endpoint, showing a zone object with id, name, coordinates, vehicles, enabled, and schedules fields. The Zones module allows defining custom zones on the map, which can be assigned to specific vehicles. If the module is not enabled, contact support. ```json [ { "id": 67664, "name": "ZONA-TEST2", "coordinates": [ { "lat": "-12.105433", "lng": "-77.017408" }, { "lat": "-12.099576", "lng": "-77.017308" }, { "lat": "-12.094063", "lng": "-77.012727" }, { "lat": "-12.099921", "lng": "-77.004068" }, { "lat": "-12.105433", "lng": "-77.017056" } ], "vehicles": [ 28202 ], "enabled": true, "schedules": [ "Monday", "Saturday", "Thursday", "Friday", "Tuesday", "Sunday", "Wednesday" ] } ] ``` -------------------------------- ### Start route with ROUTE_STARTED event Source: https://documentation.simpliroute.com/ Starts a route by sending a POST request to /v1/events/register/ with the ROUTE_STARTED event. Requires a valid token and route_id; date_time must follow ISO 8601. ```bash curl --location --request POST 'https://api.simpliroute.com/v1/events/register/' \ --header 'Authorization: Token ' \ --header 'Content-Type: application/json' \ --data-raw '{ "date_time": "2024-04-24T14:20:45.446Z", "latitude": "-0.346644", "longitude": "-78.455834", "route_id": "24b87d96-813e-4176-a85b-d72171160000", "type": "ROUTE_STARTED" }' ``` -------------------------------- ### Input example for sending alerts Source: https://documentation.simpliroute.com/ Input example for sending alerts with additional variables. The array of objects must include fields like name, type, value, and message. The example shows a door alert and a general temperature alert. ```json [ { "latitude": -33.4311548, "longitude": -70.5701852, "timestamp": "2017-10-19 09:12:02-00", "vehicleId": "<>", "temperature": { "value": 2.4, "alert_type": null, "alert_message": null }, "alert": { "name": "door", "type": "open", "value": true, "message": "open door alert" }, "alerts": [ { "name": "general", "type": "ºC", "value": 4, "message": "temperature is lower than 5 degress" }, ], "providerName": "<>" }] ``` -------------------------------- ### Reading a full date - paginated visits Source: https://documentation.simpliroute.com/ This example shows how to read all pages of a date by following the 'next' URL from the response. Start with the first page, then request the 'next' URL until it returns null. ```bash # 1. Ask for the first page. curl -X GET \ 'https://api.simpliroute.com/v1/routes/visits/paginated/?planned_date=2020-01-01&page_size=500' \ -H 'authorization: Token {{TokenSR}}' \ -H 'content-type: application/json' # 2. The response carries "next". Request it as is. curl -X GET \ 'https://api.simpliroute.com/v1/routes/visits/paginated/?planned_date=2020-01-01&page=2&page_size=500' \ -H 'authorization: Token {{TokenSR}}' \ -H 'content-type: application/json' # 3. Repeat until "next" comes back null. That was the last page. ``` -------------------------------- ### Example Response - List of Visits by Route Source: https://documentation.simpliroute.com/ Example response for the visits list endpoint. Shows visit details including status, address, coordinates, and estimated arrival time. ```json [ { "status": "failed", "plan_id": "f61cd65a-075e-454f-a080-d2c573d2be3e", "reference": "", "title": "STARK INDUSTRIES", "checkout_time": "2017-03-13T20:17:20Z", "longitude": "-70.651066", "id": 89274, "route_id": "e708c5ba-6d49-4418-b87e-9061e1194b1b", "address": "HUERFANOS 1011, SANTIAGO, Santiago", "latitude": "-33.439626", "estimated_time_arrival": "09:28:00", "order": 2 }, { "status": "completed", "plan_id": "f61cd65a-075e-454f-a080-d2c573d2be3e", "reference": "", "title": "PELUQUERIA DI GIANCARLO", "checkout_time": "2017-03-13T20:17:11Z", "longitude": "-70.659729", "id": 89273, "route_id": "2d3ced6c-70e4-414e-8313-d5abe9166a15", "address": "FANOR VELASCO 85, SANTIAGO, Santiago", "latitude": "-33.442880", "estimated_time_arrival": "09:05:00", "order": 1 } ] ``` -------------------------------- ### POST /v1/events/register/ Source: https://documentation.simpliroute.com/ Registers a route start event, allowing the system to recognize the start time of the route and update visit's ETA accordingly. ```APIDOC ## POST /v1/events/register/ ### Description Registers a route start event, allowing the system to recognize the start time of the route and update visit's ETA accordingly. ### Method POST ### Endpoint /v1/events/register/ ### Parameters #### Request Body - **date_time** (string) - Required - Date and hour of start following the ISO 8601 standard. - **latitude** (string) - Optional - Latitude at the point of route start. - **longitude** (string) - Optional - Longitude at the point of route start. - **route_id** (string) - Required - Identifier of the route to start. - **type** (string) - Required - Indicates the event, for this case value must be `ROUTE_STARTED`. ### Request Example ``` curl --location --request POST 'https://api.simpliroute.com/v1/events/register/' \ --header 'Authorization: Token ' \ --header 'Content-Type: application/json' \ --data-raw '{ "date_time": "2024-04-24T14:20:45.446Z", "latitude": "-0.346644", "longitude": "-78.455834", "route_id": "24b87d96-813e-4176-a85b-d72171160000", "type": "ROUTE_STARTED" }' ``` ``` -------------------------------- ### Example Response - List of Vehicles with Routes Source: https://documentation.simpliroute.com/ Example response for the vehicles list endpoint. Shows a vehicle with its driver, color, and an array of routes, each identified by a UUID. ```json [ { "color": "#FFCC33", "routes": [ { "plan_id": "f61cd65a-075e-454f-a080-d2c573d2be3e", "id": "e708c5ba-6d49-4418-b87e-9061e1194b1b" } ], "driver":{ "id": 742, "name": "Conductor Demo" }, "name": "Mi auto", "id": 287 } ] ``` -------------------------------- ### Example response for list sellers Source: https://documentation.simpliroute.com/ Example response for the list sellers endpoint. Shows the structure of a seller object with fields like id, name, alias, language, account, and is_deleted. ```json [ { "id": "c25f7a0b-0f54-45da-822e-fba4fd91340c", "name": "Seller Name", "alias": "mr. seller", "language": "es", "account": 0123, "is_deleted": false } ] ``` -------------------------------- ### Create User - Example Body Source: https://documentation.simpliroute.com/ Request body for creating a new user. Requires username, name, phone, email, is_admin, password, and is_driver fields. ```json [{ "username": "testtest2", "name": "Conductor 1", "phone": "", "email": "", "is_admin": false, "password": "driver", "is_driver": true }] ``` -------------------------------- ### Get a Determine User - Example Response Source: https://documentation.simpliroute.com/ Response for getting a specific user by ID. Returns the user object matching the provided user_id. ```json [{"id": 203, "username": "driver33", "name": "Driver 3", "phone": "", "email": "", "is_owner": false, "is_admin": false, "is_driver": true, "old_id": 1979, "created": "2016-08-01T20:23:31.966307Z", "modified": "2016-08-01T20:23:32.158526Z", "last_login": null }] ``` -------------------------------- ### Create User - Example Response Source: https://documentation.simpliroute.com/ Response after creating a user. Returns the created user object with additional role flags and timestamps. ```json [{ "id": 40779, "username": "testtest2", "name": "Conductor 1", "phone": "", "email": "", "is_owner": false, "is_admin": false, "is_driver": true, "is_router_jr": false, "is_monitor": false, "is_coordinator": false, "is_router": false, "is_staff": false, "old_id": null, "created": "2020-03-19T19:13:45.178268Z", "modified": "2020-03-19T19:13:45.223900Z", "last_login": null }] ``` -------------------------------- ### Create plan response Source: https://documentation.simpliroute.com/ Example response from POST /v1/plans/create-plan/. Returns the created plan with its id, name, dates, reset_day, created and modified timestamps, is_cluster flag, and an array of route ids. ```json { "id": "4363095e-8d7c-46d0-9a14-8c895c37fa88", "name": "Plan created through API 2022-09-02 12:55:18", "start_date": "2022-09-02", "end_date": "2022-09-02", "reset_day": 1, "created": "2022-09-02T06:51:24.937690Z", "modified": "2022-09-02T06:51:24.937690Z", "is_cluster": false, "routes": [ "349cd8a2-5149-4732-b46f-1073fb90ea07" ], "plan_metadata": null, "start_time": null, "end_time": null } ``` -------------------------------- ### GET /v1/routes/vehicles/ Source: https://documentation.simpliroute.com/ Documentation for the List Vehicle endpoint, including query parameters and response examples. ```APIDOC ## GET /v1/routes/vehicles/ ### Description Lists all vehicles in the routing system. Optionally includes extra properties for each vehicle. ### Method GET ### Endpoint /v1/routes/vehicles/ ### Parameters #### Query Parameters - **include_extra_properties** (Boolean) - Optional. Default: `false`. If `true`, includes the `extra_properties` field in the response for each vehicle. ### Response #### Success Response (200) Returns an array of vehicle objects. Each vehicle object contains the following fields: - **id** (integer) - Vehicle identifier. - **name** (string) - Vehicle name. - **shift_start** (string/null) - Start time of the shift. - **shift_end** (string/null) - End time of the shift. - **capacity** (number) - Primary capacity. - **capacity_2** (number) - Secondary capacity. - **capacity_3** (number) - Tertiary capacity. - **default_driver** (string/null) - Default driver identifier. - **location_start_address** (string) - Starting location address. - **location_start_latitude** (string) - Starting location latitude. - **location_start_longitude** (string) - Starting location longitude. - **location_end_address** (string) - Ending location address. - **location_end_latitude** (string) - Ending location latitude. - **location_end_longitude** (string) - Ending location longitude. - **skills** (array) - List of skills. - **created** (string) - Creation timestamp. - **modified** (string) - Last modification timestamp. - **color** (string) - Color associated with the vehicle. - **reference_id** (string) - Reference identifier. - **license_plate** (string) - License plate number. - **cost** (number/null) - Cost associated with the vehicle. - **min_load** (number) - Minimum load. - **min_load_2** (number) - Secondary minimum load. - **min_load_3** (number) - Tertiary minimum load. - **max_visit** (number/null) - Maximum number of visits. - **rest_time_start** (string/null) - Rest time start. - **rest_time_end** (string/null) - Rest time end. - **rest_time_duration** (string/null) - Rest time duration. - **deleted** (boolean) - Whether the vehicle is deleted. - **max_time** (string/null) - Maximum time. - **codrivers** (array) - List of co-drivers. - **status** (string) - Vehicle status. - **extra_properties** (object) - Present only when `include_extra_properties=true`. Contains additional vehicle properties. #### Response Example (without extra_properties) ```json [{ "id": 487294, "name": "Camión-1", "shift_start": null, "shift_end": null, "capacity": 1000.0, "capacity_2": 1.0, "capacity_3": 1.0, "default_driver": null, "location_start_address": "1 Calle A, Guatemala City, Guatemala", "location_start_latitude": "14.582131", "location_start_longitude": "-90.487034", "location_end_address": "1 Calle A, Guatemala City, Guatemala", "location_end_latitude": "14.582131", "location_end_longitude": "-90.487034", "skills": [], "created": "2024-06-26T16:28:39.193486Z", "modified": "2024-06-26T16:28:39.193486Z", "color": "#FF8C00", "reference_id": "12AB", "license_plate": "ABCD", "cost": null, "min_load": 0, "min_load_2": 0, "min_load_3": 0, "max_visit": null, "rest_time_start": null, "rest_time_end": null, "rest_time_duration": null, "deleted": false, "max_time": null, "codrivers": [], "status": "active" }] ``` #### Response Example (with `include_extra_properties=true`) ```json [{ "id": 487294, "name": "Camión-1", "shift_start": null, "shift_end": null, "capacity": 1000.0, "capacity_2": 1.0, "capacity_3": 1.0, "default_driver": null, "location_start_address": "1 Calle A, Guatemala City, Guatemala", "location_start_latitude": "14.582131", "location_start_longitude": "-90.487034", "location_end_address": "1 Calle A, Guatemala City, Guatemala", "location_end_latitude": "14.582131", "location_end_longitude": "-90.487034", "skills": [], "created": "2024-06-26T16:28:39.193486Z", "modified": "2024-06-26T16:28:39.193486Z", "color": "#FF8C00", "reference_id": "12AB", "license_plate": "ABCD", "cost": null, "min_load": 0, "min_load_2": 0, "min_load_3": 0, "max_visit": null, "rest_time_start": null, "rest_time_end": null, "rest_time_duration": null, "deleted": false, "max_time": null, "codrivers": [], "status": "active", "extra_properties": { "insurance_number": "INS-123", "maintenance_date": "2024-12-31", "color": "red" } }] ``` ``` -------------------------------- ### Create a Visit with Items - POST /v1/routes/visits/ Source: https://documentation.simpliroute.com/ POST request to /v1/routes/visits/ to create a visit with items. The minimum required fields are title, address, and planned_date; all other fields are optional. ```bash curl --location 'https://api.simpliroute.com/v1/routes/visits/' \ --header 'Content-Type: application/json' \ --header 'Authorization: Token {{TokenSR}}' \ --data '[ { "title": "SimpliRoute3", "address": "vespucio norte 22, las condes", "load": 39, "load_2": 100, "window_start": null, "window_end": null, "duration": "00:10:00", "contact_name": "", "contact_phone": "", "reference": "", "notes": "", "planned_date": "2016-06-30", "items": [ { "title": "Items Test 1", "load": 10, "load_2": 0.01, "load_3": null, "reference": "test_reference_1", "notes": "items note", "quantity_planned": 1 }, { "title": "Items Test 2", "load": 12, "load_2": 0.01, "load_3": null, "reference": "test_reference_2", "notes": "items note", "quantity_planned": 1 } ] } ]' ``` -------------------------------- ### GET /v1/routes/visits/{{visit_id}}/ Source: https://documentation.simpliroute.com/ This snippet documents the GET endpoint to retrieve a visit by its ID. It includes the endpoint path, required path parameter, authentication header, and an example response with the visit details. ```APIDOC ## GET /v1/routes/visits/{{visit_id}}/ ### Description Retrieves the details of an existing visit. Send the unique visit id and SimpliRoute API will return the corresponding visit information. ### Method GET ### Endpoint /v1/routes/visits/{{visit_id}}/ ### Parameters #### Path Parameters - **visit_id** (string) - Required - The unique identifier of the visit. ### Request Example ``` curl --location 'https://api.simpliroute.com/v1/routes/visits/{{visit_id}}/' \ --header 'Content-Type: application/json' \ --header 'Authorization: Token {{TokenSR}}' ``` ### Response #### Success Response (200) Returns an array containing the visit object with fields such as id, tracking_id, status, title, address, latitude, longitude, load, load_2, load_3, window_start, window_end, duration, contact_name, contact_phone, contact_email, reference, notes, skills_required, skills_optional, tags, planned_date, programmed_date, route, estimated_time_arrival, estimated_time_departure, checkin_time, checkout_time, checkout_latitude, checkout_longitude, checkout_comment, checkout_observation, signature, pictures, created, modified, eta_predicted, eta_current, priority, has_alert, priority_level, extra_field_values, geocode_alert, visit_type, current_eta, fleet, items, on_its_way. #### Response Example ``` [ { "id": 199285905, "order": null, "tracking_id": "SR17562640764438", "status": "pending", "title": "SimpliRoute3", "address": "vespucio norte 22, las condes", "latitude": "-33.413433", "longitude": "-70.585503", "load": 39.0, "load_2": 100.0, "load_3": 0.0, "window_start": null, "window_end": null, "window_start_2": null, "window_end_2": null, "duration": "00:00:10", "contact_name": "", "contact_phone": "", "contact_email": null, "reference": "", "notes": "", "skills_required": [], "skills_optional": [], "tags": [], "planned_date": "2016-06-30", "programmed_date": null, "route": null, "estimated_time_arrival": null, "estimated_time_departure": null, "checkin_time": null, "checkout_time": null, "checkout_latitude": null, "checkout_longitude": null, "checkout_comment": "", "checkout_observation": null, "signature": null, "pictures": [], "created": "2022-08-31T17:32:55.626342Z", "modified": "2022-08-31T17:32:55.626342Z", "eta_predicted": "2016-06-30T00:00:00-04:00", "eta_current": "2016-06-30T00:00:00-04:00", "priority": false, "has_alert": false, "priority_level": null, "extra_field_values": null, "geocode_alert": null, "visit_type": null, "current_eta": null, "fleet": null, "items": [ { "id": 211775, "title": "bar", "status": "pending", "load": 2.0, "load_2": 1.5, "load_3": 0.0, "reference": "bar", "visit": 199285905, "notes": "", "quantity_planned": 2.0, "quantity_delivered": 0.0 }, { "id": 211774, "title": "foo", "status": "pending", "load": 15.0, "load_2": 0.0, "load_3": 0.5, "reference": "foo", "visit": 199285905, "notes": "", "quantity_planned": 1.0, "quantity_delivered": 0.0 } ], "on_its_way": null } ] ``` ``` -------------------------------- ### Create Clients with POST /v1/accounts/clients/ Source: https://documentation.simpliroute.com/ Creates clients via POST to /v1/accounts/clients/. The request body is a JSON array of client objects with fields like key, title, address, coordinates, loads, time windows, duration, contact info, skills, and tags. The response echoes the created client with a server-assigned key and null/default values for unspecified fields. ```bash curl --location 'https://api.simpliroute.com/v1/accounts/clients/' \ --header 'Authorization: Token {{TokenSR}}' \ --header 'Content-Type: application/json' \ --data-raw '[ { "key": "8ede248f-8f2c-4f64-8f82-e25ec097f565", "title": "Torp, Lindgren and Bosco", "address": "8223 Langworth Creek", "latitude": -33.464115, "longitude": -70.652859, "load": 1, "load_2": 1, "load_3": 1, "window_start": null, "window_end": null, "window_start_2": null, "window_end_2": null, "duration": "00:00:10", "contact_name": "Dell", "contact_phone": "721-922-0694", "contact_email": "Melody37@example.org", "notes": "", "priority_level": null, "skills_required": [64915,64916,64917], "skills_optional": [64915,64916,64917], "tags": [3705] } ]' ``` ```json [ { "key": "123456", "title": "Coop Enargas", "address": "", "latitude": null, "longitude": null, "load": null, "load_2": 0.0, "load_3": 0.0, "window_start": null, "window_end": null, "window_start_2": null, "window_end_2": null, "duration": "00:00:00", "contact_name": null, "contact_phone": null, "contact_email": null, "notes": null, "priority_level": null, "skills_required": [ 30744, 47593 ], "skills_optional": [ 30567 ], "tags": [], } ] ``` -------------------------------- ### GET /v1/routes/tags/ with example response Source: https://documentation.simpliroute.com/ Retrieves the list of tags from the Simpliroute API. The response is a JSON array of tag objects, each with an id, label, and color. Tags are predefined labels for visits and must be set up by contacting Customer Success. ```bash curl --location 'https://api.simpliroute.com/v1/routes/tags/' \ --header 'Content-Type: application/json' \ --header 'Authorization: Token {{TokenSR}}' ``` ```json [ { "id": 4185, "label": "pickup", "color": "#472929" } ] ``` -------------------------------- ### GET /v1/addons/webhooks/ Source: https://documentation.simpliroute.com/ Lists all webhooks configured in your SimpliRoute account. ```APIDOC ## GET /v1/addons/webhooks/ ### Description Lists all webhooks configured in your SimpliRoute account. ### Method GET ### Endpoint /v1/addons/webhooks/ ### Request Example ``` curl --location 'https://api.simpliroute.com/v1/addons/webhooks/' \ --header 'Content-Type: application/json' \ --header 'Authorization: Token {{TokenSR}}' ``` ### Response #### Success Response (200) - **title** (string) - The title of the webhook configuration. - **key** (string) - The key of the webhook configuration. - **value** (string) - The value of the webhook configuration. - **description** (string) - Description of the webhook configuration. - **add_on_id** (integer) - The add-on ID associated with the webhook. #### Response Example ``` [ { "title": "plan_created_webhook_url webhook url", "key": "plan_created_webhook_url", "value": "https://estoesunwebhookdeprueba.com", "description": "plan_created_webhook_url webhook url Luis Bermudez SR Team", "add_on_id": 29950 }, { "title": "plan_created_webhook_headers webhook headers", "key": "plan_created_webhook_headers", "value": "{\"Content-Type\": \"application/json\", \"Authorization\": \"Token A203kdkGWXTY\"}", "description": "plan_created_webhook_headers webhook url Luis Bermudez SR Team", "add_on_id": 29950 } ] ``` ``` -------------------------------- ### GET /v1/routes/observations/ with example response Source: https://documentation.simpliroute.com/ Retrieves the list of observations from the Simpliroute API. The response is a JSON array of observation objects, each with an id, type (failed or completed), label, and timestamps. Observations are customizable reasons for completed or failed visits. ```bash curl --location 'https://api.simpliroute.com/v1/routes/observations/' \ --header 'Content-Type: application/json' \ --header 'Authorization: Token {{TokenSR}}' ``` ```json [ { "id": "0b776cb0-zed7-4376-8c6e-fa3db58fde6a", "type": "failed", "label": "Cliente ausente", "created": "2023-10-04T17:02:37.040148Z", "modified": "2023-10-04T17:02:37.040148Z" }, { "id": "0b776cb0-aed7-7376-8c6e-fa3db58fde6a", "type": "completed", "label": "Recibido conforme", "created": "2023-10-04T17:02:37.040148Z", "modified": "2023-10-04T17:02:37.040148Z" } ] ``` -------------------------------- ### Delete Webhook Example Response Source: https://documentation.simpliroute.com/ Example response from the delete webhook endpoint, confirming the deletion. ```json [ { "message": "The webhook was deleted" } ] ``` -------------------------------- ### GPS data input example Source: https://documentation.simpliroute.com/ Example input payload for GPS data sent to Simpliroute. Contains latitude, longitude, timestamp, vehicleId, and providerName fields. The trailing comma after the last field is present in the original example. ```json { "latitude":-33.4311548, "longitude":-70.5701852 , "timestamp":"2019-02-20 10:35:00-00", "vehicleId": "JKCT-81", "providerName": "LOCALIZAGPS_AGROSUPER", } ``` -------------------------------- ### Create Product with POST /v1/accounting/products/ Source: https://documentation.simpliroute.com/ Creates a new Product by sending a POST request to the /v1/accounting/products/ endpoint. The request body is a JSON array containing an object with title, sku, and category fields. Requires an authorization token. ```bash curl --location --request POST 'https://api.simpliroute.com/v1/accounting/products/' \ --header 'Authorization: Token ' \ --header 'Content-Type: application/json' \ --data-raw '[{ "title": "title", "sku": "13231323", "category": 1 }]' ``` -------------------------------- ### Retrieve Courier - Example Response Source: https://documentation.simpliroute.com/ Example response for the Retrieve Courier endpoint. Returns a single courier object with the same fields as the list response. Note that the example response has a missing comma after the 'reference' field, which is a syntax error in JSON. ```json { "id": 101, "trade_name": "Express Delivery", "legal_name": "Express Delivery S.A.", "contact_person": "Alice Smith", "contact_email": "alice@express.com,info@express.com", "phone_number": "+56911112222,+56933334444", "address": "123 Main St, Santiago", "tax_id_number": "12345678-9", "reference": "Main courier for region north" "provider_type": "courier" } ``` -------------------------------- ### List Users - Example Response Source: https://documentation.simpliroute.com/ Response for listing all users. Returns an array of user objects with fields such as id, username, name, phone, email, and role flags. ```json [{ "id": 114, "username": "user2", "name": "", "phone": "", "email": "", "is_owner": false, "is_admin": false, "is_driver": true, "old_id": 1477, "created": "2016-06-24T20:47:06.859895Z", "modified": "2016-06-30T20:04:51.043122Z", "last_login": null }, { "id": 24, "old_id": 930, "username": "test", "name": "Test", "phone": "", "email": "", "is_owner": false, "is_admin": false, "is_driver": true, "old_id": 1477, "created": "2016-06-24T20:47:06.859895Z", "modified": "2016-06-30T20:04:51.043122Z", "last_login": null }] ```