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

GET

Used to retrieve a resource

POST

Used to create a new resource

PATCH

Used to update an existing resource, including partial updates

PUT

Used to update an existing resource, full updates only

DELETE

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

200 OK

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.

201 Created

The request has been fulfilled and resulted in a new resource being created.

204 No Content

The server successfully processed the request, but is not returning any content.

400 Bad Request

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).

404 Not Found

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

Authorization

Basic dGVzdDoxMjM=

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

Accept

application/vnd.geoplanning-v3.0+json

Content-Type

application/vnd.geoplanning-v3.0+json

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

Numeric

Longitude coordinate of the address as decimal degree

latitude

Numeric

Latitude coordinate of the address as decimal degree

country

String

Country code according the ISO-2 standard for country names

postcode

String

Postal code of the address

locality

String

Locality name of the address

street

String

Street name of the address

number

String

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
Table 1. /activity/{id}
Parameter Description

id

Activity identifier

By reference
Parameter Description

fid

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

Number

Status code of the api

activity

Object

The recovered activity

activity.subtype

String

The instance name of the activity

activity.id

Number

Activity’s Geoplanning ID

activity.computedStartDate

String

Theoretical start date of the activity, computed by Geoplanning

activity.computedEndDate

String

Theoretical end date of the activity, computed by Geoplanning

activity.round

Object

Reference of the activity’s round

activity.round.id

Number

Unique identifier for the round in Geoplanning

activity.round.resource

Object

Resource that performed the round

activity.round.resource.id

Number

Unique identifier for the resource in Geoplanning

activity.round.resource.foreignId

String

Reference from an external system

activity.round.person

Object

Person that performed the round (when resource and person are not the same)

activity.round.person.id

Number

Unique identifier for the person in Geoplanning

activity.round.person.foreignId

String

Reference from an external system

activity.status

Object

The status of the activity

activity.status.id

Number

Status' Geoplanning ID

activity.status.name

String

Status' name

activity.status.type

String

Status' meta type

activity.status.color

String

Status' icon color

activity.task.duration

Number

The activity duration

activity.task.creationDate

String

The creation date of the activity

activity.task.name

String

The activity name

activity.task.address

Object

The activity address

activity.task.address.id

Number

The address identifier

activity.task.address.longitude

Number

The longitude of the address

activity.task.address.latitude

Number

The latitude of the address

activity.task.address.country

String

The country of the address

activity.task.address.postcode

String

The postcode of the address

activity.task.address.locality

String

The locality of the address

activity.task.address.street

String

The street of the address

activity.task.address.number

String

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

subtype

String

Discriminator for the type of activity imported 'assignment' : to create a new task

only 'assignment' accepted.

type

Object

Activity’s type

type.fid

String

Type’s Reference ID

Size must be between 0 and 20 inclusive

type.name

String

Type’s name

Must not be null. Size must be between 1 and 100 inclusive

task

Object

The task’s data

Must not be null

task.name

String

The task’s name

Must not be null. Size must be between 1 and 100 inclusive

task.foreignId

String

The task’s reference

task.duration

Number

The task’s duration (integer amount of minutes)

Must not be null

task.dueDate

Number

The task’s due date (timestamp)

task.description

String

The task’s description

Size must be between 1 and 400 inclusive

task.contact

Object

The task’s contact data

task.contact.phoneNumber

String

The contact’s phone number

task.contact.mobileNumber

String

The contact’s mobile phone number

task.contact.mail

String

The contact’s e-mail address

task.address

Object

The task’s address data - see Sending an address to Geoplanning

Must not be null

task.customer

Object

The task’s customer data

task.customer.id

Number

The customer’s Geoplanning ID

task.appointment

Object

The task’s appointment data

task.appointment.start

Number

The appointment' start date (timestamp)

Must not be null

task.appointment.end

Number

The appointment’s end date (timestamp)

Must not be null

task.enumerables

Array

The task’s array of enumerables

task.enumerables[].foreignId

String

Reference ID of the enumrable attribute

Size must be between 0 and 20 inclusive

task.enumerables[].name

String

Enumerable attribute’s name

Must not be null

task.enumerables[].type

String

Name of the enumerable attribute’s type

The type must exist into Geoplanning.

task.orders

Array

The task’s array of orders

task.orders[].foreignId

String

The foreignId of the order’s product

Size must be between 0 and 50 inclusive

task.orders[].name

String

The name of the order’s product

Must not be null

task.orders[].unit

String

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

task.orders[].amount

Number

The amount of order’s product

Must not be null

task.openingHours

Array

The task’s array of opening hours

task.openingHours[].weekDay

Number

Opening hour’s day of week (value from 0 to 6, 0 = Monday)

Must not be null

task.openingHours[].from

Number

Opening hour’s start time (as integer amount of minute from midnight. E.g.: 570 = 09:30 AM)

Must not be null

task.openingHours[].to

Number

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

status

Object

Response status data

status.code

Number

Status code of the api

activity

Object

Activity’s data

activity.subtype

String

Discriminator for the type of activity imported

activity.id

Number

Geoplanning ID of the activity

activity.status

Object

Assignment status of the activity

activity.status.id

Number

Geoplanning ID of the status

activity.status.fid

String

Reference code of the status

activity.status.name

String

Name of the status

activity.status.type

String

Meta type of the status

activity.status.color

String

Color of the status

activity.status.byDefault

Boolean

Whether the status is the default status for the meta type

activity.type

Object

The activity type

activity.type.fid

String

The type’s reference

activity.type.name

String

The type’s name

activity.task

Object

The task’s data

activity.task.id

Number

The task’s id

activity.task.name

String

The task’s name

activity.task.foreignId

String

The task’s reference

activity.task.duration

Number

The task’s duration (integer amount of seconds)

activity.task.dueDate

String

The task’s due date (timestamp)

activity.task.description

String

