Introduction
Geoplanning Webservices is a RESTful service for interacting with Goeplanning entities. It allows to create, read, update and delete entities and other specific actions such as start, stop, reject, … an activity.
Overview
HTTP verbs
Geoplanning Webservices tries to adhere as closely as possible to standard HTTP and REST conventions in its use of HTTP verbs.
| Verb | Usage |
|---|---|
|
Used to retrieve a resource |
|
Used to create a new resource |
|
Used to update an existing resource, including partial updates |
|
Used to update an existing resource, full updates only |
|
Used to delete an existing resource |
HTTP status codes
Geoplanning Webservices tries to adhere as closely as possible to standard HTTP and REST conventions in its use of HTTP status codes.
| Status code | Usage |
|---|---|
|
Standard response for successful HTTP requests. The actual response will depend on the request method used. In a GET request, the response will contain an entity corresponding to the requested resource. In a POST request, the response will contain an entity describing or containing the result of the action. |
|
The request has been fulfilled and resulted in a new resource being created. |
|
The server successfully processed the request, but is not returning any content. |
|
The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing). |
|
The requested resource could not be found but may be available again in the future. Subsequent requests by the client are permissible. |
Authentication
Every request must be authenticated with Geoplanning allowed credentials. Currently, only Basic Authentication is supported. Basic authentication is performed through an Authorization header with a base64 encoded value.
Example for login "test" and password 123 :
| Header | Value |
|---|---|
|
|
To be allowed to use the Web Services, the user must be granted with at least the "webservices user" right.
Special headers
Every request sent to the API must come with the proper headers.
The API requires two mandatory headers which are Accept and Content-Type as follow :
| Header | Value |
|---|---|
|
|
|
|
Sending an address to Geoplanning
Submitting an address to Geoplanning can be tedious unless you know how it works.
Geoplanning needs 2 information about an address : it’s "administrative data" (country, post code, locality, street, number) and "geographic coordinates" (longitude, latitude). Providing only one, Geoplanning is able to compute the other but this comes with an accuracy issue.
If only the administrative data is provided, then Geoplanning will compute the coordinates of the closest address it finds with the provided data. This is called "geocoding". But, if either the input data is inaccurate/erroneous or our address database is incomplete the computed address might be different from the input address. In case of incomplete/erroneous input, this change is suitable and will correct the address, but in rare case it creates mistakes (when our database is incomplete). Therefore the geocoded address may be different from the input address and the created/updated entity at Geoplanning side may be different from what you submitted too.
If only the coordinates are provided, then Geoplanning will compute the administrative data of the closest address it finds to the provided coordinates. This is called "reverse geocoding". This process is efficient to get an approximative location of and address but not to get the exact administrative address of a location.
Long story short, if you can provide both administrative data and coordinates, do it. It will ensure that the imported data are exactly as provided, that is why the address structure is as follow :
Address structure
| Field | Type | Description |
|---|---|---|
|
|
Longitude coordinate of the address as decimal degree |
|
|
Latitude coordinate of the address as decimal degree |
|
|
Country code according the ISO-2 standard for country names |
|
|
Postal code of the address |
|
|
Locality name of the address |
|
|
Street name of the address |
|
|
House number in the street of the address |
You can provide only the first two (longitude and latitude) but if you provide one, you must provide the other.
You can provide only the last four (country, postcode, locality, number) but if you provide one, you must provide the others.
Resources
Activity
Getting an activity
A GET request will retrieve an activity
Request structure
By Geoplanning ID
| Parameter | Description |
|---|---|
|
Activity identifier |
By reference
| Parameter | Description |
|---|---|
|
Activity’s reference |
Example request
By Geoplanning ID
$ curl 'https://api.geoplanning.net/activity/1' -i -H 'Content-Type: application/vnd.geoplanning-v3.0+json;charset=UTF-8' -H 'Accept: application/vnd.geoplanning-v3.0+json;charset=UTF-8'
By reference
$ curl 'https://api.geoplanning.net/activity?fid=GP-1' -i -H 'Content-Type: application/vnd.geoplanning-v3.0+json;charset=UTF-8' -H 'Accept: application/vnd.geoplanning-v3.0+json;charset=UTF-8'
Response structure
| Path | Type | Description |
|---|---|---|
|
|
Status code of the api |
|
|
The recovered activity |
|
|
The instance name of the activity |
|
|
Activity’s Geoplanning ID |
|
|
Theoretical start date of the activity, computed by Geoplanning |
|
|
Theoretical end date of the activity, computed by Geoplanning |
|
|
Reference of the activity’s round |
|
|
Unique identifier for the round in Geoplanning |
|
|
Resource that performed the round |
|
|
Unique identifier for the resource in Geoplanning |
|
|
Reference from an external system |
|
|
Person that performed the round (when resource and person are not the same) |
|
|
Unique identifier for the person in Geoplanning |
|
|
Reference from an external system |
|
|
The status of the activity |
|
|
Status' Geoplanning ID |
|
|
Status' name |
|
|
Status' meta type |
|
|
Status' icon color |
|
|
The activity duration |
|
|
The creation date of the activity |
|
|
The activity name |
|
|
The activity address |
|
|
The address identifier |
|
|
The longitude of the address |
|
|
The latitude of the address |
|
|
The country of the address |
|
|
The postcode of the address |
|
|
The locality of the address |
|
|
The street of the address |
|
|
The number of the address |
Example response
HTTP/1.1 200 OK
Content-Type: application/vnd.geoplanning-v3.0+json;charset=UTF-8
Content-Length: 1358
{
"status" : {
"code" : 0
},
"activity" : {
"subtype" : "assignment",
"id" : 1,
"computedStartDate" : "2015-07-13T09:48:34.000Z",
"computedEndDate" : "2015-07-13T10:08:34.000Z",
"round" : {
"id" : 1,
"resource" : {
"id" : 1,
"foreignId" : "MIP"
},
"person" : {
"id" : 1,
"foreignId" : "P-456"
}
},
"status" : {
"id" : 1,
"name" : "Assigned",
"type" : "WORKING",
"color" : "#E9CC29",
"byDefault" : true
},
"task" : {
"id" : 1,
"name" : "Sprimont Jean-Paul",
"foreignId" : "GP-1",
"duration" : 1200,
"dueDate" : "2015-07-13T14:00:00.000Z",
"description" : "Pas de description",
"creationDate" : "2015-07-10T12:07:39.657Z",
"contact" : {
"phoneNumber" : "",
"mobileNumber" : "",
"mail" : ""
},
"address" : {
"id" : 1,
"longitude" : 4.84935390546997,
"latitude" : 50.4730325596768,
"country" : "BE",
"postcode" : "5002",
"locality" : "Saint-Servais",
"street" : "Rue de Gembloux",
"number" : "110"
},
"properties" : { },
"enumerables" : [ ],
"orders" : [ ],
"openingHours" : [ ]
}
}
}
Add activity
A POST request will create a new activity
Request structure
| Path | Type | Description | Constraints |
|---|---|---|---|
|
|
Discriminator for the type of activity imported 'assignment' : to create a new task |
only 'assignment' accepted. |
|
|
Activity’s type |
|
|
|
Type’s Reference ID |
Size must be between 0 and 20 inclusive |
|
|
Type’s name |
Must not be null. Size must be between 1 and 100 inclusive |
|
|
The task’s data |
Must not be null |
|
|
The task’s name |
Must not be null. Size must be between 1 and 100 inclusive |
|
|
The task’s reference |
|
|
|
The task’s duration (integer amount of minutes) |
Must not be null |
|
|
The task’s due date (timestamp) |
|
|
|
The task’s description |
Size must be between 1 and 400 inclusive |
|
|
The task’s contact data |
|
|
|
The contact’s phone number |
|
|
|
The contact’s mobile phone number |
|
|
|
The contact’s e-mail address |
|
|
|
The task’s address data - see Sending an address to Geoplanning |
Must not be null |
|
|
The task’s customer data |
|
|
|
The customer’s Geoplanning ID |
|
|
|
The task’s appointment data |
|
|
|
The appointment' start date (timestamp) |
Must not be null |
|
|
The appointment’s end date (timestamp) |
Must not be null |
|
|
The task’s array of enumerables |
|
|
|
Reference ID of the enumrable attribute |
Size must be between 0 and 20 inclusive |
|
|
Enumerable attribute’s name |
Must not be null |
|
|
Name of the enumerable attribute’s type |
The type must exist into Geoplanning. |
|
|
The task’s array of orders |
|
|
|
The foreignId of the order’s product |
Size must be between 0 and 50 inclusive |
|
|
The name of the order’s product |
Must not be null |
|
|
The unit of the order’s product amount No unit conversion performed. Always use the same unit with order of the same foreignId/name |
Must not be null |
|
|
The amount of order’s product |
Must not be null |
|
|
The task’s array of opening hours |
|
|
|
Opening hour’s day of week (value from 0 to 6, 0 = Monday) |
Must not be null |
|
|
Opening hour’s start time (as integer amount of minute from midnight. E.g.: 570 = 09:30 AM) |
Must not be null |
|
|
Opening hour’s end time (as integer amount of minute from midnight. E.g.: 1080 = 06:00 PM) |
Must not be null |
Example request
$ curl 'https://api.geoplanning.net/activity/' -i -X POST -H 'Content-Type: application/vnd.geoplanning-v3.0+json;charset=UTF-8' -H 'Accept: application/vnd.geoplanning-v3.0+json;charset=UTF-8' -d '{
"subtype" : "assignment",
"type" : {
"fid" : "Tp-814",
"name" : "repair-net"
},
"task" : {
"name" : "J. Doe",
"foreignId" : "GP-100",
"duration" : 120,
"dueDate" : 1472767140000,
"description" : "Internet not working, damaged cable",
"contact" : {
"phoneNumber" : "32 81/33.11.11",
"mobileNumber" : "0478 91 23 45",
"mail" : "info at market-ip.com"
},
"address" : {
"longitude" : 4.9259030858176,
"latitude" : 50.4279474396788,
"country" : "BE",
"postcode" : "5100",
"locality" : "Naninne",
"street" : "Chaussee de Marche",
"number" : "774"
},
"customer" : {
"id" : 78
},
"appointment" : {
"start" : 1472727600000,
"end" : 1472734800000
},
"orders" : [ {
"foreignId" : "RJ45-T568B-c6",
"name" : "Cable RJ45 categ. 6",
"unit" : "m",
"amount" : 15.6
} ],
"enumerables" : [ {
"foreignId" : "test-add",
"name" : "test",
"type" : "Category"
} ],
"openingHours" : [ {
"weekDay" : 0,
"from" : 540,
"to" : 1080
}, {
"weekDay" : 1,
"from" : 540,
"to" : 1080
}, {
"weekDay" : 2,
"from" : 540,
"to" : 1080
}, {
"weekDay" : 3,
"from" : 540,
"to" : 1080
}, {
"weekDay" : 4,
"from" : 540,
"to" : 1080
} ]
}
}'
Response structure
| Path | Type | Description |
|---|---|---|
|
|
Response status data |
|
|
Status code of the api |
|
|
Activity’s data |
|
|
Discriminator for the type of activity imported |
|
|
Geoplanning ID of the activity |
|
|
Assignment status of the activity |
|
|
Geoplanning ID of the status |
|
|
Reference code of the status |
|
|
Name of the status |
|
|
Meta type of the status |
|
|
Color of the status |
|
|
Whether the status is the default status for the meta type |
|
|
The activity type |
|
|
The type’s reference |
|
|
The type’s name |
|
|
The task’s data |
|
|
The task’s id |
|
|
The task’s name |
|
|
The task’s reference |
|
|
The task’s duration (integer amount of seconds) |
|
|
The task’s due date (timestamp) |
|
|
The task’s description |
|
|
The task’s contact data |
|
|
The contact’s phone number |
|
|
The contact’s mobile phone number |
|
|
The contact’s e-mail address |
|
|
The task’s address data |
|
|
The address' longitude (as decimal degree) |
|
|
The address' latitude (as decimal degree) |
|
|
The address' country |
|
|
The address' postcode |
|
|
The address' locality |
|
|
The address' street |
|
|
The address' house number |
|
|
The task’s customer reference |
|
|
The customer’s Geoplanning ID |
|
|
The task’s appointment data |
|
|
The appointment' start date (timestamp) |
|
|
The appointment’s end date (timestamp) |
|
|
The task’s array of orders |
|
|
The foreignId of the order’s product |
|
|
The name of the order’s product |
|
|
The unit of the order’s product amount |
|
|
The amount of order’s product |
|
|
The array of task’s opening hours |
|
|
opening hour’s day of week (value from 0 to 6, 0 = Monday) |
|
|
opening hour’s start time (as integer amount of minute from midnight. E.g.: 570 = 09:30 AM) |
|
|
opening hour’s end time (as integer amount of minute from midnight. E.g.: 1080 = 06:00 PM) |
Example response
HTTP/1.1 200 OK
Content-Type: application/vnd.geoplanning-v3.0+json;charset=UTF-8
Content-Length: 2858
{
"status" : {
"code" : 0
},
"activity" : {
"subtype" : "assignment",
"id" : 0,
"type" : {
"id" : 0,
"fid" : "Tp-814",
"name" : "repair-net",
"icon" : "default",
"fixedDuration" : false,
"metaType" : "NONE",
"resourceActivityType" : "ACTIVE_BUSINESS",
"roles" : [ ],
"targetActivityMask" : 5
},
"status" : {
"id" : 1,
"fid" : "ST-UNASGN01",
"name" : "Unassigned",
"type" : "UNASSIGNED",
"color" : "#000000",
"byDefault" : true
},
"task" : {
"id" : 0,
"name" : "J. Doe",
"foreignId" : "GP-100",
"duration" : 7200,
"dueDate" : "2016-09-01T21:59:00.000Z",
"description" : "Internet not working, damaged cable",
"creationDate" : "2024-03-20T09:47:57.864Z",
"contact" : {
"phoneNumber" : "32 81/33.11.11",
"mobileNumber" : "0478 91 23 45",
"mail" : "info at market-ip.com"
},
"address" : {
"id" : 2,
"longitude" : 4.9259030858176,
"latitude" : 50.4279474396788,
"country" : "BE",
"postcode" : "5100",
"locality" : "Naninne",
"street" : "Chaussee de Marche",
"number" : "774"
},
"customer" : {
"id" : 78,
"foreignId" : "CUST-78",
"name" : "Market-IP",
"address" : {
"id" : 1,
"longitude" : 4.84935390546997,
"latitude" : 50.4730325596768,
"country" : "BE",
"postcode" : "5002",
"locality" : "Saint-Servais",
"street" : "Rue de Gembloux",
"number" : "110"
},
"telephoneNumber" : "+32 81 33 11 11",
"email" : "info@market-ip.com"
},
"appointment" : {
"id" : 0,
"start" : "2016-09-01T11:00:00.000Z",
"end" : "2016-09-01T13:00:00.000Z"
},
"properties" : { },
"enumerables" : [ {
"id" : 0,
"foreignId" : "test-add",
"name" : "test",
"type" : "Category"
} ],
"orders" : [ {
"id" : 0,
"foreignId" : "RJ45-T568B-c6",
"name" : "Cable RJ45 categ. 6",
"unit" : "m",
"amount" : 15.6
} ],
"openingHours" : [ {
"id" : 0,
"weekDay" : 0,
"from" : 540,
"to" : 1080
}, {
"id" : 1,
"weekDay" : 2,
"from" : 540,
"to" : 1080
}, {
"id" : 2,
"weekDay" : 1,
"from" : 540,
"to" : 1080
}, {
"id" : 3,
"weekDay" : 3,
"from" : 540,
"to" : 1080
}, {
"id" : 4,
"weekDay" : 4,
"from" : 540,
"to" : 1080
} ]
}
}
}
Update activity
A PUT request will fully update the activity.
General rule : This is a full update, so any field that is not provided will bet set to blank except for arrays. Passing a null array will usually leave the property untouched, however providing an empty array will clear the field. There are 3 kinds of activity, only 2 currently support the update: "Tasks" and "Simple Activities". It’s the combination of the provided ID and body that determines the updated entity
Request structure
By Geoplanning ID
| Parameter | Description |
|---|---|
|
Activity identifier |
By reference
| Parameter | Description |
|---|---|
|
Activity’s reference |
Request payload structure
Task structure
| Path | Type | Description | Constraints |
|---|---|---|---|
|
|
Discriminator for the type of activity updated 'assignment' : to update a task 'simpleactivity': to update a simple activity 'route': to update a route |
|
|
|
The activity type |
|
|
|
The type’s reference |
Size must be between 0 and 20 inclusive |
|
|
The type’s name |
Must not be null. Size must be between 1 and 100 inclusive |
|
|
The task’s data |
|
|
|
The task’s name |
Must not be null. Size must be between 1 and 100 inclusive |
|
|
The task’s reference |
|
|
|
The task’s duration (integer amount of minutes minutes) |
Must not be null |
|
|
The task’s due date (timestamp) |
|
|
|
The task’s description |
Size must be between 1 and 400 inclusive |
|
|
The task’s contact data |
|
|
|
The contact’s phone number |
|
|
|
The contact’s mobile phone number |
|
|
|
The contact’s e-mail address |
|
|
|
The task’s address data - see 'Sending an address to Geoplanning' |
Must not be null |
|
|
The task’s customer reference |
|
|
|
The customer’s Geoplanning ID |
|
|
|
The task’s appointment data |
|
|
|
The appointment' start date (timestamp) |
Must not be null |
|
|
The appointment’s end date (timestamp) |
Must not be null |
|
|
The task’s array of orders |
|
|
|
The foreignId of the order’s product |
Size must be between 0 and 50 inclusive |
|
|
The name of the order’s product |
Must not be null |
|
|
The unit of the order’s product amount No unit conversion performed. Always use the same unit with order of the same foreignId/name |
Must not be null |
|
|
The amount of order’s product |
Must not be null |
|
|
The array of task’s opening hours |
|
|
|
opening hour’s day of week (value from 0 to 6, 0 = Monday) |
Must not be null |
|
|
opening hour’s start time (as integer amount of minute from midnight. E.g.: 570 = 09:30 AM) |
Must not be null |
|
|
opening hour’s end time (as integer amount of minute from midnight. E.g.: 1080 = 06:00 PM) |
Must not be null |
Simple activity structure
| Path | Type | Description | Constraints |
|---|---|---|---|
|
|
Discriminator for the type of activity updated 'assignment' : to update a task 'simpleactivity': to update a simple activity |
|
|
|
The activity type |
|
|
|
The type’s reference |
Size must be between 0 and 20 inclusive |
|
|
The type’s name |
Must not be null. Size must be between 1 and 100 inclusive |
|
|
The activity’s name |
|
|
|
The activity’s reference code |
|
|
|
The activity’s description |
|
|
|
The activity’s duration (integer amount of minutes) |
|
|
|
The actvity’s address data - see 'Sending an address to Geoplanning' |
Example request
Task example
$ curl 'https://api.geoplanning.net/activity/1' -i -X PUT -H 'Content-Type: application/vnd.geoplanning-v3.0+json;charset=UTF-8' -H 'Accept: application/vnd.geoplanning-v3.0+json;charset=UTF-8' -d '{
"subtype" : "assignment",
"type" : {
"fid" : "dvy-01",
"name" : "Delivery"
},
"task" : {
"name" : "Updated",
"foreignId" : "A-123",
"duration" : 75,
"dueDate" : 1472767140000,
"description" : "This is an updated task",
"contact" : {
"phoneNumber" : "32 81/33.11.11",
"mobileNumber" : "0478 91 23 45",
"mail" : "info@market-ip.com"
},
"address" : {
"longitude" : 4.9259030858176,
"latitude" : 50.4279474396788,
"country" : "BE",
"postcode" : "5100",
"locality" : "Naninne",
"street" : "Chaussée de Marche",
"number" : "774"
},
"customer" : {
"id" : 78
},
"appointment" : {
"start" : 1472727600000,
"end" : 1472734800000
},
"orders" : [ {
"foreignId" : "RJ45-T568B-c6",
"name" : "Cable RJ45 categ. 6",
"unit" : "m",
"amount" : 15.6
} ],
"openingHours" : [ {
"weekDay" : 0,
"from" : 540,
"to" : 1080
}, {
"weekDay" : 1,
"from" : 540,
"to" : 1080
}, {
"weekDay" : 2,
"from" : 540,
"to" : 1080
}, {
"weekDay" : 3,
"from" : 540,
"to" : 1080
}, {
"weekDay" : 4,
"from" : 540,
"to" : 1080
} ]
}
}'
Simple activity example
$ curl 'https://api.geoplanning.net/activity/2' -i -X PUT -H 'Content-Type: application/vnd.geoplanning-v3.0+json;charset=UTF-8' -H 'Accept: application/vnd.geoplanning-v3.0+json;charset=UTF-8' -d '{
"subtype" : "simpleactivity",
"type" : {
"fid" : "rfl-02",
"name" : "Refill"
},
"name" : "Updated refill",
"foreignId" : "r-123",
"description" : "This id an updated activity",
"duration" : 35,
"address" : {
"longitude" : 4.9259030858176,
"latitude" : 50.4279474396788,
"country" : "BE",
"postcode" : "5100",
"locality" : "Naninne",
"street" : "Chaussée de Marche",
"number" : "774"
}
}'
Response structure
Task response
| Path | Type | Description |
|---|---|---|
|
|
Response status data |
|
|
Status code of the api |
|
|
Activity’s data |
|
|
Discriminator for the type of activity imported |
|
|
Geoplanning ID of the activity |
|
|
Assignment status of the activity |
|
|
Geoplanning ID of the status |
|
|
Reference code of the status |
|
|
Name of the status |
|
|
Meta type of the status |
|
|
Color of the status |
|
|
Whether the status is the default status for the meta type |
|
|
The activity type |
|
|
The type’s reference |
|
|
The type’s name |
|
|
The theoretical start date of the activity computed by Geoplanning (timestamp) |
|
|
The theoretical end date of the activity computed by Geoplanning (timestamp) |
|
|
The actual start date of the activity computed by Geoplanning (timestamp) |
|
|
The actual end date of the activity computed by Geoplanning (timestamp) |
|
|
Reference to the activity’s round |
|
|
Geoplanning ID of the round |
|
|
The task’s data |
|
|
The task’s id |
|
|
The task’s name |
|
|
The task’s reference |
|
|
The task’s duration (integer amount of minutes minutes) |
|
|
The task’s due date (timestamp) |
|
|
The task’s description |
|
|
The task’s contact data |
|
|
The contact’s phone number |
|
|
The contact’s mobile phone number |
|
|
The contact’s e-mail address |
|
|
The task’s address data |
|
|
The address' longitude (as decimal degree) |
|
|
The address' latitude (as decimal degree) |
|
|
The address' country |
|
|
The address' postcode |
|
|
The address' locality |
|
|
The address' street |
|
|
The address' house number |
|
|
The task’s customer reference |
|
|
The customer’s Geoplanning ID |
|
|
The task’s appointment data |
|
|
The appointment' start date (timestamp) |
|
|
The appointment’s end date (timestamp) |
|
|
The task’s array of orders |
|
|
The foreignId of the order’s product |
|
|
The name of the order’s product |
|
|
The unit of the order’s product amount |
|
|
The amount of order’s product |
|
|
The array of task’s opening hours |
|
|
opening hour’s day of week (value from 0 to 6, 0 = Monday) |
|
|
opening hour’s start time (as integer amount of minute from midnight. E.g.: 570 = 09:30 AM) |
|
|
opening hour’s end time (as integer amount of minute from midnight. E.g.: 1080 = 06:00 PM) |
Simple activity response
| Path | Type | Description |
|---|---|---|
|
|
Response status data |
|
|
Status code of the api |
|
|
Activity’s data |
|
|
Discriminator for the type of activity imported |
|
|
Geoplanning ID of the activity |
|
|
Assignment status of the activity |
|
|
Geoplanning ID of the status |
|
|
Reference code of the status |
|
|
Name of the status |
|
|
Meta type of the status |
|
|
Color of the status |
|
|
Whether the status is the default status for the meta type |
|
|
The activity type |
|
|
The type’s reference |
|
|
The type’s name |
|
|
The theoretical start date of the activity computed by Geoplanning (timestamp) |
|
|
The theoretical end date of the activity computed by Geoplanning (timestamp) |
|
|
The actual start date of the activity computed by Geoplanning (timestamp) |
|
|
The actual end date of the activity computed by Geoplanning (timestamp) |
|
|
Reference to the activity’s round |
|
|
Geoplanning ID of the round |
|
|
The activity’s duration |
|
|
activity’s creation date (timestamp) |
|
|
activity’s name |
|
|
activity’s description |
|
|
activity’s description |
|
|
The activity’s address data |
|
|
The address' longitude (as decimal degree) |
|
|
The address' latitude (as decimal degree) |
|
|
The address' country |
|
|
The address' postcode |
|
|
The address' locality |
|
|
The address' street |
|
|
The address' house number |
|
|
The activity’s appointment |
|
|
The appointment’s Geoplanning ID |
|
|
The appointment’s start timestamp |
|
|
The appointment’s end timestamp |
|
|
Activity’s reference event |
|
|
The event’s Geoplanning ID |
Example response
Task response
HTTP/1.1 200 OK
Content-Type: application/vnd.geoplanning-v3.0+json;charset=UTF-8
Content-Length: 2745
{
"status" : {
"code" : 0
},
"activity" : {
"subtype" : "assignment",
"id" : 1,
"type" : {
"id" : 50,
"fid" : "dvy-01",
"name" : "Delivery",
"icon" : "squarre",
"fixedDuration" : false,
"metaType" : "NONE",
"resourceActivityType" : "ACTIVE_BUSINESS",
"roles" : [ "DISPATCHER_CREATE" ],
"targetActivityMask" : 5
},
"status" : {
"id" : 1,
"fid" : "ST_UASGN",
"name" : "Unassigned",
"type" : "UNASSIGNED",
"color" : "#E9CC29",
"byDefault" : true
},
"task" : {
"id" : 30,
"name" : "Updated",
"foreignId" : "A-123",
"duration" : 4500,
"dueDate" : "2016-09-01T21:59:00.000Z",
"description" : "This is an updated task",
"creationDate" : "2016-09-02T10:31:19.789Z",
"contact" : {
"phoneNumber" : "32 81/33.11.11",
"mobileNumber" : "0478 91 23 45",
"mail" : "info@market-ip.com"
},
"address" : {
"id" : 17,
"longitude" : 4.9259030858176,
"latitude" : 50.4279474396788,
"country" : "BE",
"postcode" : "5100",
"locality" : "Naninne",
"street" : "Chaussée de Marche",
"number" : "774"
},
"customer" : {
"id" : 78,
"foreignId" : "CUST-78",
"name" : "Market-IP",
"address" : {
"id" : 17,
"longitude" : 4.9259030858176,
"latitude" : 50.4279474396788,
"country" : "BE",
"postcode" : "5100",
"locality" : "Naninne",
"street" : "Chaussée de Marche",
"number" : "774"
},
"telephoneNumber" : "+32 81 33 11 11",
"email" : "info@market-ip.com"
},
"appointment" : {
"id" : 2,
"start" : "2016-09-01T11:00:00.000Z",
"end" : "2016-09-01T13:00:00.000Z"
},
"properties" : { },
"enumerables" : [ ],
"orders" : [ {
"id" : 2,
"foreignId" : "RJ45-T568B-c6",
"name" : "Cable RJ45 categ. 6",
"unit" : "m",
"amount" : 15.6
} ],
"openingHours" : [ {
"id" : 10,
"weekDay" : 0,
"from" : 540,
"to" : 1080
}, {
"id" : 11,
"weekDay" : 2,
"from" : 540,
"to" : 1080
}, {
"id" : 12,
"weekDay" : 1,
"from" : 540,
"to" : 1080
}, {
"id" : 13,
"weekDay" : 3,
"from" : 540,
"to" : 1080
}, {
"id" : 14,
"weekDay" : 4,
"from" : 540,
"to" : 1080
} ]
}
}
}
Simple activity response
HTTP/1.1 200 OK
Content-Type: application/vnd.geoplanning-v3.0+json;charset=UTF-8
Content-Length: 1040
{
"status" : {
"code" : 0
},
"activity" : {
"subtype" : "simpleactivity",
"id" : 2,
"type" : {
"id" : 51,
"fid" : "rfl-02",
"name" : "Refill",
"icon" : "drop",
"defaultDuration" : 30,
"fixedDuration" : true,
"metaType" : "REFILL",
"resourceActivityType" : "ACTIVE_BUSINESS",
"roles" : [ "DISPATCHER_CREATE" ],
"targetActivityMask" : 4
},
"status" : {
"id" : 1,
"fid" : "ST_UASGN",
"name" : "Unassigned",
"type" : "UNASSIGNED",
"color" : "#E9CC29",
"byDefault" : true
},
"duration" : 35,
"creationDate" : "2016-09-02T14:21:48.987Z",
"name" : "Updated refill",
"description" : "This id an updated activity",
"address" : {
"longitude" : 4.9259030858176,
"latitude" : 50.4279474396788,
"country" : "BE",
"postcode" : "5100",
"locality" : "Naninne",
"street" : "Chaussée de Marche",
"number" : "774"
}
}
}
Delete activity
A DELETE request will delete the activity
Request structure
By Geoplanning ID
| Parameter | Description |
|---|---|
|
Activity identifier |
By reference
| Parameter | Description |
|---|---|
|
Activity’s reference |
Example request
By Geoplanning ID
$ curl 'https://api.geoplanning.net/activity/1' -i -X DELETE -H 'Content-Type: application/vnd.geoplanning-v3.0+json;charset=UTF-8' -H 'Accept: application/vnd.geoplanning-v3.0+json;charset=UTF-8'
By reference
$ curl 'https://api.geoplanning.net/activity?fid=A-789' -i -X DELETE -H 'Content-Type: application/vnd.geoplanning-v3.0+json;charset=UTF-8' -H 'Accept: application/vnd.geoplanning-v3.0+json;charset=UTF-8'
Response structure
The server will respond with an HTTP status 204 : NO-CONTENT
Example response
HTTP/1.1 204 No Content
Assign activity
A PATCH request that will assign an activity to a resource without scheduling it in a round
Request parameter structure
| Parameter | Description |
|---|---|
|
Activity Geoplanning identifier |
Request payload structure
| Path | Type | Description | Constraints |
|---|---|---|---|
|
|
Resource to which assign the activity |
Must not be null |
|
|
The ID of the task to assign (Geoplanning ID) |
Must not be null |
|
|
Date when the activity should be planned (format: ISO 8601) |
Example request
$ curl 'https://api.geoplanning.net/activity/40/assign' -i -X PATCH -H 'Content-Type: application/vnd.geoplanning-v3.0+json;charset=UTF-8' -H 'Accept: application/vnd.geoplanning-v3.0+json;charset=UTF-8' -d '{
"resourceId" : 1,
"taskId" : 50,
"assignDate" : "2016-10-07T13:01:59.000Z"
}'
Response structure
| Path | Type | Description |
|---|---|---|
|
|
Response status data |
|
|
Status code of the api |
|
|
Activity data |
|
|
Activity’s Geoplanning ID |
|
|
Activity’s type |
|
|
Activity’s status |
|
|
Status' Geoplanning ID |
|
|
Status' Reference ID |
|
|
Status' name |
|
|
Status' meta type |
|
|
Status' icon color |
|
|
Status' true if that status is the default status for it’s meta type |
|
|
Sub category of activity. This will determine the kind of activity data. "assignment": the activity will contain an activity.task object "simpleactivity": the activity will contain reduced activity fields "route": the activity will contain route data |
|
|
Response example
HTTP/1.1 200 OK
Content-Type: application/vnd.geoplanning-v3.0+json;charset=UTF-8
Content-Length: 1021
{
"status" : {
"code" : 0
},
"activity" : {
"subtype" : "assignment",
"id" : 40,
"status" : {
"id" : 2,
"name" : "Assigned",
"type" : "PREASSIGNED",
"color" : "#E9CC29",
"byDefault" : true
},
"task" : {
"id" : 50,
"name" : "task",
"duration" : 3600,
"description" : "description",
"creationDate" : "2016-10-05T07:04:31.000Z",
"contact" : { },
"address" : {
"id" : 10,
"longitude" : 4.84935390546997,
"latitude" : 50.4730325596768,
"country" : "BE",
"postcode" : "5002",
"locality" : "Saint-Servais",
"street" : "Rue de Gembloux",
"number" : "110"
},
"properties" : { },
"preAssignment" : {
"resource" : {
"id" : 1
},
"preAssignedDate" : "2016-10-07T13:01:59.000Z"
},
"enumerables" : [ ],
"orders" : [ ],
"openingHours" : [ ]
}
}
}
Plan activity
A PATCH request that will plan an activity, scheduling it inside the round of a resource.
Request parameter structure
| Parameter | Description |
|---|---|
|
Activity Geoplanning identifier |
Request payload structure
| Path | Type | Description | Constraints |
|---|---|---|---|
|
|
The target round of the action |
Must not be null |
|
|
The round’s Geoplanning ID |
Must not be null |
|
|
The round’s hashkey |
Must be not null |
|
|
The action’s date time (format: ISO-8601) |
Must not be null |
|
|
Index where the activity should be inserted in the round (0 = first) |
Must be at least 0. Must not be null |
|
|
Status to set when assigning the activity (must exists and have the appropriate meta type) |
|
|
|
Activity status' Geoplanning ID |
|
|
|
Activity status' Reference ID |
Example request
$ curl 'https://api.geoplanning.net/activity/40/plan' -i -X PATCH -H 'Content-Type: application/vnd.geoplanning-v3.0+json;charset=UTF-8' -H 'Accept: application/vnd.geoplanning-v3.0+json;charset=UTF-8' -d '{
"round" : {
"id" : 30,
"hashKey" : "21631d522021e3b10d6ea779f15eda10"
},
"status" : {
"id" : 2,
"fid" : "fid"
},
"date" : "2015-07-13T10:00:00Z",
"activityIndex" : 0
}'
Response structure
| Path | Type | Description |
|---|---|---|
|
|
Response status data |
|
|
Status code of the api |
|
|
List of rounds modified by the action |
|
|
Round’s Geoplanning ID |
|
|
Theoretical start date of the round defined by the resource’s availability (format: ISO-8601) |
|
|
Theoretical end date of the round defined by the resource’s availability (format: ISO-8601) |
|
|
Round' departure location |
|
|
Address' Geoplanning ID |
|
|
Address' longitude coordinate (WGS84 in decimal degree) |
|
|
Address' latitude (WGS84 in decimal degree) |
|
|
Address' country iso2 code |
|
|
Address' postal code |
|
|
Address' locality name |
|
|
Address' street name |
|
|
Address' house number |
|
|
Round' arrival location |
|
|
Address' Geoplanning ID |
|
|
Address' longitude coordinate (WGS84 in decimal degree) |
|
|
Address' latitude (WGS84 in decimal degree) |
|
|
Address' country iso2 code |
|
|
Address' postal code |
|
|
Address' locality name |
|
|
Address' street name |
|
|
Address' house number |
|
|
Round’s checksum to quickly control data integrity over changes |
|
|
Round’s activities |
Response example
HTTP/1.1 200 OK
Content-Type: application/vnd.geoplanning-v3.0+json;charset=UTF-8
Content-Length: 3776
{
"status" : {
"code" : 0
},
"rounds" : [ {
"id" : 30,
"startDate" : "2015-07-13T08:00:00.000Z",
"endDate" : "2015-07-13T16:00:00.000Z",
"startAddress" : {
"id" : 10,
"longitude" : 4.84935390546997,
"latitude" : 50.4730325596768,
"country" : "BE",
"postcode" : "5002",
"locality" : "Saint-Servais",
"street" : "Rue de Gembloux",
"number" : "110"
},
"endAddress" : {
"id" : 10,
"longitude" : 4.84935390546997,
"latitude" : 50.4730325596768,
"country" : "BE",
"postcode" : "5002",
"locality" : "Saint-Servais",
"street" : "Rue de Gembloux",
"number" : "110"
},
"hashKey" : "c33e0f2f8d3954d63eb1c2576d68e7f1",
"activities" : [ {
"subtype" : "route",
"id" : 42,
"computedStartDate" : "2015-07-13T08:00:00.000Z",
"computedEndDate" : "2015-07-13T08:02:58.000Z",
"status" : {
"id" : 2,
"name" : "Planned",
"type" : "ASSIGNED",
"color" : "#E9CC29",
"byDefault" : true
},
"origin" : {
"id" : 10,
"longitude" : 4.84935390546997,
"latitude" : 50.4730325596768,
"country" : "BE",
"postcode" : "5002",
"locality" : "Saint-Servais",
"street" : "Rue de Gembloux",
"number" : "110"
},
"destination" : {
"id" : 11,
"longitude" : 4.88855612705365,
"latitude" : 50.4637474994767,
"country" : "BE",
"postcode" : "5100",
"locality" : "Jambes",
"street" : "Avenue du Prince de Liège",
"number" : "104"
},
"distance" : 2968.697090212982,
"duration" : 178
}, {
"subtype" : "assignment",
"id" : 40,
"computedStartDate" : "2015-07-13T08:02:58.000Z",
"computedEndDate" : "2015-07-13T09:02:58.000Z",
"status" : {
"id" : 2,
"name" : "Planned",
"type" : "ASSIGNED",
"color" : "#E9CC29",
"byDefault" : true
},
"task" : {
"id" : 50,
"name" : "task",
"duration" : 3600,
"description" : "description",
"creationDate" : "2016-10-05T07:04:31.000Z",
"contact" : { },
"address" : {
"id" : 11,
"longitude" : 4.88855612705365,
"latitude" : 50.4637474994767,
"country" : "BE",
"postcode" : "5100",
"locality" : "Jambes",
"street" : "Avenue du Prince de Liège",
"number" : "104"
},
"properties" : { },
"enumerables" : [ ],
"orders" : [ ],
"openingHours" : [ ]
}
}, {
"subtype" : "route",
"id" : 43,
"computedStartDate" : "2015-07-13T09:02:58.000Z",
"computedEndDate" : "2015-07-13T09:05:56.000Z",
"status" : {
"id" : 2,
"name" : "Planned",
"type" : "ASSIGNED",
"color" : "#E9CC29",
"byDefault" : true
},
"origin" : {
"id" : 11,
"longitude" : 4.88855612705365,
"latitude" : 50.4637474994767,
"country" : "BE",
"postcode" : "5100",
"locality" : "Jambes",
"street" : "Avenue du Prince de Liège",
"number" : "104"
},
"destination" : {
"id" : 10,
"longitude" : 4.84935390546997,
"latitude" : 50.4730325596768,
"country" : "BE",
"postcode" : "5002",
"locality" : "Saint-Servais",
"street" : "Rue de Gembloux",
"number" : "110"
},
"distance" : 2968.697090213016,
"duration" : 178
} ]
} ]
}
Unassign activity
A PATCH request that will unassign an activity, removing it from it’s assigned resource and updating it’s activity status
Request parameters structure
| Parameter | Description |
|---|---|
|
Activity Geoplanning identifier |
Request payload structure
| Path | Type | Description | Constraints |
|---|---|---|---|
|
|
(optionnal) The hash of the round in which the activity to unassign is. If provided a check is made that the round still matches the passed hash and did not change since you last loaded it. If not provided the unassign is performed regardeless where the activity is and you risk to unassign a task that was, for instance re-assigned to someone else |
Example request
$ curl 'https://api.geoplanning.net/activity/1/unassign' -i -X PATCH -H 'Content-Type: application/vnd.geoplanning-v3.0+json;charset=UTF-8' -H 'Accept: application/vnd.geoplanning-v3.0+json;charset=UTF-8' -d '{
"roundHash" : "a11356a62fa2255fa486cbfa77c9f078"
}'
Response structure
| Path | Type | Description |
|---|---|---|
|
|
Geoplanning respons status data |
|
|
Status code of the api |
|
|
unassigned activity data |
|
|
activity id |
|
|
The activity type |
|
|
Assignment status of the activity |
|
|
Geoplanning ID of the status |
|
|
Reference code of the status |
|
|
Name of the status |
|
|
Meta type of the status |
|
|
Color of the status |
|
|
Whether the status is the default status for the meta type |
|
|
Sub category of activity. This will determine the kind of activity data. "assignmet": the activity will contain an activity.task object "simpleactivity": the activity will contain reduced activity fields "route": the activity will contain route data |
|
|
task data (only for subtype = 'assignment'). See GET for detailed content |
Example response
HTTP/1.1 200 OK
Content-Type: application/vnd.geoplanning-v3.0+json;charset=UTF-8
Content-Length: 1001
{
"status" : {
"code" : 0
},
"activity" : {
"subtype" : "assignment",
"id" : 1,
"status" : {
"id" : 2,
"fid" : "ST_UASGN",
"name" : "Unassigned",
"type" : "UNASSIGNED",
"color" : "#E9CC29",
"byDefault" : true
},
"task" : {
"id" : 3,
"name" : "Unassign me",
"foreignId" : "A-123",
"duration" : 3600,
"dueDate" : "2016-09-30T23:59:00.000Z",
"description" : "That is the taks to unassing !",
"creationDate" : "2016-09-02T10:31:19.789Z",
"contact" : { },
"address" : {
"id" : 16,
"longitude" : 4.135209326041,
"latitude" : 50.6056181213651,
"country" : "BE",
"postcode" : "7090",
"locality" : "Braine-le-Comte",
"street" : "Rue des Pommiers",
"number" : "22"
},
"properties" : { },
"enumerables" : [ ],
"orders" : [ ],
"openingHours" : [ ]
}
}
}
Start activity
A PATCH request will update the status of an activity
Request parameters structure
| Parameter | Description |
|---|---|
|
Activity Geoplanning identifier |
Request payload structure
| Path | Type | Description | Constraints |
|---|---|---|---|
|
|
The round identifier |
Must not be null |
|
|
The hashing key of the round |
|
|
|
Specify an activity status to set this activity status on the activity after update. |
This status must have a type equals to WORKING if it’s specify. Can be null |
|
|
Specify an activity status id to set this activity status on the activity after update. |
Can be null if the 'fid' is specify |
|
|
Specify an activity status reference to set this activity status on the activity after update. |
Can be null if the 'id' is specify |
|
|
The start date of the work. Related to the field 'actualStartDate' for an activity after update. |
Must not be null |
Example request
$ curl 'https://api.geoplanning.net/activity/1/start' -i -X PATCH -H 'Content-Type: application/vnd.geoplanning-v3.0+json;charset=UTF-8' -H 'Accept: application/vnd.geoplanning-v3.0+json;charset=UTF-8' -d '{
"round" : {
"id" : 1,
"hashKey" : "35875c7f38216fd24cfac33c2fa98148"
},
"status" : {
"id" : 2,
"fid" : "fid"
},
"date" : "2015-07-13T09:00:00Z"
}'
Response structure
| Path | Type | Description |
|---|---|---|
|
|
Status code of the api |
|
|
List of rounds |
|
|
The round identifier |
|
|
The start date of the round |
|
|
The end date of the round |
|
|
The start address of the round |
|
|
The address identifier |
|
|
The longitude of the address |
|
|
The latitude of the address |
|
|
The country of the address |
|
|
The postcode of the address |
|
|
The locality of the address |
|
|
The street of the address |
|
|
The number of the address |
|
|
The end address of the round |
|
|
The address identifier |
|
|
The longitude of the address |
|
|
The latitude of the address |
|
|
The country of the address |
|
|
The postcode of the address |
|
|
The locality of the address |
|
|
The street of the address |
|
|
The number of the address |
|
|
Checksum to verify the state integrity of the round. If you want verify if the round has changed it’s recommended to compare both hashing keys. |
|
|
All activities of the round |
Example response
HTTP/1.1 200 OK
Content-Type: application/vnd.geoplanning-v3.0+json;charset=UTF-8
Content-Length: 1648
{
"status" : {
"code" : 0
},
"rounds" : [ {
"id" : 1,
"startDate" : "2015-07-13T08:00:00.000Z",
"endDate" : "2015-07-13T16:00:00.000Z",
"startAddress" : {
"id" : 1,
"longitude" : 4.84935390546997,
"latitude" : 50.4730325596768,
"country" : "BE",
"postcode" : "5002",
"locality" : "Saint-Servais",
"street" : "Rue de Gembloux",
"number" : "110"
},
"endAddress" : {
"id" : 1,
"longitude" : 4.84935390546997,
"latitude" : 50.4730325596768,
"country" : "BE",
"postcode" : "5002",
"locality" : "Saint-Servais",
"street" : "Rue de Gembloux",
"number" : "110"
},
"hashKey" : "1c3c71add8414e4a3203d65d9ee7d8a5",
"activities" : [ {
"subtype" : "simpleactivity",
"id" : 1,
"computedStartDate" : "2015-07-13T08:00:00.000Z",
"computedEndDate" : "2015-07-13T08:00:20.000Z",
"actualStartDate" : "2015-07-13T09:00:00.000Z",
"status" : {
"id" : 2,
"name" : "Working",
"type" : "WORKING",
"color" : "#E9CC29",
"byDefault" : true
},
"duration" : 20,
"creationDate" : "2015-07-10T12:07:39.657Z",
"name" : "Sprimont Jean-Paul",
"description" : "Pas de description",
"address" : {
"id" : 1,
"longitude" : 4.84935390546997,
"latitude" : 50.4730325596768,
"country" : "BE",
"postcode" : "5002",
"locality" : "Saint-Servais",
"street" : "Rue de Gembloux",
"number" : "110"
}
} ]
} ]
}
Complete activity
A PATCH request will update the status of an activity
Request parameters structure
| Parameter | Description |
|---|---|
|
Activity Geoplanning identifier |
Request payload structure
| Path | Type | Description | Constraints |
|---|---|---|---|
|
|
The round identifier |
Must not be null |
|
|
The hashing key of the round |
|
|
|
Specify an activity status to set this activity status on the activity after update. |
This status must have a type equals to COMPLETED if it’s specify. Can be null |
|
|
Specify an activity status id to set this activity status on the activity after update. |
Can be null if the 'fid' is specify |
|
|
Specify an activity status reference to set this activity status on the activity after update. |
Can be null if the 'id' is specify |
|
|
The end date of the work. Related to the field 'actualEndDate' for an activity after update. |
Must not be null |
Example request
$ curl 'https://api.geoplanning.net/activity/1/finish' -i -X PATCH -H 'Content-Type: application/vnd.geoplanning-v3.0+json;charset=UTF-8' -H 'Accept: application/vnd.geoplanning-v3.0+json;charset=UTF-8' -d '{
"round" : {
"id" : 1,
"hashKey" : "35875c7f38216fd24cfac33c2fa98148"
},
"status" : {
"id" : 2,
"fid" : "fid"
},
"date" : "2015-07-13T10:00:00Z"
}'
Response structure
| Path | Type | Description |
|---|---|---|
|
|
Status code of the api |
|
|
List of rounds |
|
|
The round identifier |
|
|
The start date of the round |
|
|
The end date of the round |
|
|
The start address of the round |
|
|
The address identifier |
|
|
The longitude of the address |
|
|
The latitude of the address |
|
|
The country of the address |
|
|
The postcode of the address |
|
|
The locality of the address |
|
|
The street of the address |
|
|
The number of the address |
|
|
The end address of the round |
|
|
The address identifier |
|
|
The longitude of the address |
|
|
The latitude of the address |
|
|
The country of the address |
|
|
The postcode of the address |
|
|
The locality of the address |
|
|
The street of the address |
|
|
The number of the address |
|
|
Checksum to verify the state integrity of the round. If you want verify if the round has changed it’s recommended to compare both hashing keys. |
|
|
All activities of the round |
Example response
HTTP/1.1 200 OK
Content-Type: application/vnd.geoplanning-v3.0+json;charset=UTF-8
Content-Length: 803
{
"status" : {
"code" : 0
},
"rounds" : [ {
"id" : 1,
"startDate" : "2015-07-13T08:00:00.000Z",
"endDate" : "2015-07-13T16:00:00.000Z",
"startAddress" : {
"id" : 1,
"longitude" : 4.84935390546997,
"latitude" : 50.4730325596768,
"country" : "BE",
"postcode" : "5002",
"locality" : "Saint-Servais",
"street" : "Rue de Gembloux",
"number" : "110"
},
"endAddress" : {
"id" : 1,
"longitude" : 4.84935390546997,
"latitude" : 50.4730325596768,
"country" : "BE",
"postcode" : "5002",
"locality" : "Saint-Servais",
"street" : "Rue de Gembloux",
"number" : "110"
},
"hashKey" : "21631d522021e3b10d6ea779f15eda10",
"activities" : [ ]
} ]
}
Reject activity
A PATCH request will update the status of an activity
Request parameters structure
| Parameter | Description |
|---|---|
|
Activity Geoplanning identifier |
Request payload structure
| Path | Type | Description | Constraints |
|---|---|---|---|
|
|
The round identifier |
Must not be null |
|
|
The hashing key of the round |
|
|
|
Specify an activity status to set this activity status on the activity after update. |
This status must have a type equals to WORKING if it’s specify. Can be null |
|
|
Specify an activity status id to set this activity status on the activity after update. |
Can be null if the 'fid' is specify |
|
|
Specify an activity status reference to set this activity status on the activity after update. |
Can be null if the 'id' is specify |
|
|
The start date of the work. Related to the field 'actualStartDate' for an activity after update. |
Must not be null |
Example request
$ curl 'https://api.geoplanning.net/activity/1/rejectnowork' -i -X PATCH -H 'Content-Type: application/vnd.geoplanning-v3.0+json;charset=UTF-8' -H 'Accept: application/vnd.geoplanning-v3.0+json;charset=UTF-8' -d '{
"round" : {
"id" : 1,
"hashKey" : "eb4b72efc085c694baea75626cfff188"
},
"status" : {
"id" : 2,
"fid" : "fid"
},
"date" : "2015-07-13T09:00:00Z"
}'
Response structure
| Path | Type | Description |
|---|---|---|
|
|
Status code of the api |
|
|
List of rounds |
|
|
The round identifier |
|
|
The start date of the round |
|
|
The end date of the round |
|
|
The start address of the round |
|
|
The address identifier |
|
|
The longitude of the address |
|
|
The latitude of the address |
|
|
The country of the address |
|
|
The postcode of the address |
|
|
The locality of the address |
|
|
The street of the address |
|
|
The number of the address |
|
|
The end address of the round |
|
|
The address identifier |
|
|
The longitude of the address |
|
|
The latitude of the address |
|
|
The country of the address |
|
|
The postcode of the address |
|
|
The locality of the address |
|
|
The street of the address |
|
|
The number of the address |
|
|
Checksum to verify the state integrity of the round. If you want verify if the round has changed it’s recommended to compare both hashing keys. |
|
|
All activities of the round |
Example response
HTTP/1.1 200 OK
Content-Type: application/vnd.geoplanning-v3.0+json;charset=UTF-8
Content-Length: 803
{
"status" : {
"code" : 0
},
"rounds" : [ {
"id" : 1,
"startDate" : "2015-07-13T08:00:00.000Z",
"endDate" : "2015-07-13T16:00:00.000Z",
"startAddress" : {
"id" : 1,
"longitude" : 4.84935390546997,
"latitude" : 50.4730325596768,
"country" : "BE",
"postcode" : "5002",
"locality" : "Saint-Servais",
"street" : "Rue de Gembloux",
"number" : "110"
},
"endAddress" : {
"id" : 1,
"longitude" : 4.84935390546997,
"latitude" : 50.4730325596768,
"country" : "BE",
"postcode" : "5002",
"locality" : "Saint-Servais",
"street" : "Rue de Gembloux",
"number" : "110"
},
"hashKey" : "21631d522021e3b10d6ea779f15eda10",
"activities" : [ ]
} ]
}
Reject a working activity
A PATCH request will update the status of an activity
Request parameters structure
| Parameter | Description |
|---|---|
|
Activity Geoplanning identifier |
Request structure
| Path | Type | Description | Constraints |
|---|---|---|---|
|
|
The round identifier |
Must not be null |
|
|
The hashing key of the round |
|
|
|
Specify an activity status to set this activity status on the activity after update. |
This status must have a type equals to COMPLETED if it’s specify. Can be null |
|
|
Specify an activity status id to set this activity status on the activity after update. |
Can be null if the 'fid' is specify |
|
|
Specify an activity status reference to set this activity status on the activity after update. |
Can be null if the 'id' is specify |
|
|
The end date of the work. Related to the field 'actualEndDate' for an activity after update. |
Must not be null |
Example request
$ curl 'https://api.geoplanning.net/activity/1/rejectwork' -i -X PATCH -H 'Content-Type: application/vnd.geoplanning-v3.0+json;charset=UTF-8' -H 'Accept: application/vnd.geoplanning-v3.0+json;charset=UTF-8' -d '{
"round" : {
"id" : 1,
"hashKey" : "35875c7f38216fd24cfac33c2fa98148"
},
"status" : {
"id" : 2,
"fid" : "fid"
},
"date" : "2015-07-13T10:00:00Z"
}'
Response structure
| Path | Type | Description |
|---|---|---|
|
|
Status code of the api |
|
|
List of rounds |
|
|
The round identifier |
|
|
The start date of the round |
|
|
The end date of the round |
|
|
The start address of the round |
|
|
The address identifier |
|
|
The longitude of the address |
|
|
The latitude of the address |
|
|
The country of the address |
|
|
The postcode of the address |
|
|
The locality of the address |
|
|
The street of the address |
|
|
The number of the address |
|
|
The end address of the round |
|
|
The address identifier |
|
|
The longitude of the address |
|
|
The latitude of the address |
|
|
The country of the address |
|
|
The postcode of the address |
|
|
The locality of the address |
|
|
The street of the address |
|
|
The number of the address |
|
|
Checksum to verify the state integrity of the round. If you want verify if the round has changed it’s recommended to compare both hashing keys. |
|
|
All activities of the round |
Example response
HTTP/1.1 200 OK
Content-Type: application/vnd.geoplanning-v3.0+json;charset=UTF-8
Content-Length: 803
{
"status" : {
"code" : 0
},
"rounds" : [ {
"id" : 1,
"startDate" : "2015-07-13T08:00:00.000Z",
"endDate" : "2015-07-13T16:00:00.000Z",
"startAddress" : {
"id" : 1,
"longitude" : 4.84935390546997,
"latitude" : 50.4730325596768,
"country" : "BE",
"postcode" : "5002",
"locality" : "Saint-Servais",
"street" : "Rue de Gembloux",
"number" : "110"
},
"endAddress" : {
"id" : 1,
"longitude" : 4.84935390546997,
"latitude" : 50.4730325596768,
"country" : "BE",
"postcode" : "5002",
"locality" : "Saint-Servais",
"street" : "Rue de Gembloux",
"number" : "110"
},
"hashKey" : "21631d522021e3b10d6ea779f15eda10",
"activities" : [ ]
} ]
}
Cancel activity
A PATCH request that will cancel an activity removing it form it’s round and from any inbox.
Request parameter structure
| Parameter | Description |
|---|---|
|
Activity Geoplanning identifier |
Request payload structure
| Path | Type | Description | Constraints |
|---|---|---|---|
|
|
The target round of the action |
|
|
|
The round’s Geoplanning ID |
Must not be null |
|
|
The round’s hashkey |
Must not be null |
|
|
The action’s date time (format: ISO-8601) |
Must not be null |
Example request
$ curl 'https://api.geoplanning.net/activity/40/cancel' -i -X PATCH -H 'Content-Type: application/vnd.geoplanning-v3.0+json;charset=UTF-8' -H 'Accept: application/vnd.geoplanning-v3.0+json;charset=UTF-8' -d '{
"round" : {
"id" : 30,
"hashKey" : "1932ab8633eb86cfde9bdf103e6e9504"
},
"date" : "2015-07-13T10:00:00Z"
}'
Response structure
| Path | Type | Description |
|---|---|---|
|
|
Response status data |
|
|
Status code of the api |
|
|
Activity data |
|
|
Activity’s Geoplanning ID |
|
|
Activity’s type |
|
|
Activity’s status |
|
|
Status' Geoplanning ID |
|
|
Status' Reference ID |
|
|
Status' name |
|
|
Status' meta type |
|
|
Status' icon color |
|
|
Status' true if that status is the default status for it’s meta type |
|
|
Sub category of activity. This will determine the kind of activity data. "assignment": the activity will contain an activity.task object "simpleactivity": the activity will contain reduced activity fields "route": the activity will contain route data |
|
|
Response example
HTTP/1.1 200 OK
Content-Type: application/vnd.geoplanning-v3.0+json;charset=UTF-8
Content-Length: 876
{
"status" : {
"code" : 0
},
"activity" : {
"subtype" : "assignment",
"id" : 40,
"status" : {
"id" : 1,
"name" : "Canceled",
"type" : "CANCELLED",
"color" : "#E9CC29",
"byDefault" : true
},
"task" : {
"id" : 50,
"name" : "task",
"duration" : 3600,
"description" : "assigned task",
"creationDate" : "2016-10-05T07:04:31.000Z",
"contact" : { },
"address" : {
"id" : 11,
"longitude" : 4.88855612705365,
"latitude" : 50.4637474994767,
"country" : "BE",
"postcode" : "5100",
"locality" : "Jambes",
"street" : "Avenue du Prince de Liège",
"number" : "104"
},
"properties" : { },
"enumerables" : [ ],
"orders" : [ ],
"openingHours" : [ ]
}
}
}
Getting the activity’s history
A GET request will retrieve the customer activity history
Request structure
| Parameter | Description |
|---|---|
|
Customer identifier |
Example request
$ curl 'https://api.geoplanning.net/activity/history/1' -i -H 'Content-Type: application/vnd.geoplanning-v3.0+json;charset=UTF-8' -H 'Accept: application/vnd.geoplanning-v3.0+json;charset=UTF-8'
Response structure
| Path | Type | Description |
|---|---|---|
|
|
Status code of the api |
|
|
The collection of activities |
|
|
The activity identifier |
|
|
The activity name |
|
|
The activity reference |
|
|
The actual end date of the activity |
|
|
The resource name of the activity |
Example response
HTTP/1.1 200 OK
Content-Type: application/vnd.geoplanning-v3.0+json;charset=UTF-8
Content-Length: 383
{
"status" : {
"code" : 0
},
"activities" : [ {
"id" : 2,
"name" : "Moeskroen Customer",
"foreignId" : "GP-2",
"endDate" : "2015-07-13T11:30:00.000Z",
"resourceName" : "DEMO"
}, {
"id" : 1,
"name" : "Sprimont Jean-Paul",
"foreignId" : "GP-1",
"endDate" : "2015-07-13T10:08:34.000Z",
"resourceName" : "DEMO"
} ]
}
Getting the activity’s attachments
A GET request that will retrieve the attachments for an activity
Request structure
| Parameter | Description |
|---|---|
|
Activity identifier |
Example request
$ curl 'https://api.geoplanning.net/activity/40/attachments' -i -H 'Content-Type: application/vnd.geoplanning-v3.0+json;charset=UTF-8' -H 'Accept: application/vnd.geoplanning-v3.0+json;charset=UTF-8'
Response structure
| Path | Type | Description |
|---|---|---|
|
|
Response status data |
|
|
Status code of the api |
|
|
Status message |
|
|
Activity’s attachments |
|
|
Attachment’s Geoplanning ID |
|
|
Task to which the attachment is linked (Geoplanning ID) |
|
|
Attachment’s owner (Geoplanning user ID) |
|
|
Type of attachment.
|
|
|
Date and time when the attachment was created (format: ISO 8601) |
|
|
Text body of the comment |
|
|
Url of the attachment’s picture |
Example response
HTTP/1.1 200 OK
Content-Type: application/vnd.geoplanning-v3.0+json;charset=UTF-8
Content-Length: 697
{
"status" : {
"code" : 0
},
"attachments" : [ {
"id" : 62,
"taskId" : 50,
"userId" : 1,
"type" : "SIGNATURE",
"creationDate" : "2016-10-07T11:31:23.000Z",
"text" : "Mr John Doe",
"url" : "http://img.market-ip.com/customer-signature.png"
}, {
"id" : 61,
"taskId" : 50,
"userId" : 1,
"type" : "IMAGE",
"creationDate" : "2016-10-07T11:31:22.000Z",
"text" : "That is a nice picture",
"url" : "http://img.market-ip.com/nice-picture.png"
}, {
"id" : 60,
"taskId" : 50,
"userId" : 1,
"type" : "TEXT",
"creationDate" : "2016-10-07T11:31:21.000Z",
"text" : "I am a comment !"
} ]
}
Events
Start activity by event
A PATCH request will update the status of an activity
Request structure
| Path | Type | Description | Constraints |
|---|---|---|---|
|
|
The round identifier |
Must not be null |
|
|
The hashing key of the round |
|
|
|
Specify an activity status to set this activity status on the activity after update. |
This status must have a type equals to WORKING if it’s specify. Can be null |
|
|
Specify an activity status id to set this activity status on the activity after update. |
Can be null if the 'fid' is specify |
|
|
Specify an activity status reference to set this activity status on the activity after update. |
Can be null if the 'id' is specify |
|
|
The start date of the work. Related to the field 'actualStartDate' for an activity after update. |
Must not be null |
Example request
$ curl 'https://api.geoplanning.net/events/1/start' -i -X PATCH -H 'Content-Type: application/vnd.geoplanning-v3.0+json;charset=UTF-8' -H 'Accept: application/vnd.geoplanning-v3.0+json;charset=UTF-8' -d '{
"round" : {
"id" : 1,
"hashKey" : "35875c7f38216fd24cfac33c2fa98148"
},
"status" : {
"id" : 2,
"fid" : "fid"
},
"date" : "2015-07-13T09:00:00Z"
}'
Response structure
| Path | Type | Description |
|---|---|---|
|
|
Status code of the api |
|
|
List of rounds |
|
|
The round identifier |
|
|
The start date of the round |
|
|
The end date of the round |
|
|
The start address of the round |
|
|
The address identifier |
|
|
The longitude of the address |
|
|
The latitude of the address |
|
|
The country of the address |
|
|
The postcode of the address |
|
|
The locality of the address |
|
|
The street of the address |
|
|
The number of the address |
|
|
The end address of the round |
|
|
The address identifier |
|
|
The longitude of the address |
|
|
The latitude of the address |
|
|
The country of the address |
|
|
The postcode of the address |
|
|
The locality of the address |
|
|
The street of the address |
|
|
The number of the address |
|
|
Checksum to verify the state integrity of the round. If you want verify if the round has changed it’s recommended to compare both hashing keys. |
|
|
All activities of the round |
Example response
HTTP/1.1 200 OK
Content-Type: application/vnd.geoplanning-v3.0+json;charset=UTF-8
Content-Length: 1695
{
"status" : {
"code" : 0
},
"rounds" : [ {
"id" : 1,
"startDate" : "2015-07-13T08:00:00.000Z",
"endDate" : "2015-07-13T16:00:00.000Z",
"startAddress" : {
"id" : 1,
"longitude" : 4.84935390546997,
"latitude" : 50.4730325596768,
"country" : "BE",
"postcode" : "5002",
"locality" : "Saint-Servais",
"street" : "Rue de Gembloux",
"number" : "110"
},
"endAddress" : {
"id" : 1,
"longitude" : 4.84935390546997,
"latitude" : 50.4730325596768,
"country" : "BE",
"postcode" : "5002",
"locality" : "Saint-Servais",
"street" : "Rue de Gembloux",
"number" : "110"
},
"hashKey" : "1c3c71add8414e4a3203d65d9ee7d8a5",
"activities" : [ {
"subtype" : "simpleactivity",
"id" : 1,
"computedStartDate" : "2015-07-13T08:00:00.000Z",
"computedEndDate" : "2015-07-13T08:00:20.000Z",
"actualStartDate" : "2015-07-13T09:00:00.000Z",
"status" : {
"id" : 2,
"name" : "Working",
"type" : "WORKING",
"color" : "#E9CC29",
"byDefault" : true
},
"duration" : 20,
"creationDate" : "2015-07-10T12:07:39.657Z",
"name" : "Sprimont Jean-Paul",
"description" : "Pas de description",
"address" : {
"id" : 1,
"longitude" : 4.84935390546997,
"latitude" : 50.4730325596768,
"country" : "BE",
"postcode" : "5002",
"locality" : "Saint-Servais",
"street" : "Rue de Gembloux",
"number" : "110"
},
"event" : {
"id" : 1
}
} ]
} ]
}
Activity Status
Listing activity status
A GET request will list all available activity status.
Example request
$ curl 'https://api.geoplanning.net/activity/status' -i -H 'Content-Type: application/vnd.geoplanning-v3.0+json;charset=UTF-8' -H 'Accept: application/vnd.geoplanning-v3.0+json;charset=UTF-8'
Response structure
| Path | Type | Description |
|---|---|---|
|
|
Status code of the api |
|
|
The collection of activity status |
|
|
The activity status identifier |
|
|
The activity status reference |
|
|
The activity status name |
|
|
The context of the activity status. Valid values are: UNASSIGNED : The activity is unassigned ASSIGNED : The activity is assigned WORKING : The activity is working COMPLETED : The activity is completed REJECTED_ON_SITE : The activity has been started but rejected REJECTED_NO_MOVE : The activity hasn’t been started and rejected CANCELLED : The activity is cancelled |
|
|
The activity status color |
|
|
Tell whether the activity status is used by default when a status action is performed |
Example response
HTTP/1.1 200 OK
Content-Type: application/vnd.geoplanning-v3.0+json;charset=UTF-8
Content-Length: 356
{
"status" : {
"code" : 0
},
"activityStatus" : [ {
"id" : 1,
"fid" : "7",
"name" : "Assigned",
"type" : "ASSIGNED",
"color" : "#787878",
"byDefault" : true
}, {
"id" : 2,
"fid" : "13",
"name" : "Completed",
"type" : "COMPLETED",
"color" : "#cacaca",
"byDefault" : true
} ]
}
Activity Types
Listing activity types
A GET request will list all available activity types.
Example request
$ curl 'https://api.geoplanning.net/activity/types' -i -H 'Content-Type: application/vnd.geoplanning-v3.0+json;charset=UTF-8' -H 'Accept: application/vnd.geoplanning-v3.0+json;charset=UTF-8'
Response structure
| Path | Type | Description |
|---|---|---|
|
|
Response status data |
|
|
Status code of the api |
|
|
The collection of activity types |
|
|
Type’s Geoplanning ID |
|
|
Type’s Reference ID |
|
|
Type’s name |
|
|
Type’s shape icon |
|
|
Type’s default duration. The activity with this type will last minimum the default duration value |
|
|
Tell whether the duration of the activity type may be changed |
|
|
The context of the activity type. Valid values are: "none": the activity type doesn’t have a meta type "lunch": the activity type is a lunch type "refill": the activity type is a refill type "route": the activity type is a road type "wait_time": the activity type is a wait period type "waypoint": the activity type is a waypoint type "stand_by": the activity type is a standby type |
|
|
The way resources are seeing this activity type. Valid values are: "active_business": resource is active (working) on a business activity "inactive_compensatory_leave": resource is inactive due to compensatory leave "inactive_non_business": resource is inactive (rest, holiday, sick, …) on a non business activity |
|
|
The way resources are seeing this activity type. Valid values are: "dispatcher_create": the activity type can be used by the dispatcher to create an activity "resource_create": the activity type can be used by the ressource to create an activity |
|
|
Type’s bit mask. Allow to know if the type can be used by an activity. The default bit mask values are : "1": can be used for a task "2": can be used for a route "4" : can be used for a simple activity Example: the value - 5 - means the activity type can be used for a task and simple activity |
Example response
HTTP/1.1 200 OK
Content-Type: application/vnd.geoplanning-v3.0+json;charset=UTF-8
Content-Length: 719
{
"status" : {
"code" : 0
},
"activityTypes" : [ {
"id" : 2,
"fid" : "GP-2",
"name" : "Wait time",
"icon" : "lightning",
"defaultDuration" : 60,
"fixedDuration" : false,
"metaType" : "WAYPOINT",
"resourceActivityType" : "ACTIVE_BUSINESS",
"roles" : [ "RESOURCE_CREATE", "DISPATCHER_CREATE" ],
"targetActivityMask" : 4
}, {
"id" : 1,
"fid" : "GP-1",
"name" : "Way Point",
"icon" : "default",
"defaultDuration" : 30,
"fixedDuration" : true,
"metaType" : "STAND_BY",
"resourceActivityType" : "INACTIVE_NON_BUSINESS",
"roles" : [ "RESOURCE_CREATE", "DISPATCHER_CREATE" ],
"targetActivityMask" : 4
} ]
}
Login
Check login
A GET request will check the username and password
Example request
$ curl 'https://api.geoplanning.net/login/check' -i -H 'Content-Type: application/vnd.geoplanning-v3.0+json;charset=UTF-8' -H 'Accept: application/vnd.geoplanning-v3.0+json;charset=UTF-8'
Response structure
| Path | Type | Description |
|---|---|---|
|
|
Status code of the api |
|
|
The collection of activity status |
|
|
The user identifier |
|
|
The user language |
|
|
The user first name |
|
|
The user last name |
|
|
The resource identifier bind to the user |
|
|
The resource reference bind to the user |
Example response
HTTP/1.1 200 OK
Content-Type: application/vnd.geoplanning-v3.0+json;charset=UTF-8
Content-Length: 211
{
"status" : {
"code" : 0
},
"userData" : {
"id" : 1,
"userLanguage" : "en",
"firstName" : "User",
"lastName" : "Demo",
"resourceId" : 1,
"resourceFid" : "MIP"
}
}
Pois
Listing closest pois by address
A GET request will list 10 closest point of interest from an address.
Request structure
| Parameter | Description |
|---|---|
|
The country of the reference address |
|
The postcode of the reference address |
|
The locality of the reference address |
|
The street name of the reference address |
|
The house number of the reference address |
Example request
$ curl 'https://api.geoplanning.net/pois/closest?country=BE&postcode=5100&locality=Naninne&street=Chauss%C3%A9e+de+marche&number=774' -i -H 'Content-Type: application/vnd.geoplanning-v3.0+json;charset=UTF-8' -H 'Accept: application/vnd.geoplanning-v3.0+json;charset=UTF-8'
Response structure
| Path | Type | Description |
|---|---|---|
|
|
Status code of the api |
|
|
The collection of points of interest |
|
|
The point of interest identifier |
|
|
The point of interest type |
|
|
The point of interest address |
|
|
The address identifier |
|
|
The longitude of the address |
|
|
The latitude of the address |
|
|
The country of the address |
|
|
the postcode of the address |
|
|
The locality of the address |
|
|
The street of the address |
|
|
The number of the address |
|
|
Tell whether the point of interest belongs to the resource of the authenticated user |
Example response
HTTP/1.1 200 OK
Content-Type: application/vnd.geoplanning-v3.0+json;charset=UTF-8
Content-Length: 815
{
"status" : {
"code" : 0
},
"pois" : [ {
"id" : 2,
"type" : "TECHNICIAN_HOME_ADDRESS",
"address" : {
"id" : 2,
"longitude" : 4.135209326041,
"latitude" : 50.6056181213651,
"country" : "BE",
"postcode" : "7090",
"locality" : "Braine-le-Comte",
"street" : "Rue des Pommiers",
"number" : "22"
},
"distance" : 59077.95073134161,
"yours" : false
}, {
"id" : 1,
"type" : "TECHNICIAN_HOME_ADDRESS",
"address" : {
"id" : 1,
"longitude" : 4.35251804920914,
"latitude" : 50.8766484007436,
"country" : "BE",
"postcode" : "1020",
"locality" : "Laken",
"street" : "Koningschapsstraat"
},
"distance" : 63928.52628462513,
"yours" : false
} ]
}
Listing closest pois by coordinate
A GET request will list 10 closest point of interest from a coordinate.
Request structure
| Parameter | Description |
|---|---|
|
The longitude coordinate of the reference point (WGS84 decimal) |
|
The latitude coordinate of the reference point (WGS84 decimal) |
Example request
$ curl 'https://api.geoplanning.net/pois/closest?longitude=4.9259030858176&latitude=50.4279474396788' -i -H 'Content-Type: application/vnd.geoplanning-v3.0+json;charset=UTF-8' -H 'Accept: application/vnd.geoplanning-v3.0+json;charset=UTF-8'
Response structure
| Path | Type | Description |
|---|---|---|
|
|
Status code of the api |
|
|
The collection of points of interest |
|
|
The point of interest identifier |
|
|
The point of interest type |
|
|
The point of interest address |
|
|
The address identifier |
|
|
The longitude of the address |
|
|
The latitude of the address |
|
|
The country of the address |
|
|
the postcode of the address |
|
|
The locality of the address |
|
|
The street of the address |
|
|
The number of the address |
|
|
Tell whether the point of interest belongs to the resource of the authenticated user |
Example response
HTTP/1.1 200 OK
Content-Type: application/vnd.geoplanning-v3.0+json;charset=UTF-8
Content-Length: 816
{
"status" : {
"code" : 0
},
"pois" : [ {
"id" : 2,
"type" : "TECHNICIAN_HOME_ADDRESS",
"address" : {
"id" : 2,
"longitude" : 4.135209326041,
"latitude" : 50.6056181213651,
"country" : "BE",
"postcode" : "7090",
"locality" : "Braine-le-Comte",
"street" : "Rue des Pommiers",
"number" : "22"
},
"distance" : 59459.799297068785,
"yours" : false
}, {
"id" : 1,
"type" : "TECHNICIAN_HOME_ADDRESS",
"address" : {
"id" : 1,
"longitude" : 4.35251804920914,
"latitude" : 50.8766484007436,
"country" : "BE",
"postcode" : "1020",
"locality" : "Laken",
"street" : "Koningschapsstraat"
},
"distance" : 64309.47335108264,
"yours" : false
} ]
}
Resources
Getting a resource
A GET request will retrieve a resource
By Geoplanning ID
| Parameter | Description |
|---|---|
|
Resource identifier |
By Reference
| Parameter | Description |
|---|---|
|
Resource reference |
|
Additional properties to add into response |
Example request
By Geoplanning ID
$ curl 'https://api.geoplanning.net/resources/2?fields=startAddress&fields=endAddress&fields=enumerables&fields=capacities' -i -H 'Content-Type: application/vnd.geoplanning-v3.0+json;charset=UTF-8' -H 'Accept: application/vnd.geoplanning-v3.0+json;charset=UTF-8'
By reference
$ curl 'https://api.geoplanning.net/resources?fid=GP-2&fields=startAddress&fields=endAddress&fields=enumerables&fields=capacities' -i -H 'Content-Type: application/vnd.geoplanning-v3.0+json;charset=UTF-8' -H 'Accept: application/vnd.geoplanning-v3.0+json;charset=UTF-8'
Response structure
| Path | Type | Description |
|---|---|---|
|
|
Response status data |
|
|
Status code of the api |
|
|
Resource’s data |
|
|
Geoplanning ID of the resource |
|
|
Reference ID of the resource |
|
|
Resource’s name |
|
|
Flag showing whether the resource in an internal or external resource of the company |
|
|
Resource' start location (where its rounds are starting) - see Sending an address to Geoplanning |
|
|
Resource’s end location (where its rounds are ending) - see Sending an address to Geoplanning |
|
|
Resource’s enumerable attributes |
|
|
Geoplanning ID of the enumerable attribute |
|
|
Reference ID of the enumrable attribute |
|
|
Enumerable attribute’s name |
|
|
Name of the enumerable attribute’s type |
|
|
Resource’s capacities |
|
|
Geoplanning identifier of the capacity |
|
|
The reference ID of the capacity’s quantifiable |
|
|
The name of the capacity’s quantifiable |
|
|
The unit of measure of the capacity’s quantifiable |
|
|
The maximum amount the resource can carry of this quantifiable |
|
|
The maximum amount the resource can carry of this quantifiable |
Example response
HTTP/1.1 200 OK
Content-Type: application/vnd.geoplanning-v3.0+json;charset=UTF-8
Content-Length: 1266
{
"status" : {
"code" : 0
},
"resource" : {
"id" : 2,
"fid" : "GP-2",
"name" : "John Doe",
"internal" : true,
"startAddress" : {
"id" : 1,
"longitude" : 4.35251804920914,
"latitude" : 50.8766484007436,
"country" : "BE",
"postcode" : "1020",
"locality" : "Laken",
"street" : "Koningschapsstraat"
},
"endAddress" : {
"id" : 2,
"longitude" : 4.135209326041,
"latitude" : 50.6056181213651,
"country" : "BE",
"postcode" : "7090",
"locality" : "Braine-le-Comte",
"street" : "Rue des Pommiers",
"number" : "22"
},
"enumerables" : [ {
"id" : 1,
"foreignId" : "GP-Language",
"name" : "Language",
"type" : "Skill"
}, {
"id" : 2,
"foreignId" : "GP-Work",
"name" : "Work",
"type" : "Skill"
} ],
"capacities" : [ {
"id" : 1,
"foreignId" : "GP-Quant1",
"name" : "Litre",
"unit" : "l",
"maxAmount" : 50.0,
"initAmount" : 10.0
}, {
"id" : 2,
"foreignId" : "GP-Quant1",
"name" : "Litre",
"unit" : "l",
"maxAmount" : 100.0,
"initAmount" : 20.0
} ]
}
}
Adding a resource
A POST request will create a new resource
Request structure
| Path | Type | Description | Constraints |
|---|---|---|---|
|
|
Reference ID of the resource |
|
|
|
Resource’s name |
Must not be null. Size must be between 1 and 100 inclusive |
|
|
Flag showing whether the resource in an internal or external resource of the company |
|
|
|
Resource' start location (where its rounds are starting) - see Sending an address to Geoplanning |
Must not be null |
|
|
Resource’s end location (where its rounds are ending) - see Sending an address to Geoplanning |
Must not be null |
|
|
Resource’s enumerable attributes |
|
|
|
Reference ID of the enumrable attribute |
Size must be between 0 and 20 inclusive |
|
|
Enumerable attribute’s name |
Must not be null |
|
|
Name of the enumerable attribute’s type |
Must not be null |
|
|
Resource’s capacities |
|
|
|
The reference ID of the capacity’s quantifiable |
Size must be between 0 and 50 inclusive |
|
|
The name of the capacity’s quantifiable |
Size must be between 0 and 50 inclusive |
|
|
The unit of measure of the capacity’s quantifiable |
Size must be between 0 and 50 inclusive |
|
|
The maximum amount the resource can carry of this quantifiable |
Must not be null |
|
|
The initial amount of this quantifiable the resource carries when it starts a round |
Must not be null |
Example request
$ curl 'https://api.geoplanning.net/resources' -i -X POST -H 'Content-Type: application/vnd.geoplanning-v3.0+json;charset=UTF-8' -H 'Accept: application/vnd.geoplanning-v3.0+json;charset=UTF-8' -d '{
"fid" : "T-789",
"name" : "John Doe",
"internal" : true,
"startAddress" : {
"longitude" : 4.88855612705365,
"latitude" : 50.4637474994767,
"country" : "BE",
"postcode" : "5100",
"locality" : "Jambes",
"street" : "Avenue du Prince de Liège",
"number" : "104"
},
"endAddress" : {
"longitude" : 4.88855612705365,
"latitude" : 50.4637474994767,
"country" : "BE",
"postcode" : "5100",
"locality" : "Jambes",
"street" : "Avenue du Prince de Liège",
"number" : "104"
},
"enumerables" : [ {
"id" : null,
"foreignId" : "E104",
"name" : "French",
"type" : "Languages"
}, {
"id" : null,
"foreignId" : "E105",
"name" : "Dutch",
"type" : "Languages"
} ],
"capacities" : [ {
"foreignId" : "Q859",
"name" : "Sand",
"unit" : "T",
"maxAmount" : 10,
"initAmount" : 10
} ]
}'
Response structure
| Path | Type | Description |
|---|---|---|
|
|
Response status data |
|
|
Status code of the api |
|
|
Geoplanning ID of the resource |
|
|
Reference ID of the resource |
|
|
Resource’s name |
|
|
Flag showing whether the resource in an internal or external resource of the company |
|
|
Resource' start location (where its rounds are starting) - see Sending an address to Geoplanning |
|
|
Resource’s end location (where its rounds are ending) - see Sending an address to Geoplanning |
|
|
Resource’s enumerable attributes |
|
|
Reference ID of the enumrable attribute |
|
|
Enumerable attribute’s name |
|
|
Name of the enumerable attribute’s type |
|
|
Resource’s capacities |
|
|
The reference ID of the capacity’s quantifiable |
|
|
The name of the capacity’s quantifiable |
|
|
The unit of measure of the capacity’s quantifiable |
|
|
The maximum amount the resource can carry of this quantifiable |
|
|
The initial amount of this quantifiable the resource carries when it starts a round |
Example response
HTTP/1.1 200 OK
Content-Type: application/vnd.geoplanning-v3.0+json;charset=UTF-8
Content-Length: 1161
{
"status" : {
"code" : 0
},
"resource" : {
"id" : 2,
"fid" : "T-789",
"name" : "John Doe",
"internal" : true,
"startAddress" : {
"id" : 41,
"longitude" : 4.88855612705365,
"latitude" : 50.4637474994767,
"country" : "BE",
"postcode" : "5100",
"locality" : "Jambes",
"street" : "Avenue du Prince de Liège",
"number" : "104"
},
"endAddress" : {
"id" : 41,
"longitude" : 4.88855612705365,
"latitude" : 50.4637474994767,
"country" : "BE",
"postcode" : "5100",
"locality" : "Jambes",
"street" : "Avenue du Prince de Liège",
"number" : "104"
},
"properties" : { },
"enumerables" : [ {
"id" : 2,
"foreignId" : "E105",
"name" : "Dutch",
"type" : "Languages"
}, {
"id" : 1,
"foreignId" : "E104",
"name" : "French",
"type" : "Languages"
} ],
"capacities" : [ {
"id" : 0,
"foreignId" : "Q859",
"name" : "Sand",
"unit" : "T",
"maxAmount" : 10.0,
"initAmount" : 10.0
} ]
}
}
Deleting a resource
A DELETE request will delete the resource.
A resource can only be deleted if all of it’s activities bave been completed.
Request structure
By Geoplanning ID
| Parameter | Description |
|---|---|
|
Resource identifier |
By reference ID
| Parameter | Description |
|---|---|
|
Resource’s reference |
Example request
By Geoplanning ID
$ curl 'https://api.geoplanning.net/resources/60' -i -X DELETE -H 'Content-Type: application/vnd.geoplanning-v3.0+json;charset=UTF-8' -H 'Accept: application/vnd.geoplanning-v3.0+json;charset=UTF-8'
By Reference ID
$ curl 'https://api.geoplanning.net/resources?fid=T-789' -i -X DELETE -H 'Content-Type: application/vnd.geoplanning-v3.0+json;charset=UTF-8' -H 'Accept: application/vnd.geoplanning-v3.0+json;charset=UTF-8'
Response structure
The server will respond with an HTTP status 204 : NO-CONTENT
Example response
HTTP/1.1 204 No Content
Updating a resource
A PUT request will update the resource.
Request structure
By Geoplanning ID
| Parameter | Description |
|---|---|
|
Activity identifier |
By reference ID
| Parameter | Description |
|---|---|
|
Activity’s reference |
Example request
By Geoplanning ID
$ curl 'https://api.geoplanning.net/resources/60' -i -X PUT -H 'Content-Type: application/vnd.geoplanning-v3.0+json;charset=UTF-8' -H 'Accept: application/vnd.geoplanning-v3.0+json;charset=UTF-8' -d '{
"fid" : "T-789",
"name" : "John Doe",
"internal" : false,
"startAddress" : {
"longitude" : 4.88855612705365,
"latitude" : 50.4637474994767,
"country" : "BE",
"postcode" : "5100",
"locality" : "Jambes",
"street" : "Avenue du Prince de Liège",
"number" : "104"
},
"endAddress" : {
"longitude" : 4.88855612705365,
"latitude" : 50.4637474994767,
"country" : "BE",
"postcode" : "5100",
"locality" : "Jambes",
"street" : "Avenue du Prince de Liège",
"number" : "104"
},
"enumerables" : [ {
"id" : null,
"foreignId" : "E104",
"name" : "French",
"type" : "Languages"
}, {
"id" : null,
"foreignId" : "E105",
"name" : "Dutch",
"type" : "Languages"
} ],
"capacities" : [ {
"foreignId" : "Q859",
"name" : "Sand",
"unit" : "T",
"maxAmount" : 10,
"initAmount" : 10
} ]
}'
By Reference ID
$ curl 'https://api.geoplanning.net/resources?fid=T-789' -i -X PUT -H 'Content-Type: application/vnd.geoplanning-v3.0+json;charset=UTF-8' -H 'Accept: application/vnd.geoplanning-v3.0+json;charset=UTF-8' -d '{
"fid" : "T-789",
"name" : "John Doe",
"internal" : false,
"startAddress" : {
"longitude" : 4.88855612705365,
"latitude" : 50.4637474994767,
"country" : "BE",
"postcode" : "5100",
"locality" : "Jambes",
"street" : "Avenue du Prince de Liège",
"number" : "104"
},
"endAddress" : {
"longitude" : 4.88855612705365,
"latitude" : 50.4637474994767,
"country" : "BE",
"postcode" : "5100",
"locality" : "Jambes",
"street" : "Avenue du Prince de Liège",
"number" : "104"
},
"enumerables" : [ {
"id" : null,
"foreignId" : "E104",
"name" : "French",
"type" : "Languages"
}, {
"id" : null,
"foreignId" : "E105",
"name" : "Dutch",
"type" : "Languages"
} ],
"capacities" : [ {
"foreignId" : "Q859",
"name" : "Sand",
"unit" : "T",
"maxAmount" : 10,
"initAmount" : 10
} ]
}'
Response structure
| Path | Type | Description |
|---|---|---|
|
|
Response status |
|
|
Response status code |
|
|
Resource’s Geoplanning ID |
|
|
Resource’s reference ID |
|
|
Resource’s name |
|
|
Flag showing whther the resource in an internal or external resource of the company |
|
|
Resource' start address (where every round it does will start) |
|
|
Resource’s end address (where every round it does will end) |
|
|
Resource’s enumerable attributes |
|
|
Special resource’s properties |
|
|
Resource’s capacities |
Example response
HTTP/1.1 200 OK
Content-Type: application/vnd.geoplanning-v3.0+json;charset=UTF-8
Content-Length: 1164
{
"status" : {
"code" : 0
},
"resource" : {
"id" : 60,
"fid" : "T-789",
"name" : "John Doe",
"internal" : true,
"startAddress" : {
"id" : 43,
"longitude" : 4.88855612705365,
"latitude" : 50.4637474994767,
"country" : "BE",
"postcode" : "5100",
"locality" : "Jambes",
"street" : "Avenue du Prince de Liège",
"number" : "104"
},
"endAddress" : {
"id" : 43,
"longitude" : 4.88855612705365,
"latitude" : 50.4637474994767,
"country" : "BE",
"postcode" : "5100",
"locality" : "Jambes",
"street" : "Avenue du Prince de Liège",
"number" : "104"
},
"properties" : { },
"enumerables" : [ {
"id" : 20,
"foreignId" : "E104",
"name" : "French",
"type" : "Languages"
}, {
"id" : 21,
"foreignId" : "E105",
"name" : "Dutch",
"type" : "Languages"
} ],
"capacities" : [ {
"id" : 4,
"foreignId" : "Q859",
"name" : "Sand",
"unit" : "T",
"maxAmount" : 10.0,
"initAmount" : 10.0
} ]
}
}
Rounds
Getting a round
A GET request will retrieve a round by identifier
Request structure
| Parameter | Description |
|---|---|
|
Round identifier |
Example request
$ curl 'https://api.geoplanning.net/rounds/1' -i -H 'Content-Type: application/vnd.geoplanning-v3.0+json;charset=UTF-8' -H 'Accept: application/vnd.geoplanning-v3.0+json;charset=UTF-8'
Response structure
| Path | Type | Description |
|---|---|---|
|
|
Status code of the api |
|
|
The recovered round |
|
|
The round identifier |
|
|
The start date of the round |
|
|
The end date of the round |
|
|
The start address of the round |
|
|
The end address of the roundr |
|
|
The hashing key of the round. This key is unique |
|
|
The activities of the round |
Example response
HTTP/1.1 200 OK
Content-Type: application/vnd.geoplanning-v3.0+json;charset=UTF-8
Content-Length: 1863
{
"status" : {
"code" : 0
},
"round" : {
"id" : 1,
"startDate" : "2015-07-13T08:00:00.000Z",
"endDate" : "2015-07-13T16:00:00.000Z",
"startAddress" : {
"id" : 1,
"longitude" : 4.84935390546997,
"latitude" : 50.4730325596768,
"country" : "BE",
"postcode" : "5002",
"locality" : "Saint-Servais",
"street" : "Rue de Gembloux",
"number" : "110"
},
"endAddress" : {
"id" : 1,
"longitude" : 4.84935390546997,
"latitude" : 50.4730325596768,
"country" : "BE",
"postcode" : "5002",
"locality" : "Saint-Servais",
"street" : "Rue de Gembloux",
"number" : "110"
},
"hashKey" : "7b217d1d1cee59304911ff51885f7749",
"activities" : [ {
"subtype" : "assignment",
"id" : 1,
"computedStartDate" : "2015-07-13T09:48:34.000Z",
"computedEndDate" : "2015-07-13T10:08:34.000Z",
"status" : {
"id" : 1,
"name" : "Assigned",
"type" : "ASSIGNED",
"color" : "#E9CC29",
"byDefault" : true
},
"task" : {
"id" : 1,
"name" : "Sprimont Jean-Paul",
"foreignId" : "GP-1",
"duration" : 1200,
"dueDate" : "2015-07-13T14:00:00.000Z",
"description" : "Pas de description",
"creationDate" : "2015-07-10T12:07:39.657Z",
"contact" : {
"phoneNumber" : "",
"mobileNumber" : "",
"mail" : ""
},
"address" : {
"id" : 1,
"longitude" : 4.84935390546997,
"latitude" : 50.4730325596768,
"country" : "BE",
"postcode" : "5002",
"locality" : "Saint-Servais",
"street" : "Rue de Gembloux",
"number" : "110"
}
}
} ]
}
}
Listing rounds
A GET request will retrieve all available rounds by resource identifier and date
Request structure
| Parameter | Description |
|---|---|
|
Resource identifier |
Example request
$ curl 'https://api.geoplanning.net/rounds/resource/1?date=2015-07-13T00%3A00%3A00.000%2B02%3A00' -i -H 'Content-Type: application/vnd.geoplanning-v3.0+json;charset=UTF-8' -H 'Accept: application/vnd.geoplanning-v3.0+json;charset=UTF-8'
Response structure
| Path | Type | Description |
|---|---|---|
|
|
Status code of the api |
|
|
The recovered rounds |
|
|
The round identifier |
|
|
The start date of the round |
|
|
The end date of the round |
|
|
The start address of the round |
|
|
The end address of the roundr |
|
|
The hashing key of the round. This key is unique |
|
|
The activities of the round |
Example response
HTTP/1.1 200 OK
Content-Type: application/vnd.geoplanning-v3.0+json;charset=UTF-8
Content-Length: 1868
{
"status" : {
"code" : 0
},
"rounds" : [ {
"id" : 1,
"startDate" : "2015-07-13T08:00:00.000Z",
"endDate" : "2015-07-13T16:00:00.000Z",
"startAddress" : {
"id" : 1,
"longitude" : 4.84935390546997,
"latitude" : 50.4730325596768,
"country" : "BE",
"postcode" : "5002",
"locality" : "Saint-Servais",
"street" : "Rue de Gembloux",
"number" : "110"
},
"endAddress" : {
"id" : 1,
"longitude" : 4.84935390546997,
"latitude" : 50.4730325596768,
"country" : "BE",
"postcode" : "5002",
"locality" : "Saint-Servais",
"street" : "Rue de Gembloux",
"number" : "110"
},
"hashKey" : "7b217d1d1cee59304911ff51885f7749",
"activities" : [ {
"subtype" : "assignment",
"id" : 1,
"computedStartDate" : "2015-07-13T09:48:34.000Z",
"computedEndDate" : "2015-07-13T10:08:34.000Z",
"status" : {
"id" : 1,
"name" : "Assigned",
"type" : "ASSIGNED",
"color" : "#E9CC29",
"byDefault" : true
},
"task" : {
"id" : 1,
"name" : "Sprimont Jean-Paul",
"foreignId" : "GP-1",
"duration" : 1200,
"dueDate" : "2015-07-13T14:00:00.000Z",
"description" : "Pas de description",
"creationDate" : "2015-07-10T12:07:39.657Z",
"contact" : {
"phoneNumber" : "",
"mobileNumber" : "",
"mail" : ""
},
"address" : {
"id" : 1,
"longitude" : 4.84935390546997,
"latitude" : 50.4730325596768,
"country" : "BE",
"postcode" : "5002",
"locality" : "Saint-Servais",
"street" : "Rue de Gembloux",
"number" : "110"
}
}
} ]
} ]
}
Add round
A POST request will add round for a resource and for a day
Request structure
| Path | Type | Description | Constraints |
|---|---|---|---|
|
|
Date of the futur round |
|
|
|
Resource identifier of the futur round |
Example request
$ curl 'https://api.geoplanning.net/rounds' -i -X POST -H 'Content-Type: application/vnd.geoplanning-v3.0+json;charset=UTF-8' -H 'Accept: application/vnd.geoplanning-v3.0+json;charset=UTF-8' -d '{
"date" : "2016-06-03T00:00:00Z",
"resourceId" : 1
}'
Response structure
| Path | Type | Description |
|---|---|---|
|
|
Status code of the api |
|
|
The recovered round |
|
|
The round identifier |
|
|
The start date of the round |
|
|
The end date of the round |
|
|
The start address of the round |
|
|
The end address of the roundr |
|
|
The hashing key of the round. This key is unique |
|
|
The activities of the round |
Example response
HTTP/1.1 200 OK
Content-Type: application/vnd.geoplanning-v3.0+json;charset=UTF-8
Content-Length: 769
{
"status" : {
"code" : 0
},
"round" : {
"id" : 32,
"startDate" : "2016-06-03T06:00:00.000Z",
"endDate" : "2016-06-03T14:00:00.000Z",
"startAddress" : {
"id" : 1,
"longitude" : 4.35251804920914,
"latitude" : 50.8766484007436,
"country" : "BE",
"postcode" : "1020",
"locality" : "Laken",
"street" : "Koningschapsstraat"
},
"endAddress" : {
"id" : 2,
"longitude" : 4.135209326041,
"latitude" : 50.6056181213651,
"country" : "BE",
"postcode" : "7090",
"locality" : "Braine-le-Comte",
"street" : "Rue des Pommiers",
"number" : "22"
},
"hashKey" : "b37a499a38eecb53941f694fe6f7dcf3",
"activities" : [ ]
}
}
Close round
A PUT request will close round
Request structure
| Parameter | Description |
|---|---|
|
Round identifier |
Example request
$ curl 'https://api.geoplanning.net/rounds/1/close' -i -X PUT -H 'Content-Type: application/vnd.geoplanning-v3.0+json;charset=UTF-8' -H 'Accept: application/vnd.geoplanning-v3.0+json;charset=UTF-8'
Response structure
| Path | Type | Description |
|---|---|---|
|
|
Status code of the api |
|
|
The recovered round |
|
|
The round identifier |
|
|
The start date of the round |
|
|
The end date of the round |
|
|
The start address of the round |
|
|
The end address of the roundr |
|
|
The hashing key of the round. This key is unique |
|
|
The activities of the round |
Example response
HTTP/1.1 200 OK
Content-Type: application/vnd.geoplanning-v3.0+json;charset=UTF-8
Content-Length: 2114
{
"status" : {
"code" : 0
},
"round" : {
"id" : 1,
"startDate" : "2015-07-13T08:00:00.000Z",
"endDate" : "2015-07-13T16:00:00.000Z",
"startAddress" : {
"id" : 1,
"longitude" : 4.84935390546997,
"latitude" : 50.4730325596768,
"country" : "BE",
"postcode" : "5002",
"locality" : "Saint-Servais",
"street" : "Rue de Gembloux",
"number" : "110"
},
"endAddress" : {
"id" : 1,
"longitude" : 4.84935390546997,
"latitude" : 50.4730325596768,
"country" : "BE",
"postcode" : "5002",
"locality" : "Saint-Servais",
"street" : "Rue de Gembloux",
"number" : "110"
},
"hashKey" : "accc4fcf13b6d2df9573f800ae94a270",
"status" : "CLOSED",
"activities" : [ {
"subtype" : "assignment",
"id" : 1,
"computedStartDate" : "2015-07-13T08:00:00.000Z",
"computedEndDate" : "2015-07-13T08:20:00.000Z",
"actualStartDate" : "2015-07-13T11:59:59.000Z",
"actualEndDate" : "2015-07-13T12:00:00.000Z",
"status" : {
"id" : 2,
"name" : "Completed",
"type" : "COMPLETED",
"color" : "#E9CC29",
"byDefault" : true
},
"task" : {
"id" : 1,
"name" : "Sprimont Jean-Paul",
"foreignId" : "GP-1",
"duration" : 1200,
"dueDate" : "2015-07-13T14:00:00.000Z",
"description" : "Pas de description",
"creationDate" : "2015-07-10T12:07:39.657Z",
"contact" : {
"phoneNumber" : "",
"mobileNumber" : "",
"mail" : ""
},
"address" : {
"id" : 1,
"longitude" : 4.84935390546997,
"latitude" : 50.4730325596768,
"country" : "BE",
"postcode" : "5002",
"locality" : "Saint-Servais",
"street" : "Rue de Gembloux",
"number" : "110"
},
"properties" : { },
"enumerables" : [ ],
"orders" : [ ],
"openingHours" : [ ]
}
} ]
}
}
Users
Getting an user
A GET request will retrieve an user
Request structure
| Parameter | Description |
|---|---|
|
User identifier |
Example request
$ curl 'https://api.geoplanning.net/users/1?fields=roles' -i -H 'Content-Type: application/vnd.geoplanning-v3.0+json;charset=UTF-8' -H 'Accept: application/vnd.geoplanning-v3.0+json;charset=UTF-8'
Response structure
| Path | Type | Description |
|---|---|---|
|
|
Status code of the api |
|
|
The user object |
|
|
The user identifier |
|
|
The first name of the user |
|
|
The last name of the user |
|
|
The login of the user |
|
|
The resource identifier bound to the user |
|
|
The resource reference bound to the user |
|
|
All user roles |
Example response
HTTP/1.1 200 OK
Content-Type: application/vnd.geoplanning-v3.0+json;charset=UTF-8
Content-Length: 601
{
"status" : {
"code" : 0
},
"user" : {
"id" : 1,
"firstName" : "User",
"lastName" : "Demo",
"login" : "market",
"resourceId" : 1,
"resourceFid" : "MIP",
"roles" : [ "ROLE_IMPORTER_MGR", "ROLE_TASK_STATUS_MGR", "ROLE_USER", "ROLE_SIMULE", "ROLE_TASKTYPE_MGR", "ROLE_POI_MGR", "ROLE_ENUM_MGR", "ROLE_OPTIM", "ROLE_ADMIN", "ROLE_WEBSERVICE", "ROLE_MOBILE", "ROLE_TASK_MGR", "ROLE_ASSIGN", "ROLE_USER_MGR", "ROLE_CUST_MGR", "ROLE_REPORT", "ROLE_COMPANY_SETTINGS_MGR", "ROLE_TECH_SHIFT_MGR", "ROLE_QUANTI_MGR", "ROLE_DISPATCHING", "ROLE_TECH_MGR" ]
}
}
Listing users
A GET request will list all available users.
Request structure
| Parameter | Description |
|---|---|
|
Allow to retrieve users bound with resource. True to bound with resource, false otherwise. |
Example request
$ curl 'https://api.geoplanning.net/users?resourceBound=true' -i -H 'Content-Type: application/vnd.geoplanning-v3.0+json;charset=UTF-8' -H 'Accept: application/vnd.geoplanning-v3.0+json;charset=UTF-8'
Response structure
| Path | Type | Description |
|---|---|---|
|
|
Status code of the api |
|
|
The user object |
|
|
The user identifier |
|
|
The first name of the user |
|
|
The last name of the user |
|
|
The login of the user |
|
|
The resource identifier bound to the user |
|
|
The resource reference bound to the user |
Example response
HTTP/1.1 200 OK
Content-Type: application/vnd.geoplanning-v3.0+json;charset=UTF-8
Content-Length: 209
{
"status" : {
"code" : 0
},
"users" : [ {
"id" : 1,
"firstName" : "User",
"lastName" : "Demo",
"login" : "market",
"resourceId" : 1,
"resourceFid" : "MIP"
} ]
}
Customers
Add customer
A POST request will add a new customer
Request structure
| Path | Type | Description | Constraints |
|---|---|---|---|
|
|
Customer’s name |
Must not be null. Size must be between 0 and 150 inclusive |
|
|
Reference ID of the customer |
Size must be between 0 and 20 inclusive |
|
|
Customer’s email address |
Size must be between 0 and 50 inclusive |
|
|
Customer’s phone number |
Size must be between 0 and 25 inclusive |
|
|
Customer’s mobile phone number |
Size must be between 0 and 25 inclusive |
|
|
Customer’s address |
Must not be null |
|
|
ISO 3166-1 alpha-2 compliant country code |
Must not be null. Size must be between 0 and 2 inclusive |
|
|
Address’s postal (a.k.a. zip) code |
Must not be null. Size must be between 0 and 50 inclusive |
|
|
Address’s locality |
Must not be null. Size must be between 0 and 100 inclusive |
|
|
Address’s street |
Must not be null. Size must be between 0 and 100 inclusive |
|
|
Address’s house number |
Size must be between 0 and 50 inclusive |
|
|
Longitude of address’s location |
Must be at least -180. Must be at most 180 |
|
|
Latitude of address’s location |
Must be at least -90. Must be at most 90 |
|
|
Opening hours of the customer |
|
|
|
Day of the week this opening hour applies |
Must be at least 1. Must be at most 7. Must not be null |
|
|
Time at which this opening hour begins, as an amount of minutes from midnight. |
Must be at least 0. Must be at most 1439. Must not be null |
|
|
Time at which this opening hour ends, as an amount of minutes from midnight. |
Must be at least 0. Must be at most 1439. Must not be null |
Example request
$ curl 'https://api.geoplanning.net/customers' -i -X POST -H 'Content-Type: application/vnd.geoplanning-v3.0+json;charset=UTF-8' -H 'Accept: application/vnd.geoplanning-v3.0+json;charset=UTF-8' -d '{
"foreignId" : "654321",
"name" : "Athina H van Tienen",
"address" : {
"longitude" : 3.9002,
"latitude" : 50.6691,
"country" : "BE",
"postcode" : "7830",
"locality" : "Fouleng",
"street" : "Rue de Sy",
"number" : "258"
},
"mobileNumber" : "0477 23 30 98",
"telephoneNumber" : "0477 23 30 98",
"email" : "contact@van-tienen.be",
"openingHours" : [ {
"day" : 1,
"begin" : 480,
"end" : 960
}, {
"day" : 2,
"begin" : 480,
"end" : 960
}, {
"day" : 3,
"begin" : 480,
"end" : 960
}, {
"day" : 4,
"begin" : 480,
"end" : 960
}, {
"day" : 5,
"begin" : 480,
"end" : 960
}, {
"day" : 6,
"begin" : 480,
"end" : 960
}, {
"day" : 7,
"begin" : 480,
"end" : 960
} ]
}'
Response structure
| Path | Type | Description |
|---|---|---|
|
|
Response status data |
|
|
Status code of the api |
|
|
The customer’s Geoplanning ID |
|
|
The customer’s reference |
|
|
The customer’s name |
|
|
The customer’s e-mail address |
|
|
The customer’s phone number |
|
|
The customer’s mobile phone number |
|
|
The customer’s address data - see Sending an address to Geoplanning |
|
|
Address' Geoplanning ID |
|
|
Address' country iso2 code |
|
|
Address' postal code |
|
|
Address' locality name |
|
|
Address' street name |
|
|
Address' house number |
|
|
Address' longitude coordinate (WGS84 in decimal degree) |
|
|
Address' latitude (WGS84 in decimal degree) |
Example response
HTTP/1.1 200 OK
Content-Type: application/vnd.geoplanning-v3.0+json;charset=UTF-8
Content-Length: 511
{
"status" : {
"code" : 0
},
"customer" : {
"id" : 79,
"foreignId" : "654321",
"name" : "Athina H van Tienen",
"address" : {
"id" : 18,
"longitude" : 3.9002,
"latitude" : 50.6691,
"country" : "BE",
"postcode" : "7830",
"locality" : "Fouleng",
"street" : "Rue de Sy",
"number" : "258"
},
"mobileNumber" : "0477 23 30 98",
"telephoneNumber" : "0477 23 30 98",
"email" : "contact@van-tienen.be"
}
}
Retrieve a customer
A GET request will retrieve an existing customer
Request structure
By Geoplanning ID
| Parameter | Description |
|---|---|
|
Customer identifier |
By reference ID
| Parameter | Description |
|---|---|
|
Customer’s reference |
Example request
By Geoplanning ID
$ curl 'https://api.geoplanning.net/customers/60' -i -H 'Content-Type: application/vnd.geoplanning-v3.0+json;charset=UTF-8' -H 'Accept: application/vnd.geoplanning-v3.0+json;charset=UTF-8'
By Reference ID
$ curl 'https://api.geoplanning.net/customers/ref/C-546' -i -H 'Content-Type: application/vnd.geoplanning-v3.0+json;charset=UTF-8' -H 'Accept: application/vnd.geoplanning-v3.0+json;charset=UTF-8'
Response structure
| Path | Type | Description |
|---|---|---|
|
|
Response status data |
|
|
Status code of the api |
|
|
The customer’s Geoplanning ID |
|
|
The customer’s reference |
|
|
The customer’s name |
|
|
The customer’s e-mail address |
|
|
The customer’s phone number |
|
|
The customer’s mobile phone number |
|
|
The customer’s address data - see Sending an address to Geoplanning |
|
|
Address' Geoplanning ID |
|
|
Address' country iso2 code |
|
|
Address' postal code |
|
|
Address' locality name |
|
|
Address' street name |
|
|
Address' house number |
|
|
Address' longitude coordinate (WGS84 in decimal degree) |
|
|
Address' latitude (WGS84 in decimal degree) |
Example response
HTTP/1.1 200 OK
Content-Type: application/vnd.geoplanning-v3.0+json;charset=UTF-8
Content-Length: 510
{
"status" : {
"code" : 0
},
"customer" : {
"id" : 60,
"foreignId" : "C-546",
"name" : "Athina H van Tienen",
"address" : {
"id" : 40,
"longitude" : 3.9002,
"latitude" : 50.6691,
"country" : "BE",
"postcode" : "7830",
"locality" : "Fouleng",
"street" : "Rue de Sy",
"number" : "258"
},
"mobileNumber" : "0477 23 30 98",
"telephoneNumber" : "0477 23 30 98",
"email" : "contact@van-tienen.be"
}
}
Edit a customer
A PUT request will edit an existing customer
Request structure
By Geoplanning ID
Url
| Parameter | Description |
|---|---|
|
Customer identifier |
Body
| Path | Type | Description | Constraints |
|---|---|---|---|
|
|
Customer’s name |
Must not be null. Size must be between 0 and 150 inclusive |
|
|
Reference ID of the customer |
Size must be between 0 and 20 inclusive |
|
|
Customer’s email address |
Size must be between 0 and 50 inclusive |
|
|
Customer’s phone number |
Size must be between 0 and 25 inclusive |
|
|
Customer’s mobile phone number |
Size must be between 0 and 25 inclusive |
|
|
Customer’s address |
Must not be null |
|
|
ISO 3166-1 alpha-2 compliant country code |
Must not be null. Size must be between 0 and 2 inclusive |
|
|
Address’s postal (a.k.a. zip) code |
Must not be null. Size must be between 0 and 50 inclusive |
|
|
Address’s locality |
Must not be null. Size must be between 0 and 100 inclusive |
|
|
Address’s street |
Must not be null. Size must be between 0 and 100 inclusive |
|
|
Address’s house number |
Size must be between 0 and 50 inclusive |
|
|
Longitude of address’s location |
Must be at least -180. Must be at most 180 |
|
|
Latitude of address’s location |
Must be at least -90. Must be at most 90 |
|
|
Opening hours of the customer |
|
|
|
Day of the week this opening hour applies |
Must be at least 1. Must be at most 7. Must not be null |
|
|
Time at which this opening hour begins, as an amount of minutes from midnight. |
Must be at least 0. Must be at most 1439. Must not be null |
|
|
Time at which this opening hour ends, as an amount of minutes from midnight. |
Must be at least 0. Must be at most 1439. Must not be null |
By reference ID
Url
| Parameter | Description |
|---|---|
|
Customer’s reference |
Body
| Path | Type | Description | Constraints |
|---|---|---|---|
|
|
Customer’s name |
Must not be null. Size must be between 0 and 150 inclusive |
|
|
Reference ID of the customer |
Size must be between 0 and 20 inclusive |
|
|
Customer’s email address |
Size must be between 0 and 50 inclusive |
|
|
Customer’s phone number |
Size must be between 0 and 25 inclusive |
|
|
Customer’s mobile phone number |
Size must be between 0 and 25 inclusive |
|
|
Customer’s address |
Must not be null |
|
|
ISO 3166-1 alpha-2 compliant country code |
Must not be null. Size must be between 0 and 2 inclusive |
|
|
Address’s postal (a.k.a. zip) code |
Must not be null. Size must be between 0 and 50 inclusive |
|
|
Address’s locality |
Must not be null. Size must be between 0 and 100 inclusive |
|
|
Address’s street |
Must not be null. Size must be between 0 and 100 inclusive |
|
|
Address’s house number |
Size must be between 0 and 50 inclusive |
|
|
Longitude of address’s location |
Must be at least -180. Must be at most 180 |
|
|
Latitude of address’s location |
Must be at least -90. Must be at most 90 |
|
|
Opening hours of the customer |
|
|
|
Day of the week this opening hour applies |
Must be at least 1. Must be at most 7. Must not be null |
|
|
Time at which this opening hour begins, as an amount of minutes from midnight. |
Must be at least 0. Must be at most 1439. Must not be null |
|
|
Time at which this opening hour ends, as an amount of minutes from midnight. |
Must be at least 0. Must be at most 1439. Must not be null |
Example request
By Geoplanning ID
$ curl 'https://api.geoplanning.net/customers/60' -i -X PUT -H 'Content-Type: application/vnd.geoplanning-v3.0+json;charset=UTF-8' -H 'Accept: application/vnd.geoplanning-v3.0+json;charset=UTF-8' -d '{
"foreignId" : "C-546",
"name" : "Athina H van Tienen",
"address" : {
"longitude" : 3.9002,
"latitude" : 50.6691,
"country" : "BE",
"postcode" : "7830",
"locality" : "Fouleng",
"street" : "Rue de Sy",
"number" : "258"
},
"mobileNumber" : "0477 23 30 98",
"telephoneNumber" : "0477 23 30 98",
"email" : "contact@van-tienen.be",
"openingHours" : [ {
"day" : 1,
"begin" : 480,
"end" : 960
}, {
"day" : 2,
"begin" : 480,
"end" : 960
}, {
"day" : 3,
"begin" : 480,
"end" : 960
}, {
"day" : 4,
"begin" : 480,
"end" : 960
}, {
"day" : 5,
"begin" : 480,
"end" : 960
}, {
"day" : 6,
"begin" : 480,
"end" : 960
}, {
"day" : 7,
"begin" : 480,
"end" : 960
} ]
}'
By Reference ID
$ curl 'https://api.geoplanning.net/customers/ref/C-546' -i -X PUT -H 'Content-Type: application/vnd.geoplanning-v3.0+json;charset=UTF-8' -H 'Accept: application/vnd.geoplanning-v3.0+json;charset=UTF-8' -d '{
"foreignId" : "C-546",
"name" : "Athina H van Tienen",
"address" : {
"longitude" : 3.9002,
"latitude" : 50.6691,
"country" : "BE",
"postcode" : "7830",
"locality" : "Fouleng",
"street" : "Rue de Sy",
"number" : "258"
},
"mobileNumber" : "0477 23 30 98",
"telephoneNumber" : "0477 23 30 98",
"email" : "contact@van-tienen.be",
"openingHours" : [ {
"day" : 1,
"begin" : 480,
"end" : 960
}, {
"day" : 2,
"begin" : 480,
"end" : 960
}, {
"day" : 3,
"begin" : 480,
"end" : 960
}, {
"day" : 4,
"begin" : 480,
"end" : 960
}, {
"day" : 5,
"begin" : 480,
"end" : 960
}, {
"day" : 6,
"begin" : 480,
"end" : 960
}, {
"day" : 7,
"begin" : 480,
"end" : 960
} ]
}'
Response structure
| Path | Type | Description |
|---|---|---|
|
|
Response status data |
|
|
Status code of the api |
|
|
The customer’s Geoplanning ID |
|
|
The customer’s reference |
|
|
The customer’s name |
|
|
The customer’s e-mail address |
|
|
The customer’s phone number |
|
|
The customer’s mobile phone number |
|
|
The customer’s address data - see Sending an address to Geoplanning |
|
|
Address' Geoplanning ID |
|
|
Address' country iso2 code |
|
|
Address' postal code |
|
|
Address' locality name |
|
|
Address' street name |
|
|
Address' house number |
|
|
Address' longitude coordinate (WGS84 in decimal degree) |
|
|
Address' latitude (WGS84 in decimal degree) |
Example response
HTTP/1.1 200 OK
Content-Type: application/vnd.geoplanning-v3.0+json;charset=UTF-8
Content-Length: 510
{
"status" : {
"code" : 0
},
"customer" : {
"id" : 60,
"foreignId" : "C-546",
"name" : "Athina H van Tienen",
"address" : {
"id" : 40,
"longitude" : 3.9002,
"latitude" : 50.6691,
"country" : "BE",
"postcode" : "7830",
"locality" : "Fouleng",
"street" : "Rue de Sy",
"number" : "258"
},
"mobileNumber" : "0477 23 30 98",
"telephoneNumber" : "0477 23 30 98",
"email" : "contact@van-tienen.be"
}
}
Delete a customer
A DELETE request will remove an existing customer
Request structure
By Geoplanning ID
| Parameter | Description |
|---|---|
|
Customer identifier |
By reference ID
| Parameter | Description |
|---|---|
|
Customer’s reference |
Example request
By Geoplanning ID
$ curl 'https://api.geoplanning.net/customers/60' -i -X DELETE -H 'Content-Type: application/vnd.geoplanning-v3.0+json;charset=UTF-8' -H 'Accept: application/vnd.geoplanning-v3.0+json;charset=UTF-8'
By Reference ID
$ curl 'https://api.geoplanning.net/customers/ref/C-546' -i -X DELETE -H 'Content-Type: application/vnd.geoplanning-v3.0+json;charset=UTF-8' -H 'Accept: application/vnd.geoplanning-v3.0+json;charset=UTF-8'
Response structure
The server will respond with an HTTP status 204 : NO-CONTENT
Example response
HTTP/1.1 204 No Content
Content-Type: application/vnd.geoplanning-v3.0+json;charset=UTF-8
Content-Length: 4
null