The task’s description

activity.task.contact

Object

The task’s contact data

activity.task.contact.phoneNumber

String

The contact’s phone number

activity.task.contact.mobileNumber

String

The contact’s mobile phone number

activity.task.contact.mail

String

The contact’s e-mail address

activity.task.address

Object

The task’s address data

activity.task.address.longitude

Number

The address' longitude (as decimal degree)

activity.task.address.latitude

Number

The address' latitude (as decimal degree)

activity.task.address.country

String

The address' country

activity.task.address.postcode

String

The address' postcode

activity.task.address.locality

String

The address' locality

activity.task.address.street

String

The address' street

activity.task.address.number

String

The address' house number

activity.task.customer

Object

The task’s customer reference

activity.task.customer.id

Number

The customer’s Geoplanning ID

activity.task.appointment.

Object

The task’s appointment data

activity.task.appointment.start

String

The appointment' start date (timestamp)

activity.task.appointment.end

String

The appointment’s end date (timestamp)

activity.task.orders

Array

The task’s array of orders

activity.task.orders[].foreignId

String

The foreignId of the order’s product

activity.task.orders[].name

String

The name of the order’s product

activity.task.orders[].unit

String

The unit of the order’s product amount

activity.task.orders[].amount

Number

The amount of order’s product

activity.task.openingHours

Array

The array of task’s opening hours

activity.task.openingHours[].weekDay

Number

opening hour’s day of week (value from 0 to 6, 0 = Monday)

activity.task.openingHours[].from

Number

opening hour’s start time (as integer amount of minute from midnight. E.g.: 570 = 09:30 AM)

activity.task.openingHours[].to

Number

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
Table 2. /activity/{id}
Parameter Description

id

Activity identifier

By reference
Parameter Description

fid

Activity’s reference

Request payload structure

Task structure
Path Type Description Constraints

subtype

String

Discriminator for the type of activity updated 'assignment' : to update a task 'simpleactivity': to update a simple activity 'route': to update a route

type

Object

The activity type

type.fid

String

The type’s reference

Size must be between 0 and 20 inclusive

type.name

String

The type’s name

Must not be null. Size must be between 1 and 100 inclusive

task

Object

The task’s data

task.name

String

The task’s name

Must not be null. Size must be between 1 and 100 inclusive

task.foreignId

String

The task’s reference

task.duration

Number

The task’s duration (integer amount of minutes minutes)

Must not be null

task.dueDate

Number

The task’s due date (timestamp)

task.description

String

The task’s description

Size must be between 1 and 400 inclusive

task.contact

Object

The task’s contact data

task.contact.phoneNumber

String

The contact’s phone number

task.contact.mobileNumber

String

The contact’s mobile phone number

task.contact.mail

String

The contact’s e-mail address

task.address

Object

The task’s address data - see 'Sending an address to Geoplanning'

Must not be null

task.customer

Object

The task’s customer reference

task.customer.id

Number

The customer’s Geoplanning ID

task.appointment.

Object

The task’s appointment data

task.appointment.start

Number

The appointment' start date (timestamp)

Must not be null

task.appointment.end

Number

The appointment’s end date (timestamp)

Must not be null

task.orders

Array

The task’s array of orders

task.orders[].foreignId

String

The foreignId of the order’s product

Size must be between 0 and 50 inclusive

task.orders[].name

String

The name of the order’s product

Must not be null

task.orders[].unit

String

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

task.orders[].amount

Number

The amount of order’s product

Must not be null

task.openingHours

Array

The array of task’s opening hours

task.openingHours[].weekDay

Number

opening hour’s day of week (value from 0 to 6, 0 = Monday)

Must not be null

task.openingHours[].from

Number

opening hour’s start time (as integer amount of minute from midnight. E.g.: 570 = 09:30 AM)

Must not be null

task.openingHours[].to

Number

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

subtype

String

Discriminator for the type of activity updated 'assignment' : to update a task 'simpleactivity': to update a simple activity

type

Object

The activity type

type.fid

String

The type’s reference

Size must be between 0 and 20 inclusive

type.name

String

The type’s name

Must not be null. Size must be between 1 and 100 inclusive

name

String

The activity’s name

foreignId

String

The activity’s reference code

description

String

The activity’s description

duration

Number

The activity’s duration (integer amount of minutes)

address

Object

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

status

Object

Response status data

status.code

Number

Status code of the api

activity

Object

Activity’s data

activity.subtype

String

Discriminator for the type of activity imported

activity.id

Number

Geoplanning ID of the activity

activity.status

Object

Assignment status of the activity

activity.status.id

Number

Geoplanning ID of the status

activity.status.fid

String

Reference code of the status

activity.status.name

String

Name of the status

activity.status.type

String

Meta type of the status

activity.status.color

String

Color of the status

activity.status.byDefault

Boolean

Whether the status is the default status for the meta type

activity.type

Object

The activity type

activity.type.fid

String

The type’s reference

activity.type.name

String

The type’s name

activity.computedStartDate

Number

The theoretical start date of the activity computed by Geoplanning (timestamp)

activity.computedEndDate

Number

The theoretical end date of the activity computed by Geoplanning (timestamp)

activity.actualStartDate

Number

The actual start date of the activity computed by Geoplanning (timestamp)

activity.actualEndDate

Number

The actual end date of the activity computed by Geoplanning (timestamp)

activity.round

Object

Reference to the activity’s round

activity.round.id

Number

Geoplanning ID of the round

activity.task

Object

The task’s data

activity.task.id

Number

The task’s id

activity.task.name

String

The task’s name

activity.task.foreignId

String

The task’s reference

activity.task.duration

Number

The task’s duration (integer amount of minutes minutes)

activity.task.dueDate

String

The task’s due date (timestamp)

activity.task.description

String

The task’s description

activity.task.contact

Object

The task’s contact data

activity.task.contact.phoneNumber

String

The contact’s phone number

activity.task.contact.mobileNumber

String

The contact’s mobile phone number

activity.task.contact.mail

String

The contact’s e-mail address

activity.task.address

Object

The task’s address data

activity.task.address.longitude

Number

The address' longitude (as decimal degree)

activity.task.address.latitude

Number

The address' latitude (as decimal degree)

activity.task.address.country

String

The address' country

activity.task.address.postcode

String

The address' postcode

activity.task.address.locality

String

The address' locality

activity.task.address.street

String

The address' street

activity.task.address.number

String

The address' house number

activity.task.customer

Object

The task’s customer reference

activity.task.customer.id

Number

The customer’s Geoplanning ID

activity.task.appointment.

Object

The task’s appointment data

activity.task.appointment.start

String

The appointment' start date (timestamp)

activity.task.appointment.end

String

The appointment’s end date (timestamp)

activity.task.orders

Array

The task’s array of orders

activity.task.orders[].foreignId

String

The foreignId of the order’s product

activity.task.orders[].name

String

The name of the order’s product

activity.task.orders[].unit

String

The unit of the order’s product amount

activity.task.orders[].amount

Number

The amount of order’s product

activity.task.openingHours

Array

The array of task’s opening hours

activity.task.openingHours[].weekDay

Number

opening hour’s day of week (value from 0 to 6, 0 = Monday)

activity.task.openingHours[].from

Number

opening hour’s start time (as integer amount of minute from midnight. E.g.: 570 = 09:30 AM)

activity.task.openingHours[].to

Number

opening hour’s end time (as integer amount of minute from midnight. E.g.: 1080 = 06:00 PM)

Simple activity response
Path Type Description

status

Object

Response status data

status.code

Number

Status code of the api

activity

Object

Activity’s data

activity.subtype

String

Discriminator for the type of activity imported

activity.id

Number

Geoplanning ID of the activity

activity.status

Object

Assignment status of the activity

activity.status.id

Number

Geoplanning ID of the status

activity.status.fid

String

Reference code of the status

activity.status.name

String

Name of the status

activity.status.type

String

Meta type of the status

activity.status.color

String

Color of the status

activity.status.byDefault

Boolean

Whether the status is the default status for the meta type

activity.type

Object

The activity type

activity.type.fid

String

The type’s reference

activity.type.name

String

The type’s name

activity.computedStartDate

Number

The theoretical start date of the activity computed by Geoplanning (timestamp)

activity.computedEndDate

Number

The theoretical end date of the activity computed by Geoplanning (timestamp)

activity.actualStartDate

Number

The actual start date of the activity computed by Geoplanning (timestamp)

activity.actualEndDate

Number

The actual end date of the activity computed by Geoplanning (timestamp)

activity.round

Object

Reference to the activity’s round

activity.round.id

Number

Geoplanning ID of the round

activity.duration

Number

The activity’s duration

activity.creationDate

String

activity’s creation date (timestamp)

activity.name

String

activity’s name

activity.description

String

activity’s description

activity.description

String

activity’s description

activity.address

Object

The activity’s address data

activity.address.longitude

Number

The address' longitude (as decimal degree)

activity.address.latitude

Number

The address' latitude (as decimal degree)

activity.address.country

String

The address' country

activity.address.postcode

String

The address' postcode

activity.address.locality

String

The address' locality

activity.address.street

String

The address' street

activity.address.number

String

The address' house number

activity.appointment

Object

The activity’s appointment

activity.appointment.id

Number

The appointment’s Geoplanning ID

activity.appointment.start

Number

The appointment’s start timestamp

activity.appointment.end

Number

The appointment’s end timestamp

activity.event

Object

Activity’s reference event

activity.event.id

Number

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
Table 3. /activity/{id}
Parameter Description

id

Activity identifier

By reference
Parameter Description

fid

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

Table 4. /activity/{id}/assign
Parameter Description

id

Activity Geoplanning identifier

Request payload structure

Path Type Description Constraints

resourceId

Number

Resource to which assign the activity

Must not be null

taskId

Number

The ID of the task to assign (Geoplanning ID)

Must not be null

assignDate

String

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

status

Object

Response status data

status.code

Number

Status code of the api

activity

Object

Activity data

activity.id

Number

Activity’s Geoplanning ID

activity.type

Object

Activity’s type

activity.status

Object

Activity’s status

activity.status.id

Number

Status' Geoplanning ID

activity.status.fid

String

Status' Reference ID

activity.status.name

String

Status' name

activity.status.type

String

Status' meta type

activity.status.color

String

Status' icon color

activity.status.byDefault

Boolean

Status' true if that status is the default status for it’s meta type

activity.subtype

String

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

activity.task

Object

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

Table 5. /activity/{id}/plan
Parameter Description

id

Activity Geoplanning identifier

Request payload structure

Path Type Description Constraints

round

Object

The target round of the action

Must not be null

round.id

Number

The round’s Geoplanning ID

Must not be null

round.hashKey

String

The round’s hashkey

Must be not null

date

String

The action’s date time (format: ISO-8601)

Must not be null

activityIndex

Number

Index where the activity should be inserted in the round (0 = first)

Must be at least 0. Must not be null

status

Object

Status to set when assigning the activity (must exists and have the appropriate meta type)

status.id

Number

Activity status' Geoplanning ID

status.fid

String

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

status

Object

Response status data

status.code

Number

Status code of the api

rounds

Array

List of rounds modified by the action

rounds[].id

Number

Round’s Geoplanning ID

rounds[].startDate

String

Theoretical start date of the round defined by the resource’s availability (format: ISO-8601)

rounds[].endDate

String

Theoretical end date of the round defined by the resource’s availability (format: ISO-8601)

rounds[].startAddress

Object

Round' departure location

rounds[].startAddress.id

Number

Address' Geoplanning ID

rounds[].startAddress.longitude

Number

Address' longitude coordinate (WGS84 in decimal degree)

rounds[].startAddress.latitude

Number

Address' latitude (WGS84 in decimal degree)

rounds[].startAddress.country

String

Address' country iso2 code

rounds[].startAddress.postcode

String

Address' postal code

rounds[].startAddress.locality

String

Address' locality name

rounds[].startAddress.street

String

Address' street name

rounds[].startAddress.number

String

Address' house number

rounds[].endAddress

Object

Round' arrival location

rounds[].endAddress.id

Number

Address' Geoplanning ID

rounds[].endAddress.longitude

Number

Address' longitude coordinate (WGS84 in decimal degree)

rounds[].endAddress.latitude

Number

Address' latitude (WGS84 in decimal degree)

rounds[].endAddress.country

String

Address' country iso2 code

rounds[].endAddress.postcode

String

Address' postal code

rounds[].endAddress.locality

String

Address' locality name

rounds[].endAddress.street

String

Address' street name

rounds[].endAddress.number

String

Address' house number

rounds[].hashKey

String

Round’s checksum to quickly control data integrity over changes

rounds[].activities

Array

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

Table 6. /activity/{id}/unassign
Parameter Description

id

Activity Geoplanning identifier

Request payload structure

Path Type Description Constraints

roundHash

String

(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

status

Object

Geoplanning respons status data

status.code

Number

Status code of the api

activity

Object

unassigned activity data

activity.id

Number

activity id

activity.type

Object

The activity type

activity.status

Object

Assignment status of the activity

activity.status.id

Number

Geoplanning ID of the status

activity.status.fid

String

Reference code of the status

activity.status.name

String

Name of the status

activity.status.type

String

Meta type of the status

activity.status.color

String

Color of the status

activity.status.byDefault

Boolean

Whether the status is the default status for the meta type

activity.subtype

String

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

activity.task

Object

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

Table 7. /activity/{id}/start
Parameter Description

id

Activity Geoplanning identifier

Request payload structure

Path Type Description Constraints

round.id

Number

The round identifier

Must not be null

round.hashKey

String

The hashing key of the round

status

Object

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

status.id

Number

Specify an activity status id to set this activity status on the activity after update.

Can be null if the 'fid' is specify

status.fid

String

Specify an activity status reference to set this activity status on the activity after update.

Can be null if the 'id' is specify

date

String

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

Number

Status code of the api

rounds

Array

List of rounds

rounds[].id

Number

The round identifier

rounds[].startDate

String

The start date of the round

rounds[].endDate

String

The end date of the round

rounds[].startAddress

Object

The start address of the round

rounds[].startAddress.id

Number

The address identifier

rounds[].startAddress.longitude

Number

The longitude of the address

rounds[].startAddress.latitude

Number

The latitude of the address

rounds[].startAddress.country

String

The country of the address

rounds[].startAddress.postcode

String

The postcode of the address

rounds[].startAddress.locality

String

The locality of the address

rounds[].startAddress.street

String

The street of the address

rounds[].startAddress.number

String

The number of the address

rounds[].endAddress

Object

The end address of the round

rounds[].endAddress.id

Number

The address identifier

rounds[].endAddress.longitude

Number

The longitude of the address

rounds[].endAddress.latitude

Number

The latitude of the address

rounds[].endAddress.country

String

The country of the address

rounds[].endAddress.postcode

String

The postcode of the address

rounds[].endAddress.locality

String

The locality of the address

rounds[].endAddress.street

String

The street of the address

rounds[].endAddress.number

String

The number of the address

rounds[].hashKey

String

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.

rounds[].activities

Array

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

Table 8. /activity/{id}/finish
Parameter Description

id

Activity Geoplanning identifier

Request payload structure

Path Type Description Constraints

round.id

Number

The round identifier

Must not be null

round.hashKey

String

The hashing key of the round

status

Object

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

status.id

Number

Specify an activity status id to set this activity status on the activity after update.

Can be null if the 'fid' is specify

status.fid

String

Specify an activity status reference to set this activity status on the activity after update.

Can be null if the 'id' is specify

date

String

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

Number

Status code of the api

rounds

Array

List of rounds

rounds[].id

Number

The round identifier

rounds[].startDate

String

The start date of the round

rounds[].endDate

String

The end date of the round

rounds[].startAddress

Object

The start address of the round

rounds[].startAddress.id

Number

The address identifier

rounds[].startAddress.longitude

Number

The longitude of the address

rounds[].startAddress.latitude

Number

The latitude of the address

rounds[].startAddress.country

String

The country of the address

rounds[].startAddress.postcode

String

The postcode of the address

rounds[].startAddress.locality

String

The locality of the address

rounds[].startAddress.street

String

The street of the address

rounds[].startAddress.number

String

The number of the address

rounds[].endAddress

Object

The end address of the round

rounds[].endAddress.id

Number

The address identifier

rounds[].endAddress.longitude

Number

The longitude of the address

rounds[].endAddress.latitude

Number

The latitude of the address

rounds[].endAddress.country

String

The country of the address

rounds[].endAddress.postcode

String

The postcode of the address

rounds[].endAddress.locality

String

The locality of the address

rounds[].endAddress.street

String

The street of the address

rounds[].endAddress.number

String

The number of the address

rounds[].hashKey

String

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.

rounds[].activities

Array

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

Table 9. /activity/{id}/rejectnowork
Parameter Description

id

Activity Geoplanning identifier

Request payload structure

Path Type Description Constraints

round.id

Number

The round identifier

Must not be null

round.hashKey

String

The hashing key of the round

status

Object

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

status.id

Number

Specify an activity status id to set this activity status on the activity after update.

Can be null if the 'fid' is specify

status.fid

String

Specify an activity status reference to set this activity status on the activity after update.

Can be null if the 'id' is specify

date

String

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

Number

Status code of the api

rounds

Array

List of rounds

rounds[].id

Number

The round identifier

rounds[].startDate

String

The start date of the round

rounds[].endDate

String

The end date of the round

rounds[].startAddress

Object

The start address of the round

rounds[].startAddress.id

Number

The address identifier

rounds[].startAddress.longitude

Number

The longitude of the address

rounds[].startAddress.latitude

Number

The latitude of the address

rounds[].startAddress.country

String

The country of the address

rounds[].startAddress.postcode

String

The postcode of the address

rounds[].startAddress.locality

String

The locality of the address

rounds[].startAddress.street

String

The street of the address

rounds[].startAddress.number

String

The number of the address

rounds[].endAddress

Object

The end address of the round

rounds[].endAddress.id

Number

The address identifier

rounds[].endAddress.longitude

Number

The longitude of the address

rounds[].endAddress.latitude

Number

The latitude of the address

rounds[].endAddress.country

String

The country of the address

rounds[].endAddress.postcode

String

The postcode of the address

rounds[].endAddress.locality

String

The locality of the address

rounds[].endAddress.street

String

The street of the address

rounds[].endAddress.number

String

The number of the address

rounds[].hashKey

String

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.

rounds[].activities

Array

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

Table 10. /activity/{id}/rejectwork
Parameter Description

id

Activity Geoplanning identifier

Request structure

Path Type Description Constraints

round.id

Number

The round identifier

Must not be null

round.hashKey

String

The hashing key of the round

status

Object

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

status.id

Number

Specify an activity status id to set this activity status on the activity after update.

Can be null if the 'fid' is specify

status.fid

String

Specify an activity status reference to set this activity status on the activity after update.

Can be null if the 'id' is specify

date

String

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

Number

Status code of the api

rounds

Array

List of rounds

rounds[].id

Number

The round identifier

rounds[].startDate

String

The start date of the round

rounds[].endDate

String

The end date of the round

rounds[].startAddress

Object

The start address of the round

rounds[].startAddress.id

Number

The address identifier

rounds[].startAddress.longitude

Number

The longitude of the address

rounds[].startAddress.latitude

Number

The latitude of the address

rounds[].startAddress.country

String

The country of the address

rounds[].startAddress.postcode

String

The postcode of the address

rounds[].startAddress.locality

String

The locality of the address

rounds[].startAddress.street

String

The street of the address

rounds[].startAddress.number

String

The number of the address

rounds[].endAddress

Object

The end address of the round

rounds[].endAddress.id

Number

The address identifier

rounds[].endAddress.longitude

Number

The longitude of the address

rounds[].endAddress.latitude

Number

The latitude of the address

rounds[].endAddress.country

String

The country of the address

rounds[].endAddress.postcode

String

The postcode of the address

rounds[].endAddress.locality

String

The locality of the address

rounds[].endAddress.street

String

The street of the address

rounds[].endAddress.number

String

The number of the address

rounds[].hashKey

String

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.

rounds[].activities

Array

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

Table 11. /activity/{id}/cancel
Parameter Description

id

Activity Geoplanning identifier

Request payload structure

Path Type Description Constraints

round

Object

The target round of the action

round.id

Number

The round’s Geoplanning ID

Must not be null

round.hashKey

String

The round’s hashkey

Must not be null

date

String

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

status

Object

Response status data

status.code

Number

Status code of the api

activity

Object

Activity data

activity.id

Number

Activity’s Geoplanning ID

activity.type

Object

Activity’s type

activity.status

Object

Activity’s status

activity.status.id

Number

Status' Geoplanning ID

activity.status.fid

String

Status' Reference ID

activity.status.name

String

Status' name

activity.status.type

String

Status' meta type

activity.status.color

String

Status' icon color

activity.status.byDefault

Boolean

Status' true if that status is the default status for it’s meta type

activity.subtype

String

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

activity.task

Object

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

Table 12. /activity/history/{id}
Parameter Description

id

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

Number

Status code of the api

activities

Array

The collection of activities

activities[].id

Number

The activity identifier

activities[].name

String

The activity name

activities[].foreignId

String

The activity reference

activities[].endDate

String

The actual end date of the activity

activities[].resourceName

String

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

Table 13. /activity/{id}/attachments
Parameter Description

id

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

status

Object

Response status data

status.code

Number

Status code of the api

status.message

String

Status message

attachments

Array

Activity’s attachments

attachments[].id

Number

Attachment’s Geoplanning ID

attachments[].taskId

Number

Task to which the attachment is linked (Geoplanning ID)

attachments[].userId

Number

Attachment’s owner (Geoplanning user ID)

attachments[].type

String

Type of attachment.

TEXT: the attachment is a comment

IMAGE: the attachment is a picture

SIGNATURE: the attachment is a signature

attachments[].creationDate

String

Date and time when the attachment was created (format: ISO 8601)

attachments[].text

String

Text body of the comment

attachments[].url

String

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

round.id

Number

The round identifier

Must not be null

round.hashKey

String

The hashing key of the round

status

Object

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

status.id

Number

Specify an activity status id to set this activity status on the activity after update.

Can be null if the 'fid' is specify

status.fid

String

Specify an activity status reference to set this activity status on the activity after update.

Can be null if the 'id' is specify

date

String

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

Number

Status code of the api

rounds

Array

List of rounds

rounds[].id

Number

The round identifier

rounds[].startDate

String

The start date of the round

rounds[].endDate

String

The end date of the round

rounds[].startAddress

Object

The start address of the round

rounds[].startAddress.id

Number

The address identifier

rounds[].startAddress.longitude

Number

The longitude of the address

rounds[].startAddress.latitude

Number

The latitude of the address

rounds[].startAddress.country

String

The country of the address

rounds[].startAddress.postcode

String

The postcode of the address

rounds[].startAddress.locality

String

The locality of the address

rounds[].startAddress.street

String

The street of the address

rounds[].startAddress.number

String

The number of the address

rounds[].endAddress

Object

The end address of the round

rounds[].endAddress.id

Number

The address identifier

rounds[].endAddress.longitude

Number

The longitude of the address

rounds[].endAddress.latitude

Number

The latitude of the address

rounds[].endAddress.country

String

The country of the address

rounds[].endAddress.postcode

String

The postcode of the address

rounds[].endAddress.locality

String

The locality of the address

rounds[].endAddress.street

String

The street of the address

rounds[].endAddress.number

String

The number of the address

rounds[].hashKey

String

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.

rounds[].activities

Array

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

Number

Status code of the api

activityStatus

Array

The collection of activity status

activityStatus[].id

Number

The activity status identifier

activityStatus[].fid

String

The activity status reference

activityStatus[].name

String

The activity status name

activityStatus[].type

String

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

activityStatus[].color

String

The activity status color

activityStatus[].byDefault

Boolean

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

status

Object

Response status data

status.code

Number

Status code of the api

activityTypes

Array

The collection of activity types

activityTypes[].id

Number

Type’s Geoplanning ID

activityTypes[].fid

String

Type’s Reference ID

activityTypes[].name

String

Type’s name

activityTypes[].icon

String

Type’s shape icon

activityTypes[].defaultDuration

Number

Type’s default duration. The activity with this type will last minimum the default duration value

activityTypes[].fixedDuration

Boolean

Tell whether the duration of the activity type may be changed

activityTypes[].metaType

String

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

activityTypes[].resourceActivityType

String

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

activityTypes[].roles

Array

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

activityTypes[].targetActivityMask

Number

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

Number

Status code of the api

userData

Object

The collection of activity status

userData.id

Number

The user identifier

userData.userLanguage

String

The user language

userData.firstName

String

The user first name

userData.lastName

String

The user last name

userData.resourceId

Number

The resource identifier bind to the user

userData.resourceFid

String

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

country

The country of the reference address

postcode

The postcode of the reference address

locality

The locality of the reference address

street

The street name of the reference address

number

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

Number

Status code of the api

pois

Array

The collection of points of interest

pois[].id

Number

The point of interest identifier

pois[].type

String

The point of interest type

pois[].address

Object

The point of interest address

pois[].address.id

Number

The address identifier

pois[].address.longitude

Number

The longitude of the address

pois[].address.latitude

Number

The latitude of the address

pois[].address.country

String

The country of the address

pois[].address.postcode

String

the postcode of the address

pois[].address.locality

String

The locality of the address

pois[].address.street

String

The street of the address

pois[].address.number

String

The number of the address

pois[].yours

Boolean

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

longitude

The longitude coordinate of the reference point (WGS84 decimal)

latitude

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

Number

Status code of the api

pois

Array

The collection of points of interest

pois[].id

Number

The point of interest identifier

pois[].type

String

The point of interest type

pois[].address

Object

The point of interest address

pois[].address.id

Number

The address identifier

pois[].address.longitude

Number

The longitude of the address

pois[].address.latitude

Number

The latitude of the address

pois[].address.country

String

The country of the address

pois[].address.postcode

String

the postcode of the address

pois[].address.locality

String

The locality of the address

pois[].address.street

String

The street of the address

pois[].address.number

String

The number of the address

pois[].yours

Boolean

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

Table 14. /resources/{id}
Parameter Description

id

Resource identifier

By Reference
Parameter Description

fid

Resource reference

fields

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

status

Object

Response status data

status.code

Number

Status code of the api

resource

Object

Resource’s data

resource.id

Number

Geoplanning ID of the resource

resource.fid

String

Reference ID of the resource

resource.name

String

Resource’s name

resource.internal

Boolean

Flag showing whether the resource in an internal or external resource of the company

resource.startAddress

Object

Resource' start location (where its rounds are starting) - see Sending an address to Geoplanning

resource.endAddress

Object

Resource’s end location (where its rounds are ending) - see Sending an address to Geoplanning

resource.enumerables

Array

Resource’s enumerable attributes

resource.enumerables[].id

Number

Geoplanning ID of the enumerable attribute

resource.enumerables[].foreignId

String

Reference ID of the enumrable attribute

resource.enumerables[].name

String

Enumerable attribute’s name

resource.enumerables[].type

String

Name of the enumerable attribute’s type

resource.capacities

Array

Resource’s capacities

resource.capacities[].id

Number

Geoplanning identifier of the capacity

resource.capacities[].foreignId

String

The reference ID of the capacity’s quantifiable

resource.capacities[].name

String

The name of the capacity’s quantifiable

resource.capacities[].unit

String

The unit of measure of the capacity’s quantifiable

resource.capacities[].maxAmount

Number

The maximum amount the resource can carry of this quantifiable

resource.capacities[].maxAmount

Number

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

fid

String

Reference ID of the resource

name

String

Resource’s name

Must not be null. Size must be between 1 and 100 inclusive

internal

Boolean

Flag showing whether the resource in an internal or external resource of the company

startAddress

Object

Resource' start location (where its rounds are starting) - see Sending an address to Geoplanning

Must not be null

endAddress

Object

Resource’s end location (where its rounds are ending) - see Sending an address to Geoplanning

Must not be null

enumerables

Array

Resource’s enumerable attributes

enumerables[].foreignId

String

Reference ID of the enumrable attribute

Size must be between 0 and 20 inclusive

enumerables[].name

String

Enumerable attribute’s name

Must not be null

enumerables[].type

String

Name of the enumerable attribute’s type

Must not be null

capacities

Array

Resource’s capacities

capacities[].foreignId

String

The reference ID of the capacity’s quantifiable

Size must be between 0 and 50 inclusive

capacities[].name

String

The name of the capacity’s quantifiable

Size must be between 0 and 50 inclusive

capacities[].unit

String

The unit of measure of the capacity’s quantifiable

Size must be between 0 and 50 inclusive

capacities[].maxAmount

Number

The maximum amount the resource can carry of this quantifiable

Must not be null

capacities[].initAmount

Number

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

status

Object

Response status data

status.code

Number

Status code of the api

resource.id

Number

Geoplanning ID of the resource

resource.fid

String

Reference ID of the resource

resource.name

String

Resource’s name

resource.internal

Boolean

Flag showing whether the resource in an internal or external resource of the company

resource.startAddress

Object

Resource' start location (where its rounds are starting) - see Sending an address to Geoplanning

resource.endAddress

Object

Resource’s end location (where its rounds are ending) - see Sending an address to Geoplanning

resource.enumerables

Array

Resource’s enumerable attributes

resource.enumerables[].foreignId

String

Reference ID of the enumrable attribute

resource.enumerables[].name

String

Enumerable attribute’s name

resource.enumerables[].type

String

Name of the enumerable attribute’s type

resource.capacities

Array

Resource’s capacities

resource.capacities[].foreignId

String

The reference ID of the capacity’s quantifiable

resource.capacities[].name

String

The name of the capacity’s quantifiable

resource.capacities[].unit

String

The unit of measure of the capacity’s quantifiable

resource.capacities[].maxAmount

Number

The maximum amount the resource can carry of this quantifiable

resource.capacities[].initAmount

Number

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
Table 15. /resources/{id}
Parameter Description

id

Resource identifier

By reference ID
Parameter Description

fid

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
Table 16. /resources/{id}
Parameter Description

id

Activity identifier

By reference ID
Parameter Description

fid

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

status

Object

Response status

status.code

Number

Response status code

resource.id

Number

Resource’s Geoplanning ID

resource.fid

String

Resource’s reference ID

resource.name

String

Resource’s name

resource.internal

Boolean

Flag showing whther the resource in an internal or external resource of the company

resource.startAddress

Object

Resource' start address (where every round it does will start)

resource.endAddress

Object

Resource’s end address (where every round it does will end)

resource.enumerables

Array

Resource’s enumerable attributes

resource.properties

Object

Special resource’s properties

resource.capacities

Array

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

Table 17. /rounds/{id}
Parameter Description

id

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

Number

Status code of the api

round

Object

The recovered round

round.id

Number

The round identifier

round.startDate

String

The start date of the round

round.endDate

String

The end date of the round

round.startAddress

Object

The start address of the round

round.endAddress

Object

The end address of the roundr

round.hashKey

String

The hashing key of the round. This key is unique

round.activities

Array

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

Table 18. /rounds/resource/{id}
Parameter Description

id

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

Number

Status code of the api

rounds

Array

The recovered rounds

rounds[].id

Number

The round identifier

rounds[].startDate

String

The start date of the round

rounds[].endDate

String

The end date of the round

rounds[].startAddress

Object

The start address of the round

rounds[].endAddress

Object

The end address of the roundr

rounds[].hashKey

String

The hashing key of the round. This key is unique

rounds[].activities

Array

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

String

Date of the futur round

resourceId

Number

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

Number

Status code of the api

round

Object

The recovered round

round.id

Number

The round identifier

round.startDate

String

The start date of the round

round.endDate

String

The end date of the round

round.startAddress

Object

The start address of the round

round.endAddress

Object

The end address of the roundr

round.hashKey

String

The hashing key of the round. This key is unique

round.activities

Array

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

Table 19. /rounds/{id}/close
Parameter Description

id

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

Number

Status code of the api

round

Object

The recovered round

round.id

Number

The round identifier

round.startDate

String

The start date of the round

round.endDate

String

The end date of the round

round.startAddress

Object

The start address of the round

round.endAddress

Object

The end address of the roundr

round.hashKey

String

The hashing key of the round. This key is unique

round.activities

Array

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

Table 20. /users/{id}
Parameter Description

id

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

Number

Status code of the api

user

Object

The user object

user.id

Number

The user identifier

user.firstName

String

The first name of the user

user.lastName

String

The last name of the user

user.login

String

The login of the user

user.resourceId

Number

The resource identifier bound to the user

user.resourceFid

String

The resource reference bound to the user

user.roles

Array

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

resourceBound

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

Number

Status code of the api

users

Array

The user object

users[].id

Number

The user identifier

users[].firstName

String

The first name of the user

users[].lastName

String

The last name of the user

users[].login

String

The login of the user

users[].resourceId

Number

The resource identifier bound to the user

users[].resourceFid

String

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

name

String

Customer’s name

Must not be null. Size must be between 0 and 150 inclusive

foreignId

String

Reference ID of the customer

Size must be between 0 and 20 inclusive

email

String

Customer’s email address

Size must be between 0 and 50 inclusive

telephoneNumber

String

Customer’s phone number

Size must be between 0 and 25 inclusive

mobileNumber

String

Customer’s mobile phone number

Size must be between 0 and 25 inclusive

address

Object

Customer’s address

Must not be null

address.country

String

ISO 3166-1 alpha-2 compliant country code

Must not be null. Size must be between 0 and 2 inclusive

address.postcode

String

Address’s postal (a.k.a. zip) code

Must not be null. Size must be between 0 and 50 inclusive

address.locality

String

Address’s locality

Must not be null. Size must be between 0 and 100 inclusive

address.street

String

Address’s street

Must not be null. Size must be between 0 and 100 inclusive

address.number

String

Address’s house number

Size must be between 0 and 50 inclusive

address.longitude

Number

Longitude of address’s location

Must be at least -180. Must be at most 180

address.latitude

Number

Latitude of address’s location

Must be at least -90. Must be at most 90

openingHours

Array

Opening hours of the customer

openingHours[].day

Number

Day of the week this opening hour applies

Must be at least 1. Must be at most 7. Must not be null

openingHours[].begin

Number

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

openingHours[].end

Number

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

status

Object

Response status data

status.code

Number

Status code of the api

customer.id

Number

The customer’s Geoplanning ID

customer.foreignId

String

The customer’s reference

customer.name

String

The customer’s name

customer.email

String

The customer’s e-mail address

customer.telephoneNumber

String

The customer’s phone number

customer.mobileNumber

String

The customer’s mobile phone number

customer.address

Object

The customer’s address data - see Sending an address to Geoplanning

customer.address.id

Number

Address' Geoplanning ID

customer.address.country

String

Address' country iso2 code

customer.address.postcode

String

Address' postal code

customer.address.locality

String

Address' locality name

customer.address.street

String

Address' street name

customer.address.number

String

Address' house number

customer.address.longitude

Number

Address' longitude coordinate (WGS84 in decimal degree)

customer.address.latitude

Number

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
Table 21. /customers/{id}
Parameter Description

id

Customer identifier

By reference ID
Table 22. /customers/ref/{ref}
Parameter Description

ref

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

status

Object

Response status data

status.code

Number

Status code of the api

customer.id

Number

The customer’s Geoplanning ID

customer.foreignId

String

The customer’s reference

customer.name

String

The customer’s name

customer.email

String

The customer’s e-mail address

customer.telephoneNumber

String

The customer’s phone number

customer.mobileNumber

String

The customer’s mobile phone number

customer.address

Object

The customer’s address data - see Sending an address to Geoplanning

customer.address.id

Number

Address' Geoplanning ID

customer.address.country

String

Address' country iso2 code

customer.address.postcode

String

Address' postal code

customer.address.locality

String

Address' locality name

customer.address.street

String

Address' street name

customer.address.number

String

Address' house number

customer.address.longitude

Number

Address' longitude coordinate (WGS84 in decimal degree)

customer.address.latitude

Number

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
Table 23. /customers/{id}
Parameter Description

id

Customer identifier

Body
Path Type Description Constraints

name

String

Customer’s name

Must not be null. Size must be between 0 and 150 inclusive

foreignId

String

Reference ID of the customer

Size must be between 0 and 20 inclusive

email

String

Customer’s email address

Size must be between 0 and 50 inclusive

telephoneNumber

String

Customer’s phone number

Size must be between 0 and 25 inclusive

mobileNumber

String

Customer’s mobile phone number

Size must be between 0 and 25 inclusive

address

Object

Customer’s address

Must not be null

address.country

String

ISO 3166-1 alpha-2 compliant country code

Must not be null. Size must be between 0 and 2 inclusive

address.postcode

String

Address’s postal (a.k.a. zip) code

Must not be null. Size must be between 0 and 50 inclusive

address.locality

String

Address’s locality

Must not be null. Size must be between 0 and 100 inclusive

address.street

String

Address’s street

Must not be null. Size must be between 0 and 100 inclusive

address.number

String

Address’s house number

Size must be between 0 and 50 inclusive

address.longitude

Number

Longitude of address’s location

Must be at least -180. Must be at most 180

address.latitude

Number

Latitude of address’s location

Must be at least -90. Must be at most 90

openingHours

Array

Opening hours of the customer

openingHours[].day

Number

Day of the week this opening hour applies

Must be at least 1. Must be at most 7. Must not be null

openingHours[].begin

Number

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

openingHours[].end

Number

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
Table 24. /customers/ref/{ref}
Parameter Description

ref

Customer’s reference

Body
Path Type Description Constraints

name

String

Customer’s name

Must not be null. Size must be between 0 and 150 inclusive

foreignId

String

Reference ID of the customer

Size must be between 0 and 20 inclusive

email

String

Customer’s email address

Size must be between 0 and 50 inclusive

telephoneNumber

String

Customer’s phone number

Size must be between 0 and 25 inclusive

mobileNumber

String

Customer’s mobile phone number

Size must be between 0 and 25 inclusive

address

Object

Customer’s address

Must not be null

address.country

String

ISO 3166-1 alpha-2 compliant country code

Must not be null. Size must be between 0 and 2 inclusive

address.postcode

String

Address’s postal (a.k.a. zip) code

Must not be null. Size must be between 0 and 50 inclusive

address.locality

String

Address’s locality

Must not be null. Size must be between 0 and 100 inclusive

address.street

String

Address’s street

Must not be null. Size must be between 0 and 100 inclusive

address.number

String

Address’s house number

Size must be between 0 and 50 inclusive

address.longitude

Number

Longitude of address’s location

Must be at least -180. Must be at most 180

address.latitude

Number

Latitude of address’s location

Must be at least -90. Must be at most 90

openingHours

Array

Opening hours of the customer

openingHours[].day

Number

Day of the week this opening hour applies

Must be at least 1. Must be at most 7. Must not be null

openingHours[].begin

Number

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

openingHours[].end

Number

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

status

Object

Response status data

status.code

Number

Status code of the api

customer.id

Number

The customer’s Geoplanning ID

customer.foreignId

String

The customer’s reference

customer.name

String

The customer’s name

customer.email

String

The customer’s e-mail address

customer.telephoneNumber

String

The customer’s phone number

customer.mobileNumber

String

The customer’s mobile phone number

customer.address

Object

The customer’s address data - see Sending an address to Geoplanning

customer.address.id

Number

Address' Geoplanning ID

customer.address.country

String

Address' country iso2 code

customer.address.postcode

String

Address' postal code

customer.address.locality

String

Address' locality name

customer.address.street

String

Address' street name

customer.address.number

String

Address' house number

customer.address.longitude

Number

Address' longitude coordinate (WGS84 in decimal degree)

customer.address.latitude

Number

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
Table 25. /customers/{id}
Parameter Description

id

Customer identifier

By reference ID
Table 26. /customers/ref/{ref}
Parameter Description

ref

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