Back to the GreenMile Documentation

Introduction

The GreenMile API is based on the Representational State Transfer (REST) ​ architecture using JavaScript Object Notation (JSON) for data transfer.

example.json
{
    "name": "Luke Skywalker",
    "age": 19,
    "status": true
}

It is noteworthy that for all responses, including error messages are also returned in JSON format.

We offer some services, such as /Route​, which allows you to enter various route-related information, containing ordering information, delivery planning, cost planning and more. The endpoint /Equipment​ allows you to enter detailed information about your equipment, such as the cost per minute, the carbon emission, the average amount of consumption of this type of equipment, the supported capacity. We also have the endpoint /Stop​ to define the stops that will be made within the route, which can be of various types, such as a stop for lunch, rest, delivery.

To make it easier to create routes, we recommend endpoint /RouteAndDependencies that allows to simply create routes, add drivers, besides inserting a list of orders and much more through a single request. To start developing with the GreenMile API, you first need to authenticate.

The data types used by our API are listed in the table below.

Table 1. Data Types
Type Bytes Range

Date

8 bytes

YYYYMMDD
YYYY: 0001 to 9999 (Year)
MM: 01 to 12 (Month)
DD: 01 to the last day of the applicable month (Day)

Char

2 bytes

A char represents a character.

String

N bytes

0 to 255 characters.

Boolean

8 bytes

True or false

Integer

4 bytes

-2,147,483,648 through 2,147,483,647

Float

8 bytes

-1.7976931348623157E+308 through -2.2250738585072014E-308

Double

8 bytes

2.2250738585072014E-308 through 1.7976931348623157E+308

BigDecimal

32 bytes

-10^38 +1 through 10^38 -1

Important Note: All dates must be provided in compliance with the ISO 8601 standard.

Authentication

Basic Authentication

This document explains how to perform basic authentication to make requests to GreenMile through the REST API.

To authenticate with the GreenMile API, the application needs to send some information about each HTTP request. The use of the API can be done through a Basic Authentication sent in the request Headers, this way the user who is performing that action will always be sent.

Requirements

Required Description

GreenMile Response Cookies

After any request, some cookies may be returned from the server. GreenMile uses these cookies to manage AutoScaling and guarantee High Availability.These cookies must be stored and sent in every subsequent request.

Authorization Header

An HTTP header containing the user’s credentials

GreenMile will use this information to know which user is sending the request. In addition, it is worth mentioning that it must be sent in all subsequent requests.

To send the user’s credentials, it will be necessary to perform the encode for base64. For example, the admin-green user with the pass-green password must be entered as follows:

user:password:

admin-green:pass-green

user:password base64 encode:

YWRtaW4tZ3JlZW46cGFzcy1ncmVlbg==

After that, just add Authorization to the Headers of the request. Remember to add "Basic " to the front of the encoding:

Basic Auth:

Basic YWRtaW4tZ3JlZW46cGFzcy1ncmVlbg==

The development languages already provide methods to perform the encoding, but if you want to perform a test you can use the website: https://www.base64encode.org/.

Example

HTTP Method: GET

Request Header:

--header 'Content-Type: application/json' \
--header 'Authorization: Basic YWRtaW4tZ3JlZW46cGFzcy1ncmVlbg==' \
Returned Information

Return code: 200 (HTTP_OK)

Return Body:

The request will return a list of organizations, with HTTP Status 200 OK. The following text is an example of JSON returned by a request passing the credentials correctly.

[
	{
		"id": 10000,
		"key": "DEFAULT",
		"description": "Default",
		"unitSystem": "METRIC"
	},
    {
		"id": 10001,
		"key": "ORG-001",
		"description": "ORGANIZATION-001",
		"unitSystem": "METRIC"
	},
    {
		"id": 10002,
		"key": "ORG-002",
		"description": "ORGANIZATION-002",
		"unitSystem": "METRIC"
	}
]

JWT - Token Authentication

Besides Basic Authentication, Greenmile allows Tokenized authentication to access the API. This authentication method is compliant with the JWT (Json Web Token) standard.

Definitions

Token

A token, also known as an "access token," is an encrypted string that is used to authenticate the user on the server. This token is provided when calling the login (/login) entry point and refreshing the token entry point (/Token).

Greenmile JWT Token structure

Here is a list of the Token Json attributes.

Attribute Description

access_token

is the token authenticated value to be used in the following API calls by adding the following header to the HTTP HEADER:
Authentication: Bearer <access_token>
where <access_token> is the value in the response without the quotes (“)

token_type

is the type of authentication, e.g. bearer as mentioned before.

scope

the scopes the token was authorized for.

jti

(JWT ID): Unique identifier (allows a token to be used only once)

iat

(issued at time): Time at which the JWT was issued in seconds since the epoch UTC.

expires_in

Expiry time in seconds since iat (how long will the token be valid.

Example:
{
  "access_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJmOnJkZW1pY2hlbGk6Z210bXByb290IiwiZGVmYXVsdEVuY29kaW5nIjoiVVRGXzgiLCJncm91cHMiOlsiU1lTQURNSU4iLCJBRE1JTiJdLCJsb2dpbiI6ImdtdG1wcm9vdCIsImNsaWVudF9pZCI6ImdtLXNlcnZlciIsImlzU3lzdGVtIjp0cnVlLCJvcmdhbml6YXRpb25JZCI6MCwic2NvcGUiOlsiZ20tbGl2ZTphbmFseXRpY3MiXSwibmFtZSI6IkdyZWVuTWlsZSBUZW1wIFJvb3QiLCJ1bml0U3lzdGVtIjoiTUVUUklDIiwiaWQiOjEwMDA2LCJleHAiOjE2ODg2NzIxNzAsImlhdCI6MTY4ODY3MTk5MCwidGVuYW50IjoicmRlbWljaGVsaSIsImp0aSI6IjQwYWNlM2pFbk5jclhQZ0Q3WXpvU2cwSHJWWT0ifQ.kbk6akR6loxpZW0FLCBXq3_9bWK0k2Hg7DWu8b7r2bw",
  "expires_in": 179,
  "scope":"gm-live:analytics",
  "jti":"40ace3jEnNcrXPgD7YzoSg0HrVY=",
  "iat":1688671990,
  "token_type":"bearer"
}

Example workflow to consume API

After logging in and obtaining the TOKEN, you will be able to use it for X seconds (expires_in) to access the API entry points.
To keep the Token alive, you must call the "/Token" entry point before the Token expires to refresh and obtain a new valid token that also will have an expiration time.

jwt_usage_diag.png

Use Cases

Next, three use cases will be developed and walked through step by step:

User Login

jwt_user_login.png

  1. To log in to the server, use the URL: https://sample.greenmile.com/login (replace sample.greenmile.com with the domain you have access to).

    1. The request must be sent using the POST method.

    2. You must provide the following headers:

      1. Content type: application/x-www-form-urlencoded; charset=utf-8 the data is sent as a form.

      2. Accept: application/json to indicate we want a JSON response.

      3. And a final custom header to indicate the server we are going to set the scope on.
        The value must be the following: Greenmile-Module: LIVE .

    3. The Body Payload consists of two parameters:

      1. j_username: the login username you are going to use to query the API.

      2. j_password: the password which j_username authenticates with.

Here is a curl call example:
curl 'https://sample.greenmile.com/login' \
      -X POST \

      -H 'Accept: application/json' \
      -H 'Greenmile-Module: LIVE' \
      -H 'Content-Type: application/x-www-form-urlencoded; charset=utf-8' \

      --data-raw 'j_username=USER_NAME&j_password=PASSWORD \

      --compressed;
  1. The server authenticates the username with the password provided.

    1. If the authentication fails, it will respond with a 403 HTTP Error and an error message.

    2. If the authentication is successful, it will respond with HTTP status 200 OK and a JSON payload.

  2. Successful login: relevant information is the following (sample in 3.c):

    1. analyticsToken: is a container for the authentication token.

      1. access_token: is the token string to be used later.

      2. expires_in: is the time in seconds until the token expires. You must refresh the token before this time runs out (See the Token Refresh Use Case).

      3. token_type: is the type of authentication (Bearer) to send in the header of future API calls along with the token. (e.g., “Authentication: Bearer eyJh55j4bGc…0Mqhe2h3DeT-E”)

    2. The other attributes are not relevant at the time of using the API.

    3. 200 OK sample response

{
  "analyticsToken": {
            "access_token": "eyJhbGciOiJIUzI1UiIsInR5cCI6Ikp … ePbjok26hUs6Mi2rfp6k2hAt6TWOHQ4Kjsn0MqDeT-E",
            "expires_in": 179,
            "iat": 1689189248,
            "jti": "cFPhX33ka2t0FCEkhYc6Zz0BRCo=",
            "scope": "live:analytics",
            "token_type": "bearer"
  },
  "jsessionid": "d5eb65f2-b2fc-42f9-88eb-479d91efeafd",
  "message": "user.login.success",
  "resourceKey": "user.login.success",
  "targetUrl": "https://sample.greenmile.com"
}
Token refresh

jwt_token_refresh.png

  1. Use the URL: https://sample.greenmile.com/Token to refresh the token.

    1. The request must be sent using the POST method.

    2. You must provide the following headers:

      1. Authorization: bearer TOKEN” where TOKEN is the value of access_token obtained in the User Login Use Case.

      2. Accept: application/json to indicate we want a JSON response

Here is a curl call example:
curl 'https://sample.greenmile.com/Token' \
      -X POST \
      -H "Accept: application/json" \
      -H "Authorization: bearer TOKEN";
  1. The server will validate the token provided, refresh the time out and return a new token.

    1. If the validation fails, it will respond with a 403 HTTP Error and an error message.

    2. If the validation is successful, it will respond with HTTP status 200 OK and a JSON payload.

  2. Successful refresh: a new Token is returned.

    1. access_token: this is the NEW Token string to be used from now on.

    2. expires_in: is the time in seconds until the token expires. Before this time runs out you must refresh the token again.

    3. token_type: this is the type of authentication (Bearer) to send in the Header of future API calls together with the token: (e.g., “Authentication: Bearer eyJh55j4bGc…0Mqhe2h3DeT-E”)

    4. 200 OK sample response:

{
  "access_token": "eyJhbGciOiJIUzI1UiIsInR5cCI6Ikp … DcmdkMD0ifQ.wj_pX55vRYXcZEIbGe_bZuRDCxozjGmeS8KfCoNA9rg",
  "expires_in": 179,
  "iat": 1689189248,
  "jti": "cFPhX33ka2t0FCEkhYc6Zz0BRCo=",
  "scope": "live:analytics",
  "token_type": "bearer"
}
Access Resource

jwt_access_resources.png

  1. Use the entry point you want to access (e.g., https://sample.greenmile.com/Organization).

    1. You must provide the following header:

      1. "Authorization: bearer TOKEN" where TOKEN is the value of access_token obtained in the user Login and later the one refreshed.

Here is a curl call example:
curl 'https://sample.greenmile.com/Organization' \
      -X GET \
      -H "Accept: application/json" \
      -H "Authorization: Bearer TOKEN";
  1. The server will validate the token provided.

    1. If the validation fails, it will respond with a 403 HTTP Error and an error message.

    2. If the validation is successful, it will respond with HTTP status 200 OK if the operation is successful and will return the requested payload.

  2. Continue with the client workflow.

HTTP methods

Use HTTP methods to map CRUD (create, retrieve, update, delete) operations to HTTP requests.

GET

GET requests are typically used to fetch data (such as data from a specific Organization).

POST

POST requests are usually used to create or update a record (such as adding new stops to the location). With that being said, some of our POST requests can be used to fetch data (like using Monet Criteria to search with criteria).

PUT

PUT requests are often used to update an existing record (such as updating some attributes associated with an Equipment).

PATCH

PATCH requests are typically used to modify an existing record (such as modifying a specific attribute associated with an Organization).

DELETE

DELETE requests are used to delete a record (such as deleting a system Driver).


HTTP Status Codes

GreenMile HTTP Status Codes

This page describes the list of available status codes returned by Greenmile API.
The available status codes returned are based on the following standards RFC 2616 and RFC 4918.

This section lists the available entities on Greenmile API.
The pages only define the entity specific information like descriptions and constraints.
For more detail on the generic web service method calls, refer to the Services.

Success Codes

200 - Success

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.

Error Codes

400 - Bad Request

The request is not properly formatted. For instance, this error may happen if a syntactically incorrect JSON is sent on the request body.

401 - Unauthorized

The request requires user authentication. The response MUST include a WWW-Authenticate header field containing a challenge applicable to the requested resource.
The client MAY repeat the request with a suitable Authorization header field.
If the request already included Authorization credentials, then the 401 response indicates that authorization has been refused for those credentials.
Refer to the <Login - Basic Authentication> service in order to obtain valid session information.

403 - Forbidden

The server understood the request but is refusing to fulfill it.
The authorization will not help and the request SHOULD NOT be repeated.
The proper Authorization needs to be assigned to the user before executing this request.

401 vs 403 Status Codes
The 401 status code is expected to be used for Unauthorized responses and the 403 would represent a Forbidden request according to the RFC 2616.
Unfortunately, for compatibility reasons with legacy systems, code 401 is used for Forbidden and 403 for unauthorized requests as documented.
Those status codes are subject to change in order to adopt the right standard on future API implementations.

409 - Conflict

The server is refusing to fulfill the request because the same request or another conflicting information was previously sent to the server.
For instance, this error may occur when if the Arrive Stop API method call is requested twice.
In this case, the second request will be ignored because the actual arrival attribute was already marked and the server will return this status code.

412 - Precondition Failed

The server is refusing to fulfill the request because some business rule is not satisfied.
For instance, this error may occur if the API method <Add Stop> is used in a route already completed.

422 - Unprocessable Entity

This status code means the server understands the content type of the request entity but was unable to process the contained instructions.
For example, this error condition may occur if a JSON request body contains well-formed (i.e., syntactically correct), but semantically erroneous, attribute information.

In order to fix the error, refer to the Entities pages which describe the proper use of the entity information.

500 - Internal Server Error

This error code represents an internal server error. This is caused by unexpected exceptions not treated by the server.

Error Message

When an error happens, the returns an Error Message response body, which is described as follow

Fields Type Nullable Description

errorMessages

List of ErrorMessage

False

When multiple errors occur on the request, an array of ErrorMessage is returned.

errorMessage

ErrorMessage (Deprecated)

False

When a single error occurs, this is the attribute returned and it contains am ErrorMessage JSON. As of

Table 2. ErrorMesseage Properties
Fields Type Nullable Description

resource

Resource

False

Resource of ErroMessege, where the message will specify the exception.

id

String

False

The entity’s auto-increment id.

date

Date

False

Date of entity’s creation.

The following example shows a JSON error response when a create organization request is executed without sending a required attribute "timeZone".

Error Message Example
{
  "errorMessages" : [ {
    "id" : "efbb87a9-8079-4d32-9e69-31fafc309f0d",
    "date" : "2023-10-19T13:29:26+0000",
    "resource" : {
      "key" : "Error for Organization with message: Field.Required for label: organization.timeZone; ",
      "value" : "Error for Organization with message: Field.Required for label: organization.timeZone; ",
      "parameters" : {
        "Server-Version" : "6.42-feature-925751-433219",
        "login" : "gmtmproot",
        "Greenmile-Version" : null,
        "user_id" : "10060"
      },
      "i18nMessage" : "Error for Organization with message: Field.Required for label: organization.timeZone; "
    }
  } ]
}
Table 3. Resource
Fields Type Nullable Description

stackTrace

String

True

stackTrace of resource.

key

String

False

resource key.

value

String

False

resource value.

parameters

String Map

True

resource parameters.

i18nMessage

String

False

resource i18nMessage.

Table 4. ErrorMessage Properties (Deprecated)
Fields Type Nullable Description

displayMessage

Boolean

True

Boolean informing if this message can be displayed.

model

Integer

True

Entity body which caused the error. For instance, if the error message is returned on an operation create a Location, the submitted Location JSON will be returned on this attribute. If the error is not related to any specific entity, this attribute will be null.

name

String

False

Error name. This attribute can have the specific error name or null if the error is not related to any business or validation rule.

label

String

True

Internationalized resource id, which represents the error message. This label information can be used to translate the error message to different languages other than English.

message

String

True

Translated error message.

detailedMessage

String

True

This attributes presents a text with the details about the error.

errorClass

String

True

The exception namespace. For example: com.greenmile.web.exception.RouteAlreadyExistsAndIsAlreadyStartedException

exception

Exception

True

The JSON for the error.

The following example shows a JSON error response when a create organization request is executed without sending a required attribute "timeZone".

Error Message Example (Deprecated)
{
  "errorMessage" : {
    "model" : {
      "id" : null,
      "creationDate" : null,
      "lastModificationDate" : null,
      "key" : "OrganizationDocumentation",
      "parentOrganization" : null,
      "description" : "Organization Rest Docs",
      "addressLine1" : null,
      "addressLine2" : null,
      "city" : null,
      "state" : null,
      "zipcode" : null,
      "district" : null,
      "country" : null,
      "taxid" : null,
      "preferedLocale" : {
        "id" : 10000,
        "parentLocale" : null,
        "key" : null,
        "language" : null,
        "country" : null,
        "description" : null,
        "dateFormat" : null,
        "timeFormat" : null,
        "currency" : null,
        "decimalSymbol" : null,
        "digitalGrouping" : null,
        "organizationId" : null
      },
      "timeZone" : null,
      "listenerOrganizations" : null,
      "unitSystem" : "METRIC",
      "dsgOrgId" : null,
      "dsgOrganizationId" : null
    },
    "name" : "timeZone",
    "label" : "organization.timeZone",
    "maxSize" : null,
    "message" : "Field.Required",
    "detailedMessage" : null,
    "errorClass" : "com.monet.evaluator.FieldValidationException",
    "displayMessage" : null,
    "exception" : null
  }
}

Monet Criteria

Monet Criteria is a generic syntax API to execute queries defining restrictions and projections.

Supported query params

criteria

Criteria is the query param that receives the projection attributes json and the number of results in the response.

Example

Request uri
/Route/restrictions?criteria=%7B%22filters%22%3A%20%5B%22key%22%2C%20%22baseLineArrival%22%2C%20%22actualDistance%22%2C%20%22stops.actualSequenceNum%22%2C%20%22stops.key%22%2C%20%22stops.orders.number%22%5D%2C%22firstResult%22%3A0%2C%22maxResults%22%3A2%7D

Criteria value is an encoded json with the projection inside filters attributes, this is the decoded attribute json with expected attributes and objects quantity in the response array.

Decoded criteria value
{
	"filters": [
		"key",
		"baseLineArrival",
		"actualDistance",
		"stops.actualSequenceNum",
		"stops.key",
		"stops.orders.number"
	],
	"firstResult": 0,
	"maxResults": 2
}

projectCriteria

Project criteria is a boolean attribute used to choose if it will project the attributes in the criteria, including attributes used in the request body to filter, or only the attributes in the criteria.

Request uri
/Route/restrictions?projectCriteria=true&criteria=%7B%22filters%22%3A%5B%22*%22%2C%22stops.*%22%2C%22stops.orders.*%22%2C%20%22stops.orders.lineItems.*%22%2C%20%22stops.orders.lineItems.sku.*%22%5D%7D

By default, this query param value is true, so if you call the /restrictions without using projectCriteria param the reponse json will return with values from criteria including filters attributes used on request body.

Example 1

Request using projectCriteria param true
POST /Route/restrictions?projectCriteria=true&criteria=%7B%22filters%22%3A%20%5B%22key%22%2C%20%22baseLineArrival%22%2C%20%22actualDistance%22%2C%20%22principalEquipment%22%2C%20%22stops.actualSequenceNum%22%2C%20%22stops.key%22%2C%20%22stops.orders.number%22%5D%2C%22firstResult%22%3A0%2C%22maxResults%22%3A2%7D HTTP/1.1
Content-Type: application/json; charset=UTF-8
Host: stone.greenmile.com

{
	"criteriaChain": [{
		"and": [{
			"gte": "2021-10-01",
			"attr": "date"
		}, {
			"lte": "2021-10-05",
			"attr": "date"
		}]
	}]
}
Response :
[{
		"id": 823247,
		"key": "1001113786",
        "date": "2021-10-01",
		"stops": [{
				"id": 6808093,
				"orders": [{
					"id": 9597803,
					"number": "000009206-0"
				}],
				"actualSequenceNum": 1
			},
			{
				"id": 6808095,
				"orders": [{
					"id": 9597805,
					"number": "000008789-0"
				}],
				"actualSequenceNum": 2
			},
			{
				"id": 6808104,
				"orders": [{
					"id": 9597815,
					"number": "000008877-0"
				}],
				"actualSequenceNum": 3
			}
		],
		"baseLineArrival": "0001-01-01T03:00:00+0000",
		"actualDistance": 572000.0
	},
	{
		"id": 826213,
		"key": "1001113246",
        "date": "2021-10-01",
		"stops": [{
			"id": 6834879,
			"orders": [{
				"id": 9633050,
				"number": "001725238-2"
			}],
			"actualSequenceNum": 1
		}],
		"baseLineArrival": "0001-01-01T03:00:00+0000",
		"actualDistance": 349000.0
	}
]

Example 2

Request without using projectCriteria param
POST /Route/restrictions?criteria=%7B%22filters%22%3A%20%5B%22key%22%2C%20%22baseLineArrival%22%2C%20%22actualDistance%22%2C%20%22principalEquipment%22%2C%20%22stops.actualSequenceNum%22%2C%20%22stops.key%22%2C%20%22stops.orders.number%22%5D%2C%22firstResult%22%3A0%2C%22maxResults%22%3A2%7D HTTP/1.1
Content-Type: application/json; charset=UTF-8
Host: stone.greenmile.com

{
	"criteriaChain": [{
		"and": [{
			"gte": "2021-10-01",
			"attr": "date"
		}, {
			"lte": "2021-10-05",
			"attr": "date"
		}]
	}]
}
Response :
[{
		"id": 823247,
		"key": "1001113786",
		"date": "2021-10-01",
		"stops": [{
				"id": 6808093,
				"orders": [{
					"id": 9597803,
					"number": "000009206-0"
				}],
				"actualSequenceNum": 1
			},
			{
				"id": 6808095,
				"orders": [{
					"id": 9597805,
					"number": "000008789-0"
				}],
				"actualSequenceNum": 2
			},
			{
				"id": 6808104,
				"orders": [{
					"id": 9597815,
					"number": "000008877-0"
				}],
				"actualSequenceNum": 3
			}
		],
		"baseLineArrival": "0001-01-01T03:00:00+0000",
		"actualDistance": 572000.0
	},
	{
		"id": 826213,
		"key": "1001113246",
		"date": "2021-10-01",
		"stops": [{
			"id": 6834879,
			"orders": [{
				"id": 9633050,
				"number": "001725238-2"
			}],
			"actualSequenceNum": 1
		}],
		"baseLineArrival": "0001-01-01T03:00:00+0000",
		"actualDistance": 349000.0
	}
]

As you can see on the response json, the date attribute is being returned, as it is an attribute used in the json body filter.

Example 3

Request using projectCriteria param false
POST /Route/restrictions?projectCriteria=false&criteria=%7B%22filters%22%3A%20%5B%22key%22%2C%20%22baseLineArrival%22%2C%20%22actualDistance%22%2C%20%22principalEquipment%22%2C%20%22stops.actualSequenceNum%22%2C%20%22stops.key%22%2C%20%22stops.orders.number%22%5D%2C%22firstResult%22%3A0%2C%22maxResults%22%3A2%7D HTTP/1.1
Content-Type: application/json; charset=UTF-8
Host: stone.greenmile.com

{
	"criteriaChain": [{
		"and": [{
			"gte": "2021-10-01",
			"attr": "date"
		}, {
			"lte": "2021-10-05",
			"attr": "date"
		}]
	}]
}
Response :
[{
		"id": 823247,
		"key": "1001113786",
		"stops": [{
				"id": 6808093,
				"orders": [{
					"id": 9597803,
					"number": "000009206-0"
				}],
				"actualSequenceNum": 1
			},
			{
				"id": 6808095,
				"orders": [{
					"id": 9597805,
					"number": "000008789-0"
				}],
				"actualSequenceNum": 2
			},
			{
				"id": 6808104,
				"orders": [{
					"id": 9597815,
					"number": "000008877-0"
				}],
				"actualSequenceNum": 3
			}
		],
		"baseLineArrival": "0001-01-01T03:00:00+0000",
		"actualDistance": 572000.0
	},
	{
		"id": 826213,
		"key": "1001113246",
		"stops": [{
			"id": 6834879,
			"orders": [{
				"id": 9633050,
				"number": "001725238-2"
			}],
			"actualSequenceNum": 1
		}],
		"baseLineArrival": "0001-01-01T03:00:00+0000",
		"actualDistance": 349000.0
	}
]

As you can see on the response json, the date attribute is not being returned, even though being an attribute used in the json body filter.

Supported operations

Operation Description

attr

Attribute/parameter to assert.

or

'Or' operation. Receives as a parameter a list of operations (MonetCriteria).

and

'And' operation. Receives as arguments a list of operations (MonetCriteria).

criteriaChain

Chained operations. Receives as arguments a list of operations (MonetCriteria).

gt

'Gt' operation (Greater Than). Receives as parameter a value to perform the operation "greater than" on top of the attribute "attr".

gte

'Gte' operation (Greater equal). Receives as parameter a value to perform the operation "greater equal" on top of the attribute "attr".

lt

'Lt' Operation (less than). Receives as parameter a value to perform the operation "less than" on top of the attribute "attr".

lte

'Lte' Operation (Less equal). Receives as parameter a value to perform the operation "less equal" on top of the attribute "attr".

eq

'Eq' Operation (Equal). Receives as a parameter value to execute the "equal" operation on the attribute "attr". String type attributes may use "matchMode".

neq

'Neq' Operation (not Equal). Receives as parameter a value to perform the operation "not equal" on top of the attribute "attr". String type attributes may use "matchMode".

isNull

'IsNull' Operation. Receives a boolean parameter true or false for asserting to the attribute specified .

in

'In' Operation. Receives as arguments a list of values to perform the operation "in" on the attribute "attr".

sort

Sort Operation. Receives as parameter a type "type" ("ASC", "DESC". Where "ASC" is default value) to make the ordering of attribute "attr".

matchMode

String comparison parameter. Possible values ("EXACT", "ANYWHERE", "START", "END")

Monet Criteria uses the same API calls made in the projections (Projections) GM. This API is the Request Criteria. Attributes listed in 'restrictions' URL query parameter is the query’s projections.

Single Criteria / Criteria Chain

Single Criteria

Performing simple operations, using only a single constraint. For this operation, we must use Single Criteria. For all requests, it is necessary to use the Encoder of the filters used.

Example 1

Below is an example of a query using an unique constraint, where we consult a Route that has its description attribute equal to "Doc".

Request
POST /Route/restrictions?criteria=%7B%27filters%27%3A%5B%27id%27%2C%27key%27%2C%27description%27%2C%27plannedDistance%27%5D%7D HTTP/1.1
Content-Type: application/json
Host: 10.76.25.108:8080
Content-Length: 64

{
  "attr" : "key",
  "eq" : "Doc",
  "matchMode" : "ANYWHERE"
}
Response
HTTP/1.1 200 OK
Content-Encoding: gzip
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Connection: keep-alive
X-Content-Type-Options: nosniff
Transfer-Encoding: chunked
Server-Version: 6.42-feature-925751-433219
Content-Type: application/json
Content-Length: 1451

[ {
  "id" : 10026,
  "creationDate" : "2023-10-19T13:27:44+0000",
  "key" : "ffd8d703-940c-411e-a_Doc",
  "date" : "2023-10-19",
  "description" : "Sample Route Doc",
  "origLatitude" : -3.734536,
  "origLongitude" : -38.46933,
  "destLatitude" : -3.734536,
  "destLongitude" : -38.46933,
  "firstStopIsOrigin" : false,
  "lastStopIsDestination" : false,
  "baseLineArrival" : "2023-10-19T13:27:44+0000",
  "baseLineDeparture" : "2023-10-19T13:27:44+0000",
  "plannedArrival" : "2023-10-19T13:27:44+0000",
  "plannedDeparture" : "2023-10-19T13:27:44+0000",
  "projectedArrival" : "2023-10-19T13:27:44+0000",
  "projectedDeparture" : "2023-10-19T13:27:44+0000",
  "baseLineDistance" : 0.0,
  "plannedDistance" : 0.0,
  "projectedDistance" : 0.0,
  "baseLineComplete" : "2023-10-19T13:27:44+0000",
  "plannedComplete" : "2023-10-19T13:27:44+0000",
  "projectedComplete" : "2023-10-19T13:27:44+0000",
  "baseLineCost" : 0,
  "plannedCost" : 0,
  "baseLineStart" : "2023-10-19T13:27:44+0000",
  "plannedStart" : "2023-10-19T13:27:44+0000",
  "projectedStart" : "2023-10-19T13:27:44+0000",
  "hasHelper" : false,
  "totalStops" : 0,
  "canceledStops" : 0,
  "undeliveredStops" : 0,
  "redeliveredStops" : 0,
  "actualDepartures" : 0,
  "status" : "NOT_STARTED",
  "plannedTravelTimeMinutes" : 0,
  "baselineTravelTimeMinutes" : 0,
  "plannedServiceTime" : 0,
  "baselineServiceTime" : 0,
  "hasPicture" : false,
  "hasGps" : false,
  "onRoute" : false
} ]

Example 2

This example returns all drivers that are on a specific route, from the Route ID.

Request:
POST /RouteDriver/restrictions?
Content-Type: application/json; charset=UTF-8
Host: stone.greenmile.com

{
	"attr" : "route.id",
	"eq" : 151016
}
Response :
[
    {
        "id" : 29471,
        "creationDate" : "2019-04-24T16:50:51+0000"
    },
    {
        "id" : 29472,
        "creationDate" : "2019-04-24T16:50:51+0000"
    }
]

Criteria Chain

Performing chained assertion operations.

Example 1

Below is an example of a query using chained restrictions consulting a Route with description attribute or key attribute equal to "Sample Route Doc" and having the Route date attribute between a few seconds.

Request
POST /Route/restrictions?criteria=%7B%27filters%27%3A%5B%27id%27%2C%27key%27%5D%7D HTTP/1.1
Content-Type: application/json
Host: 10.76.25.108:8080
Content-Length: 272

{
  "criteriaChain" : [ {
    "or" : [ {
      "attr" : "description",
      "eq" : "Sample Route Doc"
    } ],
    "and" : [ {
      "attr" : "date",
      "gte" : "2023-10-19T13:27:39Z"
    }, {
      "attr" : "date",
      "lte" : "2023-10-19T13:27:41Z"
    } ]
  } ]
}
Response
HTTP/1.1 200 OK
Content-Encoding: gzip
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Connection: keep-alive
X-Content-Type-Options: nosniff
Transfer-Encoding: chunked
Server-Version: 6.42-feature-925751-433219
Content-Type: application/json
Content-Length: 1456

[ {
  "id" : 10025,
  "creationDate" : "2023-10-19T13:27:41+0000",
  "key" : "88d911ca-b9e8-40a4-b_RouteDoc",
  "date" : "2023-10-19",
  "description" : "Sample Route Doc",
  "origLatitude" : -3.734536,
  "origLongitude" : -38.46933,
  "destLatitude" : -3.734536,
  "destLongitude" : -38.46933,
  "firstStopIsOrigin" : false,
  "lastStopIsDestination" : false,
  "baseLineArrival" : "2023-10-19T13:27:40+0000",
  "baseLineDeparture" : "2023-10-19T13:27:40+0000",
  "plannedArrival" : "2023-10-19T13:27:40+0000",
  "plannedDeparture" : "2023-10-19T13:27:40+0000",
  "projectedArrival" : "2023-10-19T13:27:40+0000",
  "projectedDeparture" : "2023-10-19T13:27:40+0000",
  "baseLineDistance" : 0.0,
  "plannedDistance" : 0.0,
  "projectedDistance" : 0.0,
  "baseLineComplete" : "2023-10-19T13:27:40+0000",
  "plannedComplete" : "2023-10-19T13:27:40+0000",
  "projectedComplete" : "2023-10-19T13:27:40+0000",
  "baseLineCost" : 0,
  "plannedCost" : 0,
  "baseLineStart" : "2023-10-19T13:27:40+0000",
  "plannedStart" : "2023-10-19T13:27:40+0000",
  "projectedStart" : "2023-10-19T13:27:40+0000",
  "hasHelper" : false,
  "totalStops" : 0,
  "canceledStops" : 0,
  "undeliveredStops" : 0,
  "redeliveredStops" : 0,
  "actualDepartures" : 0,
  "status" : "NOT_STARTED",
  "plannedTravelTimeMinutes" : 0,
  "baselineTravelTimeMinutes" : 0,
  "plannedServiceTime" : 0,
  "baselineServiceTime" : 0,
  "hasPicture" : false,
  "hasGps" : false,
  "onRoute" : false
} ]

Example 2

This example explains how to find a Route through a particular Transport key.

  • Define the expected attributes in the response.

Example:
{
    "filters": [
        "*",
        "stops.*",
        "stops.orders.*",
        "stops.orders.lineItems.*",
        "stops.orders.lineItems.sku.*"
    ]
}
Table 5. Legend
Value Description

*

all route attributes

stops.*

all stop attributes

stops.orders.*

all order attributes within stop

stops.orders.lineItems.*

all lineItem attributes within order

stops.orders.lineItems.sku.*

all attributes of Sku within lineItem

Use Encode in JSON
If you prefer, there are several sites that offer this service: Encoder/Decoder

Encoder Result:
%7B%22filters%22%3A%5B%22*%22%2C%22stops.*%22%2C%22stops.orders.*%22%2C%20%22stops.orders.lineItems.*%22%2C%20%22stops.orders.lineItems.sku.*%22%5D%7D
  • POST Using the criteriaChain using the Encoder Result

Request
POST /Route/restrictions?criteria=%7B%22filters%22%3A%5B%22*%22%2C%22stops.*%22%2C%22stops.orders.*%22%2C%20%22stops.orders.lineItems.*%22%2C%20%22stops.orders.lineItems.sku.*%22%5D%7D HTTP/1.1
Content-Type: application/json; charset=UTF-8
Host: stone.greenmile.com

{
    "criteriaChain": [
        {"and": [
        {
            "attr" : "stops.transport.key",
            "eq" : "10023"
        },
        {
            "attr" : "date",
            "gte" : "2019-04-20T01:00:00Z"
        },
        {
            "attr" : "date",
            "lte" : "2019-04-25T23:00:00Z"
        }]
    }]
}

Aggregate

The aggregate is responsible for performing basic functions such as Sum, Average, Minimum, and Maximum and the quantity of this object.

Supported operations

Function Description

SUM

Represents the sum function.

MIN

Represents the function of returning the smallest value.

MAX

Represents the function of returning the largest value.

AVG

Represents the average function.

COUNT

Represents the function of returning the count.

SUM

Request
POST /Route/aggregate HTTP/1.1
Content-Type: application/json
Host: 10.76.25.108:8080
Content-Length: 232

{
  "aggregate" : [ {
    "function" : "SUM",
    "attr" : [ "stops.orders.lineItems.totalPrice", "stops.orders.plannedSize1" ]
  } ],
  "criteriaChain" : [ {
    "and" : [ {
      "attr" : "id",
      "eq" : "10100"
    } ]
  } ]
}

MIN

Request
POST /Route/aggregate HTTP/1.1
Content-Type: application/json
Host: 10.76.25.108:8080
Content-Length: 232

{
  "aggregate" : [ {
    "function" : "MIN",
    "attr" : [ "stops.orders.lineItems.totalPrice", "stops.orders.plannedSize1" ]
  } ],
  "criteriaChain" : [ {
    "and" : [ {
      "attr" : "id",
      "eq" : "10080"
    } ]
  } ]
}

MAX

Request
POST /Route/aggregate HTTP/1.1
Content-Type: application/json
Host: 10.76.25.108:8080
Content-Length: 232

{
  "aggregate" : [ {
    "function" : "MAX",
    "attr" : [ "stops.orders.lineItems.totalPrice", "stops.orders.plannedSize1" ]
  } ],
  "criteriaChain" : [ {
    "and" : [ {
      "attr" : "id",
      "eq" : "10060"
    } ]
  } ]
}

AVG

Request
POST /Route/aggregate HTTP/1.1
Content-Type: application/json
Host: 10.76.25.108:8080
Content-Length: 232

{
  "aggregate" : [ {
    "function" : "AVG",
    "attr" : [ "stops.orders.lineItems.totalPrice", "stops.orders.plannedSize1" ]
  } ],
  "criteriaChain" : [ {
    "and" : [ {
      "attr" : "id",
      "eq" : "10120"
    } ]
  } ]
}

COUNT

Request
POST /Route/aggregate HTTP/1.1
Content-Type: application/json
Host: 10.76.25.108:8080
Content-Length: 234

{
  "aggregate" : [ {
    "function" : "COUNT",
    "attr" : [ "stops.orders.lineItems.totalPrice", "stops.orders.plannedSize1" ]
  } ],
  "criteriaChain" : [ {
    "and" : [ {
      "attr" : "id",
      "eq" : "10140"
    } ]
  } ]
}

Multiple functions

Request
POST /Route/aggregate HTTP/1.1
Content-Type: application/json
Host: 10.76.25.108:8080
Content-Length: 686

{
  "aggregate" : [ {
    "function" : "COUNT",
    "attr" : [ "stops.orders.lineItems.totalPrice", "stops.orders.plannedSize1" ]
  }, {
    "function" : "SUM",
    "attr" : [ "stops.orders.lineItems.totalPrice", "stops.orders.plannedSize1" ]
  }, {
    "function" : "MAX",
    "attr" : [ "stops.orders.lineItems.totalPrice", "stops.orders.plannedSize1" ]
  }, {
    "function" : "MIN",
    "attr" : [ "stops.orders.lineItems.totalPrice", "stops.orders.plannedSize1" ]
  }, {
    "function" : "AVG",
    "attr" : [ "stops.orders.lineItems.totalPrice", "stops.orders.plannedSize1" ]
  } ],
  "criteriaChain" : [ {
    "and" : [ {
      "attr" : "id",
      "eq" : "10040"
    } ]
  } ]
}

Services

Services to the API

The basic operations to any entity in our API are defined by a generic service, so any entity service is based on the same operations to Create, List, Find, Remove, Update by ID.

Table 6. Services
Service Description

Equipment Services

Extra Equipment entry points.

CRUD Services

Create,Retrieve, Update and Delete.

User Services

Create and Manage User Groups

Route Services

Add and Resequence Stops.

Geocoding Search

information about a Location such as Latitude and Longitude, Address street, City, etc.

Configuration Services

Create, Retrieve by Organization and Update.

Chat Services

Chat Service entry points.

Organization Services

Extra Organization entry points.

Location Services

Extra Location entry points.

Driver Services

Extra Driver entry points.

CRUD Services

Objective
This section details the available API method calls to execute operations CRUD operations: Create, Retrieve, Update and Delete.
Those methods are available for every entity on the system. To see the list of available entities, refer to the Entities.


Create

The HTTP request described below should be used to insert a new register. If a register with the same key is already saved, this request will update the current information. For instance, a request to create an Organization is executed twice, the first request will create a new register and the second request will update the previously included information. The natural keys are used to uniquely identify every entity on the system.

Request
POST /Organization HTTP/1.1
Content-Type: application/json
Host: 10.76.25.108:8080
Content-Length: 1450

{
  "id" : null,
  "creationDate" : null,
  "lastModificationDate" : null,
  "key" : "6aa4968c-13a2-4e43-b",
  "parentOrganization" : {
    "id" : 10181,
    "creationDate" : null,
    "lastModificationDate" : null,
    "key" : null,
    "parentOrganization" : null,
    "description" : null,
    "addressLine1" : null,
    "addressLine2" : null,
    "city" : null,
    "state" : null,
    "zipcode" : null,
    "district" : null,
    "country" : null,
    "taxid" : null,
    "preferedLocale" : null,
    "timeZone" : null,
    "listenerOrganizations" : null,
    "unitSystem" : null,
    "dsgOrgId" : null,
    "dsgOrganizationId" : null
  },
  "description" : "Organization Rest Docs Desc",
  "addressLine1" : null,
  "addressLine2" : null,
  "city" : "São Paulo",
  "state" : "São Paulo",
  "zipcode" : null,
  "district" : null,
  "country" : null,
  "taxid" : null,
  "preferedLocale" : {
    "id" : 10000,
    "parentLocale" : null,
    "key" : null,
    "language" : null,
    "country" : null,
    "description" : null,
    "dateFormat" : null,
    "timeFormat" : null,
    "currency" : null,
    "decimalSymbol" : null,
    "digitalGrouping" : null,
    "organizationId" : null
  },
  "timeZone" : {
    "id" : 10096,
    "description" : null,
    "rawOffsetMinutes" : null,
    "alias" : null,
    "timezoneName" : null
  },
  "listenerOrganizations" : null,
  "unitSystem" : "METRIC",
  "dsgOrgId" : null,
  "dsgOrganizationId" : null
}
Response
{
  "id" : 10182,
  "creationDate" : "2023-10-19T13:29:10+0000",
  "key" : "6aa4968c-13a2-4e43-b",
  "parentOrganization" : {
    "id" : 10181
  },
  "description" : "Organization Rest Docs Desc",
  "city" : "São Paulo",
  "state" : "São Paulo",
  "preferedLocale" : {
    "id" : 10000
  },
  "timeZone" : {
    "id" : 10096
  },
  "listenerOrganizations" : [ ],
  "unitSystem" : "METRIC"
}

The same entity is returned on the response body. The auto-generated attributes will be automatically set and returned. Notice that the id attribute is also returned and it can be used to execute future CRUD operations.


Batch Create

The following HTTP request should be used to execute a batch insert of entities.

Request
POST /Location/batch HTTP/1.1
Content-Type: application/json
Host: 10.76.25.108:8080
Content-Length: 1158

[ {
  "organization" : {
    "id" : 10185
  },
  "key" : "f70322cd-e2b8-4478-8_1",
  "locationType" : {
    "id" : 10162
  },
  "description" : "Location - Description Sample",
  "city" : "FortalezaDoc",
  "state" : "Ceará",
  "country" : "BR",
  "longitude" : -38.46933,
  "latitude" : -3.734536,
  "phone1" : "+55 (85) 9 9988-7766",
  "phone1Type" : "3",
  "email" : "example.greenmile@gogreen.com",
  "deliveryInstructions" : "Sample Delivery Instructions.",
  "deliveryRadius" : 20,
  "hasGeofence" : false,
  "creditLimit" : 1000,
  "legalName" : "Location's Legal Name"
}, {
  "organization" : {
    "id" : 10185
  },
  "key" : "f70322cd-e2b8-4478-8_2",
  "locationType" : {
    "id" : 10162
  },
  "description" : "Location - Description Sample",
  "city" : "FortalezaDoc",
  "state" : "Ceará",
  "country" : "BR",
  "longitude" : -38.46933,
  "latitude" : -3.734536,
  "phone1" : "+55 (85) 9 9988-7766",
  "phone1Type" : "3",
  "email" : "example.greenmile@gogreen.com",
  "deliveryInstructions" : "Sample Delivery Instructions.",
  "deliveryRadius" : 20,
  "hasGeofence" : false,
  "creditLimit" : 1000,
  "legalName" : "Location's Legal Name"
} ]
Response
true

The same entity is returned on the response body. The auto-generated attributes will be automatically set and returned. Notice that the id attribute is also returned and it can be used to execute future CRUD operations.


Retrieve By Id

The following HTTP method call describes how to retrieve a register using the id attribute.

Request
POST /Organization/restrictions?criteria=%7B%22filters%22%3A%5B%5D%7D HTTP/1.1
Content-Type: application/json
Host: 10.76.25.108:8080
Content-Length: 37

{
  "attr" : "id",
  "eq" : "10190"
}
Response
HTTP/1.1 200 OK
Content-Encoding: gzip
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Connection: keep-alive
X-Content-Type-Options: nosniff
Transfer-Encoding: chunked
Server-Version: 6.42-feature-925751-433219
Content-Type: application/json
Content-Length: 230

[ {
  "id" : 10190,
  "creationDate" : "2023-10-19T13:29:22+0000",
  "key" : "cbe3a12f-758e-4941-8",
  "description" : "Organization Rest Docs Desc",
  "city" : "São Paulo",
  "state" : "São Paulo",
  "unitSystem" : "METRIC"
} ]

List

Deprecated
This method call should be avoided and it is subject to be removed in future API versions.
Use List by Example or Filter with Pagination instead.

The following HTTPS request describes how to list all entities on the system.
This method SHOULD be used only to retrieve information from entities with a small number of registers in order to avoid performance issues.

Request
GET /Organization HTTP/1.1
Content-Type: application/json
Host: 10.76.25.108:8080
Response
HTTP/1.1 200 OK
Content-Encoding: gzip
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Connection: keep-alive
X-Content-Type-Options: nosniff
Transfer-Encoding: chunked
Server-Version: 6.42-feature-925751-433219
Content-Type: application/json
Content-Length: 790

[ {
  "id" : 10180,
  "creationDate" : "2023-10-19T13:29:03+0000",
  "key" : "OrganizationDocumentation",
  "description" : "Organization Rest Docs Desc",
  "city" : "São Paulo",
  "state" : "São Paulo",
  "unitSystem" : "METRIC"
}, {
  "id" : 10189,
  "creationDate" : "2023-10-19T13:29:21+0000",
  "key" : "dc0d3896-1e4f-4c55-b",
  "description" : "Organization Rest Docs Desc",
  "city" : "São Paulo",
  "state" : "São Paulo",
  "unitSystem" : "METRIC"
}, {
  "id" : 10022,
  "creationDate" : "2023-10-19T13:26:58+0000",
  "key" : "9e2ea5d9-6a6d-49e0-9_O",
  "description" : "Organization Rest Docs Desc",
  "city" : "São Paulo",
  "state" : "São Paulo",
  "unitSystem" : "METRIC"
}, {
  "id" : 10000,
  "key" : "DEFAULT",
  "description" : "Default",
  "unitSystem" : "METRIC"
} ]

List By Example

The HTTP request describes how to obtain a list of entities filtering the results based on attributes informed on the request body.

This JSON below represents a request body restricting the results to only the Locations having the attribute "city" equal to "Fortaleza".

Request
POST /Location/filter?criteria=%7B%22filters%22%3A%5B%5D%7D HTTP/1.1
Content-Type: application/json
Host: 10.76.25.108:8080
Content-Length: 29

{
  "city" : "FortalezaDoc"
}
Response
HTTP/1.1 200 OK
Content-Encoding: gzip
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Connection: keep-alive
X-Content-Type-Options: nosniff
Transfer-Encoding: chunked
Server-Version: 6.42-feature-925751-433219
Content-Type: application/json
Content-Length: 1900

[ {
  "id" : 10140,
  "creationDate" : "2023-10-19T13:29:04+0000",
  "key" : "OriginDoc",
  "description" : "Location - Description Sample",
  "city" : "FortalezaDoc",
  "state" : "Ceará",
  "country" : "BR",
  "longitude" : -38.46933,
  "latitude" : -3.734536,
  "phone1" : "+55 (85) 9 9988-7766",
  "phone1Type" : "3",
  "email" : "example.greenmile@gogreen.com",
  "deliveryInstructions" : "Sample Delivery Instructions.",
  "deliveryRadius" : 20,
  "deliveryDays" : "0",
  "enabled" : true,
  "hasGeofence" : false,
  "creditLimit" : 1000,
  "legalName" : "Location's Legal Name",
  "alternativeKey" : "OriginDoc"
}, {
  "id" : 10145,
  "creationDate" : "2023-10-19T13:29:18+0000",
  "key" : "b0a63271-c3d7-42d6-8_L1",
  "description" : "Location - Description Sample",
  "city" : "FortalezaDoc",
  "state" : "Ceará",
  "country" : "BR",
  "longitude" : -38.46933,
  "latitude" : -3.734536,
  "phone1" : "+55 (85) 9 9988-7766",
  "phone1Type" : "3",
  "email" : "example.greenmile@gogreen.com",
  "deliveryInstructions" : "Sample Delivery Instructions.",
  "deliveryRadius" : 20,
  "deliveryDays" : "0",
  "enabled" : true,
  "hasGeofence" : false,
  "creditLimit" : 1000,
  "legalName" : "Location's Legal Name",
  "alternativeKey" : "b0a63271-c3d7-42d6-8_L1"
}, {
  "id" : 10141,
  "creationDate" : "2023-10-19T13:29:04+0000",
  "key" : "DestinationDoc",
  "description" : "Location - Description Sample",
  "city" : "FortalezaDoc",
  "state" : "Ceará",
  "country" : "BR",
  "longitude" : -38.46933,
  "latitude" : -3.734536,
  "phone1" : "+55 (85) 9 9988-7766",
  "phone1Type" : "3",
  "email" : "example.greenmile@gogreen.com",
  "deliveryInstructions" : "Sample Delivery Instructions.",
  "deliveryRadius" : 20,
  "deliveryDays" : "0",
  "enabled" : true,
  "hasGeofence" : false,
  "creditLimit" : 1000,
  "legalName" : "Location's Legal Name",
  "alternativeKey" : "DestinationDoc"
} ]

Advanced filters and Pagination

The following document describes the JSON structure that can be sent in the server requests in order to indicate which entity attributes must be returned. This allows for better control of the amount of data returned by the server and optimization of the response time, avoiding unnecessary queries.

This is the overall JSON structure that must be sent:

criteria={
  "filters" : <Desired properties array>
}

The JSON above must be sent in the HTML request URL, like the following sample:

<Greenmile Server>/Route/filter?criteria={"filters":["id","organization.id"],"firstResult":0,"maxResults":10}

None of the JSON parameters is mandatory. The detailed definition and the default values are explained below:

Parameter: maxResults
This parameter can be specified to limit the amount of returned elements. By default, it returns 101 results.

Default: 101

Parameter: firstResult
This parameter indicates the first element of the query, and together with “maxResults”, this parameter can be used for paging data.

Default: 0

Parameter: filters
The parameter “filters" consists of an array of strings ( JSON ) that represents the elements that should be returned in the projection data. In the sub - topics below, the different ways to filter the results of a query are shown.


Including

We provide a parameter that is most common to be used to place the coordinates in EventLogs.

if the parameter is used, we take the coordinates and associate it with the EventLogs.

This is the overall JSON structure that must be sent:

/restrictions?criteria={
  "including": ["coordinate"]
}

The JSON above must be sent in the HTML request URL, like the following sample:

<Greenmile Server>/EventLog/restrictions?criteria={"including":["coodinate"]}

Update By Id

The following request describes how to update a register using the id attribute. A JSON object containing the entity attributes must be sent. Any attribute that is not sent in the body will be considered null. If any mandatory attribute is not sent a validation exception will be thrown.

Request
PUT /Organization/10186 HTTP/1.1
Content-Type: application/json
Host: 10.76.25.108:8080
Content-Length: 251

{
  "id" : 10186,
  "key" : "0a11bc77-22ee-4422-b",
  "description" : "New description",
  "city" : "São Paulo",
  "state" : "São Paulo",
  "preferedLocale" : {
    "id" : 10000
  },
  "timeZone" : {
    "id" : 10096
  },
  "unitSystem" : "METRIC"
}
Response
HTTP/1.1 200 OK
Content-Encoding: gzip
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Connection: keep-alive
X-Content-Type-Options: nosniff
Transfer-Encoding: chunked
Server-Version: 6.42-feature-925751-433219
Content-Type: application/json
Content-Length: 4

true

Remove

The following request removes a register.

Request
DELETE /Organization/10183 HTTP/1.1
Content-Type: application/json
Host: 10.76.25.108:8080
Response
HTTP/1.1 200 OK
Content-Encoding: gzip
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Connection: keep-alive
X-Content-Type-Options: nosniff
Transfer-Encoding: chunked
Server-Version: 6.42-feature-925751-433219
Content-Type: application/json
Content-Length: 4

true

Batch Remove

The following HTTP request should be used to execute a batch delete of entities.

Request
POST /Location/BatchDelete HTTP/1.1
Content-Type: application/json
Host: 10.76.25.108:8080
Content-Length: 30

[ 10147, 10148, 10149, 10150 ]
Response
HTTP/1.1 200 OK
Content-Encoding: gzip
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Connection: keep-alive
X-Content-Type-Options: nosniff
Transfer-Encoding: chunked
Server-Version: 6.42-feature-925751-433219
Content-Type: application/json
Content-Length: 4

true

Update Patch

The HTTP request described below should be used to insert a new registration or to update an existent register only with the attributes specified in the body. The natural keys are used to uniquely identify every entity on the system, so, if the entity has natural keys, you can identify it using them instead of id.

A request to create a new Location using this endpoint should be like this:

Request
PATCH /Location HTTP/1.1
Content-Type: application/json
Host: 10.76.25.108:8080
Content-Length: 573

{
  "organization" : {
    "key" : "0952dadd-ae15-4e22-a"
  },
  "key" : "0952dadd-ae15-4e22-a",
  "locationType" : {
    "organization" : {
      "key" : "0952dadd-ae15-4e22-a"
    },
    "key" : "0952dadd-ae15-4e22-a"
  },
  "locationOverrideTimeWindows" : [ {
    "openTime" : "11:00",
    "closeTime" : "18:00",
    "tw1Open" : "11:00",
    "tw1Close" : "18:00",
    "monday" : true,
    "tuesday" : false,
    "wednesday" : true,
    "thursday" : false,
    "friday" : true,
    "saturday" : true,
    "sunday" : false
  } ],
  "description" : "Location Description"
}
Response
HTTP/1.1 200 OK
Content-Encoding: gzip
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Connection: keep-alive
X-Content-Type-Options: nosniff
Transfer-Encoding: chunked
Server-Version: 6.42-feature-925751-433219
Content-Type: application/json
Content-Length: 1706

{
  "id" : 10142,
  "creationDate" : "2023-10-19T13:29:13+0000",
  "lastModifier" : {
    "id" : 10060,
    "login" : "gmtmproot",
    "creationDate" : "2023-10-19T13:29:13+0000"
  },
  "lastModificationDate" : "2023-10-19T13:29:13+0000",
  "organization" : {
    "id" : 10184,
    "key" : "0952dadd-ae15-4e22-a"
  },
  "key" : "0952dadd-ae15-4e22-a",
  "locationType" : {
    "id" : 10161,
    "organization" : {
      "id" : 10184,
      "key" : "0952dadd-ae15-4e22-a"
    },
    "key" : "0952dadd-ae15-4e22-a",
    "alternativeKey" : "0952dadd-ae15-4e22-a0952dadd-ae15-4e22-a"
  },
  "locationOverrideTimeWindows" : [ {
    "id" : 10000,
    "creationDate" : "2023-10-19T13:29:13+0000",
    "openTime" : "11:00",
    "closeTime" : "18:00",
    "tw1Open" : "11:00",
    "tw1Close" : "18:00",
    "monday" : true,
    "tuesday" : false,
    "wednesday" : true,
    "thursday" : false,
    "friday" : true,
    "saturday" : true,
    "sunday" : false,
    "location" : {
      "id" : 10142,
      "organization" : {
        "id" : 10184,
        "key" : "0952dadd-ae15-4e22-a"
      },
      "key" : "0952dadd-ae15-4e22-a",
      "locationType" : {
        "id" : 10161,
        "organization" : {
          "id" : 10184,
          "key" : "0952dadd-ae15-4e22-a"
        },
        "key" : "0952dadd-ae15-4e22-a",
        "alternativeKey" : "0952dadd-ae15-4e22-a0952dadd-ae15-4e22-a"
      },
      "alternativeKey" : "0952dadd-ae15-4e22-a0952dadd-ae15-4e22-a0952dadd-ae15-4e22-a0952dadd-ae15-4e22-a"
    }
  } ],
  "description" : "Location Description",
  "enabled" : true,
  "hasGeofence" : false,
  "alternativeKey" : "0952dadd-ae15-4e22-a0952dadd-ae15-4e22-a0952dadd-ae15-4e22-a0952dadd-ae15-4e22-a"
}

The same entity is returned on the response body. The auto-generated attributes will be automatically set and returned. Notice that the id attribute is also returned and it can be used to execute future CRUD operations.

Now let’s see if we want to change only the description of the Location we just created. The request body should be like this:

Request
PATCH /Location HTTP/1.1
Content-Type: application/json
Host: 10.76.25.108:8080
Content-Length: 287

{
  "organization" : {
    "key" : "c970374f-d0c1-41c2-a"
  },
  "key" : "c970374f-d0c1-41c2-a_L1",
  "locationType" : {
    "organization" : {
      "key" : "c970374f-d0c1-41c2-a"
    },
    "key" : "c970374f-d0c1-41c2-a_L1LocTypeDoc"
  },
  "description" : "NEW Location Description"
}
Response
HTTP/1.1 200 OK
Content-Encoding: gzip
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Connection: keep-alive
X-Content-Type-Options: nosniff
Transfer-Encoding: chunked
Server-Version: 6.42-feature-925751-433219
Content-Type: application/json
Content-Length: 2854

{
  "id" : 10146,
  "creationDate" : "2023-10-19T13:29:20+0000",
  "lastModifier" : {
    "id" : 10060,
    "login" : "gmtmproot",
    "creationDate" : "2023-10-19T13:29:20+0000"
  },
  "lastModificationDate" : "2023-10-19T13:29:20+0000",
  "organization" : {
    "id" : 10188,
    "creationDate" : "2023-10-19T13:29:19+0000",
    "key" : "c970374f-d0c1-41c2-a",
    "description" : "Organization Rest Docs Desc",
    "city" : "São Paulo",
    "state" : "São Paulo",
    "preferedLocale" : {
      "id" : 10000,
      "key" : "I18NLocale_en",
      "language" : "en",
      "description" : "English",
      "dateFormat" : "MM/dd/yyyy",
      "timeFormat" : "hh:mm a",
      "currency" : "US$",
      "decimalSymbol" : ".",
      "digitalGrouping" : ","
    },
    "timeZone" : {
      "id" : 10096,
      "description" : "GMT+0",
      "rawOffsetMinutes" : 0,
      "timezoneName" : "GMT+0"
    },
    "listenerOrganizations" : [ ],
    "unitSystem" : "METRIC"
  },
  "key" : "c970374f-d0c1-41c2-a_L1",
  "locationType" : {
    "id" : 10165,
    "creationDate" : "2023-10-19T13:29:19+0000",
    "organization" : {
      "id" : 10188,
      "creationDate" : "2023-10-19T13:29:19+0000",
      "key" : "c970374f-d0c1-41c2-a",
      "description" : "Organization Rest Docs Desc",
      "city" : "São Paulo",
      "state" : "São Paulo",
      "preferedLocale" : {
        "id" : 10000,
        "key" : "I18NLocale_en",
        "language" : "en",
        "description" : "English",
        "dateFormat" : "MM/dd/yyyy",
        "timeFormat" : "hh:mm a",
        "currency" : "US$",
        "decimalSymbol" : ".",
        "digitalGrouping" : ","
      },
      "timeZone" : {
        "id" : 10096,
        "description" : "GMT+0",
        "rawOffsetMinutes" : 0,
        "timezoneName" : "GMT+0"
      },
      "listenerOrganizations" : [ ],
      "unitSystem" : "METRIC"
    },
    "key" : "c970374f-d0c1-41c2-a_L1LocTypeDoc",
    "description" : "Sample LocationType",
    "showOnMobileCreate" : true,
    "enabled" : true,
    "alternativeKey" : "c970374f-d0c1-41c2-a_L1LocTypeDocc970374f-d0c1-41c2-a"
  },
  "locationOverrideTimeWindows" : [ ],
  "udfs" : [ ],
  "description" : "NEW Location Description",
  "city" : "FortalezaDoc",
  "state" : "Ceará",
  "country" : "BR",
  "longitude" : -38.46933,
  "latitude" : -3.734536,
  "phone1" : "+55 (85) 9 9988-7766",
  "phone1Type" : "3",
  "email" : "example.greenmile@gogreen.com",
  "deliveryInstructions" : "Sample Delivery Instructions.",
  "deliveryRadius" : 20,
  "deliveryDays" : "0",
  "consignees" : [ ],
  "allowedUsers" : [ ],
  "enabled" : true,
  "hasGeofence" : false,
  "creditLimit" : 1000,
  "legalName" : "Location's Legal Name",
  "locationPaymentMethods" : [ ],
  "alternativeKey" : "c970374f-d0c1-41c2-a_L1c970374f-d0c1-41c2-a_L1LocTypeDocc970374f-d0c1-41c2-ac970374f-d0c1-41c2-a"
}

Note that we have not identified the Location by its ID, but by it’s Natural Keys (Key, LocationType, Organization). Sending the request, only the attribute "description" will be updated.

User Services

All user services.

User

Represents a user, that can be a driver, system user, administrator etc…​

API Entity Name : User
Refer to the CRUD Services to see the details about the create, retrieve, update and delete API methods.

Beside its ID, a User is also uniquely identifiable by the key attribute.
Table 7. Attributes
Path Type Description Mandatory Natural ID

id

Integer(22)

The entity’s auto-increment id.(Version not found)

login

String(45)

User’s authentication login.(Version not found)

Yes

Yes

key

String(45)

The User’s Key.(Version not found)

Yes

name

String(105)

User’s name.(Version not found)

Yes

organization

Organization

Indicates the Organization that this user is related to.(Version not found)

Yes

unitSystem

UnitSystem

User’s unit system (Metric or Non-Metric).(Version not found)

Yes

preferedLocale

I18NLocale

Represents the locale for the user, like currency, language…​(Version not found)

Yes

email

String(45)

User’s email.(Version not found)

password

String(64)

User’s password.(Version not found)

enabled

Boolean

Indicates if that User is enabled or not.(Version not found)

timeZone

TimeZone

Indicates the User’s timezone.(Version not found)

udfs

[UserUDF]

A collection to User’s User Defined Fields.(Version not found)

ticketTypes

[TicketType]

A collection to User’s User Defined Fields.(Version not found)

organizations

[UserOrganization]

Organization which User’s from.(Version not found)

addressLine1

String(45)

Address 1.(Version not found)

addressLine2

String(45)

Address 2.(Version not found)

city

String(45)

User’s city.(Version not found)

state

String(4)

User’s state.(Version not found)

zipCode

String(15)

User’s zipcode.(Version not found)

district

String(45)

User’s district.(Version not found)

country

String(5)

User’s country.(Version not found)

longitude

Double(22)

User’s longitude.(Version not found)

latitude

Double(22)

User’s latitude.(Version not found)

userAllowedTags

[UserTag]

Represents a list of tags allowed for the user.(Version not found)

geocodingQuality

GeocodingQuality

Indicates the quality of the User’s geocoding.(Version not found)

phone1

String(30)

User’s first phone.(Version not found)

phone1Type

String(200)

User’s first phone type.(Version not found)

phone2

String(30)

User’s second phone.(Version not found)

phone2Type

String(200)

User’s second phone type.(Version not found)

restrictTags

Boolean

Represents a list of tags not allowed to the user.(Version not found)

leader

User

Represents the leader of the user.(Version not found)

subordinates

User

Represents a list of user subordinates.(Version not found)

restrictUsers

Boolean

Represents a list of restricted users for this user.(Version not found)

adpFileNumber

String(255)

The User’s ADP number.(Version not found)

ipRangeProfile

[IPRangeProfile]

Represents a list containing a range of IP available to the user.(Version not found)

groups

Group

The list of groups the user is part of.(Version not found)

userAllowedEquipments

[UserEquipment]

Equipment that the user has permission to view.(Version not found)

userAllowedDrivers

[UserDriver]

Drivers that the user has permission to view.(Version not found)

restrictEquipments

Boolean

Equipment that the user does not have permission to view.(Version not found)

restrictDrivers

Boolean

Drivers that the user does not have permission to view.(Version not found)

isSystem

Boolean

Indicates if the user is of type system.(Version not found)

failedAttempts

Integer(22)

Failed attempts to access the account.(Version not found)

lockDate

Date

User lock date.(Version not found)

expireDate

Date

The user expiration date(Version not found)

latestLogin

Date

Last login date.(Version not found)

passwordExpire

Integer(22)

Indicates the time in minutes to expire the password.(Version not found)

defaultEncoding

String(15)

Default encoding type: UTF-8, SHIFT-JIS, EUC-JP, WINDOWS-874. (Version not found)

JSON Example
{
  "login" : "10f91648-c83f-4b86-b",
  "password" : "123",
  "enabled" : true,
  "preferedLocale" : {
    "id" : 10000
  },
  "organization" : {
    "id" : 10466
  },
  "key" : "10f91648-c83f-4b86-b",
  "name" : "Tester Userson",
  "city" : "User City",
  "state" : "CE",
  "district" : "User District",
  "country" : "BR",
  "phone1" : "+55 85 9 9988-7766",
  "phone1Type" : "3",
  "unitSystem" : "METRIC",
  "groups" : [ {
    "id" : 10001,
    "sysAdmin" : false
  } ],
  "restrictEquipments" : false,
  "restrictDrivers" : false,
  "restrictTags" : false,
  "restrictUsers" : false,
  "externalUser" : false,
  "firstName" : "Tester",
  "lastName" : "Userson"
}

Group

Represents a user group.

API Entity Name : Group

Table 8. Attributes
Path Type Description Mandatory Natural ID

id

Integer(22)

The entity’s auto-increment id.

key

String(45)

The entity’s key.(Version not found)

Yes

name

String(45)

Name of the Group.(Version not found)

Yes

organization

Organization

Organization to which the Group belongs.(Version not found)

locked

Boolean

Indicates if the group is locked.(Version not found)

isSystem

Boolean

Indicates if the group is system type.(Version not found)

ipRangeProfile

[IPRangeProfile]

Indicates an allowed ip range.(Version not found)

ticketTypes

[TicketType]

Identifies the Ticket Type list(Version not found)

users

User

List of users who belong to the group.(Version not found)

admin

Boolean

Indicates if it is the ADMIN group.

sysAdmin

Boolean

Indicates if it is the SYSADMIN group.

id

Integer(22)

The entity’s auto-increment id.

JSON Example
{
  "name" : "Group Name",
  "key" : "c78becd7-01cb-4007-8",
  "organization" : {
    "id" : 10399,
    "key" : "c78becd7-01cb-4007-8_O",
    "description" : "Organization Rest Docs Desc",
    "city" : "São Paulo",
    "state" : "São Paulo",
    "preferedLocale" : {
      "id" : 10000
    },
    "timeZone" : {
      "id" : 10096
    },
    "unitSystem" : "METRIC"
  },
  "admin" : false,
  "sysAdmin" : false
}

Group Permissions

List of permissions for user groups.

Example with the first 10 results.

API Entity Name : UserInterface

Request
GET /UserInterface?criteria=%7B%22filters%22%3A%5B%22*%22%2C%20%22userInterfaceActions.*%22%5D%2C%22firstResult%22%3A0%2C%22maxResults%22%3A10%7D HTTP/1.1
Content-Type: application/json
Host: 10.76.25.108:8080
Response
[ {
  "id" : 10051,
  "key" : "Task",
  "description" : "task.userinterface.gridlayout",
  "enabled" : true,
  "userInterfaceActions" : [ {
    "id" : 10121,
    "key" : "new",
    "description" : "Taskmanager layout new",
    "permissionKey" : "TASK_CREATE"
  }, {
    "id" : 10122,
    "key" : "edit",
    "description" : "Taskmanager grid layout index",
    "permissionKey" : "TASK_UPDATE"
  }, {
    "id" : 10123,
    "key" : "index",
    "description" : "Taskmanager layout edit",
    "permissionKey" : "TASK_LIST"
  } ]
}, {
  "id" : 10003,
  "key" : "Equipment",
  "description" : "equipment.userinterface.description",
  "enabled" : true,
  "userInterfaceActions" : [ {
    "id" : 10125,
    "key" : "delete",
    "description" : "Remover Equipment",
    "permissionKey" : "EQUIPMENT_DELETE"
  } ]
}, {
  "id" : 10006,
  "key" : "EquipmentType",
  "description" : "equipmentType.userinterface.description",
  "enabled" : true,
  "userInterfaceActions" : [ {
    "id" : 10126,
    "key" : "delete",
    "description" : "Remover EquipmentType",
    "permissionKey" : "EQUIPMENTTYPE_DELETE"
  } ]
}, {
  "id" : 10011,
  "key" : "CancelCode",
  "description" : "cancelCode.userinterface.description",
  "enabled" : true,
  "userInterfaceActions" : [ {
    "id" : 10127,
    "key" : "delete",
    "description" : "Remover CancelCode",
    "permissionKey" : "CANCELCODE_DELETE"
  } ]
}, {
  "id" : 10009,
  "key" : "ReasonCode",
  "description" : "reasonCode.userinterface.description",
  "enabled" : true,
  "userInterfaceActions" : [ {
    "id" : 10128,
    "key" : "delete",
    "description" : "Remover ReasonCode",
    "permissionKey" : "REASONCODE_DELETE"
  } ]
}, {
  "id" : 10014,
  "key" : "UndeliverableCode",
  "description" : "undeliverableCode.userinterface.description",
  "enabled" : true,
  "userInterfaceActions" : [ {
    "id" : 10129,
    "key" : "delete",
    "description" : "Remover UndeliverableCode",
    "permissionKey" : "UNDELIVERABLECODE_DELETE"
  } ]
}, {
  "id" : 10053,
  "key" : "RouteProgress",
  "description" : "RouteProgress.userinterface.gridlayout",
  "enabled" : true,
  "userInterfaceActions" : [ {
    "id" : 10130,
    "key" : "index",
    "description" : "RouteProgress grid layout index",
    "permissionKey" : "ROUTE_PROGRESS"
  } ]
}, {
  "id" : 10025,
  "key" : "DelayType",
  "description" : "delayType.userinterface.description",
  "enabled" : true,
  "userInterfaceActions" : [ {
    "id" : 10131,
    "key" : "delete",
    "description" : "Remover DelayType",
    "permissionKey" : "DELAYTYPE_DELETE"
  } ]
} ]

Add Permissions

Assigns resource permissions to the Group.

API Entity Name : Group

Table 9. Attributes
Path Type Description Mandatory Natural ID

id

Integer(22)

The entity’s auto-increment id.

Yes

active

Boolean

Represents if permission is active

Yes

JSON Example
PUT /Group/10060/userInterface/grant HTTP/1.1
Content-Type: application/json
Host: 10.76.25.108:8080
Content-Length: 39

{
  "id" : "10028",
  "active" : true
}

Change Password

Allows you to change User password.

API Entity Name : User

Table 10. Attributes
Path Type Description Mandatory Natural ID

login

String(45)

User login(Version not found)

Yes

oldPassword

String(45)

Old password of the User(Version not found)

Yes

password

String(45)

New password of the User(Version not found)

Yes

passwordConfirmation

String(45)

Password Confirmation(Version not found)

Yes

Request
POST /User/ChangePassword HTTP/1.1
Content-Type: application/json
Host: 10.76.25.108:8080
Content-Length: 133

{
  "login" : "e2fcb541-56bf-40b0-aUserChange",
  "oldPassword" : "123",
  "password" : "54321",
  "passwordConfirmation" : "54321"
}

Route Services

All route services.

Add Stop

This service adds the Stop to the indicated Route.
Resource URL

<greenmile_address>/Route/<routeId>/AddStop
Parameters Mandatory Type Description

relatedStop

No

BODY

Only considered if the placement parameter type indicated is AFTER_STOP or BEFORE_STOP. Indicates the related stop for the new stop to be inserted after or before than, onto the route sequence.

stop.location.key

Yes*

BODY

Key to the location, in case location.id is not informed.

stop.location.id

Yes*

BODY

ID for the location, in case location.key is not informed.

route.id

Yes

URL

ID for the route where the stop must be inserted.

placement

Yes

BODY

Insertion type. Possible values: BEST_INSERTION, AFTER_STOP, BEFORE_STOP, FIRST, LAST. Default: LAST.

* location.id attribute or location.key must be informed, in case the ID is informed then key will be ignored.

placement

The following constraints may be used:
  • BEST_INSERTION: Calculates the best position for the new Stop to be inserted at.

  • AFTER_STOP: Adds the Stop after the related Stop indicated on attribute "relatedStopId".

  • BEFORE_STOP: Adds the Stop before the related Stop indicated on attribute "relatedStopId".

  • FIRST: Adds the Stop to the first position after the already serviced Stops. So if there are three serviced stops, a new stop will be on 4th position.

  • LAST: Adds the Stop to the last position.

relatedStop

This parameter will only be considered case placement informed is "AFTER_STOP" or "BEFORE_STOP".
It’s used to indicate the relative position where the new stop will be inserted.

Example

POST /Route/10281/AddStop HTTP/1.1
Content-Type: application/json
Host: 10.76.25.108:8080
Content-Length: 2742

{
  "placement" : "BEFORE_STOP",
  "relatedStop" : {
    "id" : 10260,
    "bulkArriveCanceled" : false
  },
  "stop" : {
    "key" : "4abe5b1c-3673-4125-b",
    "orders" : [ {
      "number" : "4abe5b1c-3673-4125-b_OrderDoc",
      "lineItems" : [ {
        "lineItemID" : "4abe5b1c-3673-4125-b_LID",
        "sku" : {
          "id" : 10142,
          "organization" : {
            "id" : 10281
          },
          "key" : "4abe5b1c-3673-4125-b",
          "description" : "Sample SKU - Juice",
          "enabled" : true,
          "brand" : "Amazing",
          "skuType" : {
            "id" : 10020,
            "organization" : {
              "id" : 10281
            },
            "key" : "4abe5b1c-3673-4125-b",
            "description" : "SkuType Description"
          },
          "baseUnit" : {
            "id" : 10040,
            "key" : "4abe5b1c-3673-4125-bBottle",
            "description" : "Sample SizeAlias",
            "icon" : "ICON",
            "preferredSize" : "1",
            "sizeDecimalPlaces" : 2
          },
          "secondaryUnit" : {
            "id" : 10041,
            "key" : "4abe5b1c-3673-4125-bBox",
            "description" : "Sample SizeAlias",
            "icon" : "ICON",
            "preferredSize" : "1",
            "sizeDecimalPlaces" : 2
          },
          "tertiaryUnit" : {
            "id" : 10042,
            "key" : "4abe5b1c-3673-4125-bContainer",
            "description" : "Sample SizeAlias",
            "icon" : "ICON",
            "preferredSize" : "1",
            "sizeDecimalPlaces" : 2
          },
          "secondaryQty" : 4.0,
          "tertiaryQty" : 4.0,
          "secondaryCompound" : {
            "id" : 10140,
            "organization" : {
              "id" : 10281
            },
            "key" : "4abe5b1c-3673-4125-bSkuSecondary",
            "description" : "Sample SKU",
            "enabled" : true,
            "brand" : "Docik",
            "alternativeKey" : "4abe5b1c-3673-4125-bSkuSecondarynull"
          },
          "tertiaryCompound" : {
            "id" : 10141,
            "organization" : {
              "id" : 10281
            },
            "key" : "4abe5b1c-3673-4125-bSkuTertiary",
            "description" : "Sample SKU",
            "enabled" : true,
            "brand" : "Docik",
            "alternativeKey" : "4abe5b1c-3673-4125-bSkuTertiarynull"
          },
          "secondaryCompoundQty" : 1.0,
          "tertiaryCompoundQty" : 1.0
        },
        "hasPicture" : false
      } ],
      "hasPicture" : false
    } ],
    "location" : {
      "id" : 10242
    },
    "stopType" : {
      "id" : 10240
    },
    "bulkArriveCanceled" : false,
    "ordersInfo" : "[4abe5b1c-3673-4125-b_OrderDoc]"
  }
}

Add Stops

This service adds a list of Stops to the indicated Route.
The same parameters as AddStop apply for Stop element in the list.
Resource URL

<greenmile_address>/Route/<routeId>/AddStops

Example

Request
POST /Route/10320/AddStops HTTP/1.1
Content-Type: application/json
Host: 10.76.25.108:8080
Content-Length: 6394

[ {
  "placement" : "BEFORE_STOP",
  "relatedStop" : {
    "id" : 10300,
    "bulkArriveCanceled" : false
  },
  "stop" : {
    "key" : "128aa9d4-4caa-46c3-a_1",
    "orders" : [ {
      "number" : "128aa9d4-4caa-46c3-a_1_OrderDoc",
      "lineItems" : [ {
        "lineItemID" : "128aa9d4-4caa-46c3-a_1_LID",
        "sku" : {
          "id" : 10162,
          "organization" : {
            "id" : 10320
          },
          "key" : "128aa9d4-4caa-46c3-a_1",
          "description" : "Sample SKU - Juice",
          "enabled" : true,
          "brand" : "Amazing",
          "skuType" : {
            "id" : 10040,
            "organization" : {
              "id" : 10320
            },
            "key" : "128aa9d4-4caa-46c3-a_1",
            "description" : "SkuType Description"
          },
          "baseUnit" : {
            "id" : 10060,
            "key" : "128aa9d4-4caa-46c3-a_1Bottle",
            "description" : "Sample SizeAlias",
            "icon" : "ICON",
            "preferredSize" : "1",
            "sizeDecimalPlaces" : 2
          },
          "secondaryUnit" : {
            "id" : 10061,
            "key" : "128aa9d4-4caa-46c3-a_1Box",
            "description" : "Sample SizeAlias",
            "icon" : "ICON",
            "preferredSize" : "1",
            "sizeDecimalPlaces" : 2
          },
          "tertiaryUnit" : {
            "id" : 10062,
            "key" : "128aa9d4-4caa-46c3-a_1Container",
            "description" : "Sample SizeAlias",
            "icon" : "ICON",
            "preferredSize" : "1",
            "sizeDecimalPlaces" : 2
          },
          "secondaryQty" : 4.0,
          "tertiaryQty" : 4.0,
          "secondaryCompound" : {
            "id" : 10160,
            "organization" : {
              "id" : 10320
            },
            "key" : "128aa9d4-4caa-46c3-a_1SkuSecondary",
            "description" : "Sample SKU",
            "enabled" : true,
            "brand" : "Docik",
            "alternativeKey" : "128aa9d4-4caa-46c3-a_1SkuSecondarynull"
          },
          "tertiaryCompound" : {
            "id" : 10161,
            "organization" : {
              "id" : 10320
            },
            "key" : "128aa9d4-4caa-46c3-a_1SkuTertiary",
            "description" : "Sample SKU",
            "enabled" : true,
            "brand" : "Docik",
            "alternativeKey" : "128aa9d4-4caa-46c3-a_1SkuTertiarynull"
          },
          "secondaryCompoundQty" : 1.0,
          "tertiaryCompoundQty" : 1.0
        },
        "hasPicture" : false
      } ],
      "hasPicture" : false
    } ],
    "location" : {
      "id" : 10280,
      "organization" : {
        "id" : 10320
      },
      "key" : "128aa9d4-4caa-46c3-a_1_Loc",
      "locationType" : {
        "id" : 10280,
        "organization" : {
          "id" : 10320
        },
        "key" : "128aa9d4-4caa-46c3-a_1_LocLocTypeDoc",
        "description" : "Sample LocationType",
        "enabled" : true
      },
      "description" : "Location - Description Sample",
      "city" : "FortalezaDoc",
      "state" : "Ceará",
      "country" : "BR",
      "longitude" : -38.46933,
      "latitude" : -3.734536,
      "phone1" : "+55 (85) 9 9988-7766",
      "phone1Type" : "3",
      "email" : "example.greenmile@gogreen.com",
      "deliveryInstructions" : "Sample Delivery Instructions.",
      "deliveryRadius" : 20,
      "hasGeofence" : false,
      "creditLimit" : 1000,
      "legalName" : "Location's Legal Name"
    },
    "stopType" : {
      "id" : 10280
    },
    "bulkArriveCanceled" : false,
    "ordersInfo" : "[128aa9d4-4caa-46c3-a_1_OrderDoc]"
  }
}, {
  "placement" : "BEFORE_STOP",
  "relatedStop" : {
    "id" : 10301,
    "bulkArriveCanceled" : false
  },
  "stop" : {
    "key" : "128aa9d4-4caa-46c3-a_2",
    "orders" : [ {
      "number" : "128aa9d4-4caa-46c3-a_2_OrderDoc",
      "lineItems" : [ {
        "lineItemID" : "128aa9d4-4caa-46c3-a_2_LID",
        "sku" : {
          "id" : 10165,
          "organization" : {
            "id" : 10320
          },
          "key" : "128aa9d4-4caa-46c3-a_2",
          "description" : "Sample SKU - Juice",
          "enabled" : true,
          "brand" : "Amazing",
          "skuType" : {
            "id" : 10041,
            "organization" : {
              "id" : 10320
            },
            "key" : "128aa9d4-4caa-46c3-a_2",
            "description" : "SkuType Description"
          },
          "baseUnit" : {
            "id" : 10063,
            "key" : "128aa9d4-4caa-46c3-a_2Bottle",
            "description" : "Sample SizeAlias",
            "icon" : "ICON",
            "preferredSize" : "1",
            "sizeDecimalPlaces" : 2
          },
          "secondaryUnit" : {
            "id" : 10064,
            "key" : "128aa9d4-4caa-46c3-a_2Box",
            "description" : "Sample SizeAlias",
            "icon" : "ICON",
            "preferredSize" : "1",
            "sizeDecimalPlaces" : 2
          },
          "tertiaryUnit" : {
            "id" : 10065,
            "key" : "128aa9d4-4caa-46c3-a_2Container",
            "description" : "Sample SizeAlias",
            "icon" : "ICON",
            "preferredSize" : "1",
            "sizeDecimalPlaces" : 2
          },
          "secondaryQty" : 4.0,
          "tertiaryQty" : 4.0,
          "secondaryCompound" : {
            "id" : 10163,
            "organization" : {
              "id" : 10320
            },
            "key" : "128aa9d4-4caa-46c3-a_2SkuSecondary",
            "description" : "Sample SKU",
            "enabled" : true,
            "brand" : "Docik",
            "alternativeKey" : "128aa9d4-4caa-46c3-a_2SkuSecondarynull"
          },
          "tertiaryCompound" : {
            "id" : 10164,
            "organization" : {
              "id" : 10320
            },
            "key" : "128aa9d4-4caa-46c3-a_2SkuTertiary",
            "description" : "Sample SKU",
            "enabled" : true,
            "brand" : "Docik",
            "alternativeKey" : "128aa9d4-4caa-46c3-a_2SkuTertiarynull"
          },
          "secondaryCompoundQty" : 1.0,
          "tertiaryCompoundQty" : 1.0
        },
        "hasPicture" : false
      } ],
      "hasPicture" : false
    } ],
    "location" : {
      "id" : 10281
    },
    "stopType" : {
      "id" : 10282
    },
    "bulkArriveCanceled" : false,
    "ordersInfo" : "[128aa9d4-4caa-46c3-a_2_OrderDoc]"
  }
} ]
Response
HTTP/1.1 200 OK
Content-Encoding: gzip
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Connection: keep-alive
X-Content-Type-Options: nosniff
Transfer-Encoding: chunked
Server-Version: 6.42-feature-925751-433219
Content-Type: application/json
Content-Length: 39490

[ {
  "id" : 10302,
  "creationDate" : "2023-10-19T13:31:00+0000",
  "lastModifier" : {
    "id" : 10060,
    "login" : "gmtmproot",
    "creationDate" : "2023-10-19T13:31:00+0000"
  },
  "lastModificationDate" : "2023-10-19T13:31:00+0000",
  "key" : "128aa9d4-4caa-46c3-a_1",
  "route" : {
    "id" : 10320,
    "creationDate" : "2023-10-19T13:30:59+0000",
    "lastModifier" : {
      "id" : 10060,
      "login" : "gmtmproot",
      "creationDate" : "2023-10-19T13:31:00+0000"
    },
    "lastModificationDate" : "2023-10-19T13:31:00+0000",
    "organization" : {
      "id" : 10320,
      "creationDate" : "2023-10-19T13:30:54+0000",
      "key" : "128aa9d4-4caa-46c3-a_O",
      "description" : "Organization Rest Docs Desc",
      "city" : "São Paulo",
      "state" : "São Paulo",
      "preferedLocale" : {
        "id" : 10000,
        "key" : "I18NLocale_en",
        "language" : "en",
        "description" : "English",
        "dateFormat" : "MM/dd/yyyy",
        "timeFormat" : "hh:mm a",
        "currency" : "US$",
        "decimalSymbol" : ".",
        "digitalGrouping" : ","
      },
      "timeZone" : {
        "id" : 10096,
        "description" : "GMT+0",
        "rawOffsetMinutes" : 0,
        "timezoneName" : "GMT+0"
      },
      "listenerOrganizations" : [ ],
      "unitSystem" : "METRIC"
    },
    "key" : "128aa9d4-4caa-46c3-a",
    "date" : "2023-10-19",
    "description" : "Sample Route Doc",
    "origin" : {
      "id" : 10282,
      "creationDate" : "2023-10-19T13:30:58+0000",
      "organization" : {
        "id" : 10320,
        "creationDate" : "2023-10-19T13:30:54+0000",
        "key" : "128aa9d4-4caa-46c3-a_O",
        "description" : "Organization Rest Docs Desc",
        "city" : "São Paulo",
        "state" : "São Paulo",
        "preferedLocale" : {
          "id" : 10000,
          "key" : "I18NLocale_en",
          "language" : "en",
          "description" : "English",
          "dateFormat" : "MM/dd/yyyy",
          "timeFormat" : "hh:mm a",
          "currency" : "US$",
          "decimalSymbol" : ".",
          "digitalGrouping" : ","
        },
        "timeZone" : {
          "id" : 10096,
          "description" : "GMT+0",
          "rawOffsetMinutes" : 0,
          "timezoneName" : "GMT+0"
        },
        "listenerOrganizations" : [ ],
        "unitSystem" : "METRIC"
      },
      "key" : "128aa9d4-4caa-46c3-a_O",
      "locationType" : {
        "id" : 10282,
        "creationDate" : "2023-10-19T13:30:58+0000",
        "organization" : {
          "id" : 10320,
          "creationDate" : "2023-10-19T13:30:54+0000",
          "key" : "128aa9d4-4caa-46c3-a_O",
          "description" : "Organization Rest Docs Desc",
          "city" : "São Paulo",
          "state" : "São Paulo",
          "preferedLocale" : {
            "id" : 10000,
            "key" : "I18NLocale_en",
            "language" : "en",
            "description" : "English",
            "dateFormat" : "MM/dd/yyyy",
            "timeFormat" : "hh:mm a",
            "currency" : "US$",
            "decimalSymbol" : ".",
            "digitalGrouping" : ","
          },
          "timeZone" : {
            "id" : 10096,
            "description" : "GMT+0",
            "rawOffsetMinutes" : 0,
            "timezoneName" : "GMT+0"
          },
          "listenerOrganizations" : [ ],
          "unitSystem" : "METRIC"
        },
        "key" : "128aa9d4-4caa-46c3-a_OLocTypeDoc",
        "description" : "Sample LocationType",
        "showOnMobileCreate" : true,
        "enabled" : true,
        "alternativeKey" : "128aa9d4-4caa-46c3-a_OLocTypeDoc128aa9d4-4caa-46c3-a_O"
      },
      "description" : "Location - Description Sample",
      "city" : "FortalezaDoc",
      "state" : "Ceará",
      "country" : "BR",
      "longitude" : -38.46933,
      "latitude" : -3.734536,
      "phone1" : "+55 (85) 9 9988-7766",
      "phone1Type" : "3",
      "email" : "example.greenmile@gogreen.com",
      "deliveryInstructions" : "Sample Delivery Instructions.",
      "deliveryRadius" : 20,
      "deliveryDays" : "0",
      "enabled" : true,
      "hasGeofence" : false,
      "creditLimit" : 1000,
      "legalName" : "Location's Legal Name",
      "alternativeKey" : "128aa9d4-4caa-46c3-a_O128aa9d4-4caa-46c3-a_OLocTypeDoc128aa9d4-4caa-46c3-a_O128aa9d4-4caa-46c3-a_O"
    },
    "origLatitude" : -3.734536,
    "origLongitude" : -38.46933,
    "destination" : {
      "id" : 10283,
      "creationDate" : "2023-10-19T13:30:59+0000",
      "organization" : {
        "id" : 10320,
        "creationDate" : "2023-10-19T13:30:54+0000",
        "key" : "128aa9d4-4caa-46c3-a_O",
        "description" : "Organization Rest Docs Desc",
        "city" : "São Paulo",
        "state" : "São Paulo",
        "preferedLocale" : {
          "id" : 10000,
          "key" : "I18NLocale_en",
          "language" : "en",
          "description" : "English",
          "dateFormat" : "MM/dd/yyyy",
          "timeFormat" : "hh:mm a",
          "currency" : "US$",
          "decimalSymbol" : ".",
          "digitalGrouping" : ","
        },
        "timeZone" : {
          "id" : 10096,
          "description" : "GMT+0",
          "rawOffsetMinutes" : 0,
          "timezoneName" : "GMT+0"
        },
        "listenerOrganizations" : [ ],
        "unitSystem" : "METRIC"
      },
      "key" : "128aa9d4-4caa-46c3-a_D",
      "locationType" : {
        "id" : 10283,
        "creationDate" : "2023-10-19T13:30:59+0000",
        "organization" : {
          "id" : 10320,
          "creationDate" : "2023-10-19T13:30:54+0000",
          "key" : "128aa9d4-4caa-46c3-a_O",
          "description" : "Organization Rest Docs Desc",
          "city" : "São Paulo",
          "state" : "São Paulo",
          "preferedLocale" : {
            "id" : 10000,
            "key" : "I18NLocale_en",
            "language" : "en",
            "description" : "English",
            "dateFormat" : "MM/dd/yyyy",
            "timeFormat" : "hh:mm a",
            "currency" : "US$",
            "decimalSymbol" : ".",
            "digitalGrouping" : ","
          },
          "timeZone" : {
            "id" : 10096,
            "description" : "GMT+0",
            "rawOffsetMinutes" : 0,
            "timezoneName" : "GMT+0"
          },
          "listenerOrganizations" : [ ],
          "unitSystem" : "METRIC"
        },
        "key" : "128aa9d4-4caa-46c3-a_DLocTypeDoc",
        "description" : "Sample LocationType",
        "showOnMobileCreate" : true,
        "enabled" : true,
        "alternativeKey" : "128aa9d4-4caa-46c3-a_DLocTypeDoc128aa9d4-4caa-46c3-a_O"
      },
      "description" : "Location - Description Sample",
      "city" : "FortalezaDoc",
      "state" : "Ceará",
      "country" : "BR",
      "longitude" : -38.46933,
      "latitude" : -3.734536,
      "phone1" : "+55 (85) 9 9988-7766",
      "phone1Type" : "3",
      "email" : "example.greenmile@gogreen.com",
      "deliveryInstructions" : "Sample Delivery Instructions.",
      "deliveryRadius" : 20,
      "deliveryDays" : "0",
      "enabled" : true,
      "hasGeofence" : false,
      "creditLimit" : 1000,
      "legalName" : "Location's Legal Name",
      "alternativeKey" : "128aa9d4-4caa-46c3-a_D128aa9d4-4caa-46c3-a_DLocTypeDoc128aa9d4-4caa-46c3-a_O128aa9d4-4caa-46c3-a_O"
    },
    "destLatitude" : -3.734536,
    "destLongitude" : -38.46933,
    "firstStopIsOrigin" : false,
    "lastStopIsDestination" : false,
    "extraLineItems" : [ ],
    "udfs" : [ ],
    "baseLineArrival" : "2023-10-19T13:30:59+0000",
    "baseLineDeparture" : "2023-10-19T13:30:59+0000",
    "plannedArrival" : "2023-10-19T13:30:59+0000",
    "plannedDeparture" : "2023-10-19T13:30:59+0000",
    "projectedArrival" : "2023-10-19T13:30:59+0000",
    "projectedDeparture" : "2023-10-19T13:30:59+0000",
    "baseLineDistance" : 0.0,
    "plannedDistance" : 0.0,
    "projectedDistance" : 0.0,
    "baseLineComplete" : "2023-10-19T13:30:59+0000",
    "plannedComplete" : "2023-10-19T13:30:59+0000",
    "projectedComplete" : "2023-10-19T13:30:59+0000",
    "baseLineCost" : 0,
    "plannedCost" : 0,
    "baseLineStart" : "2023-10-19T13:30:59+0000",
    "plannedStart" : "2023-10-19T13:30:59+0000",
    "projectedStart" : "2023-10-19T13:30:59+0000",
    "hasHelper" : false,
    "driverAssignments" : [ ],
    "equipmentAssignments" : [ ],
    "tagAssignments" : [ ],
    "additionalMaterials" : [ ],
    "consignedSkus" : [ ],
    "holderMaterials" : [ ],
    "manifests" : [ ],
    "notLoadedSkus" : [ ],
    "totalStops" : 4,
    "canceledStops" : 0,
    "undeliveredStops" : 0,
    "redeliveredStops" : 0,
    "actualDepartures" : 0,
    "status" : "NOT_STARTED",
    "plannedTravelTimeMinutes" : 0,
    "baselineTravelTimeMinutes" : 0,
    "plannedServiceTime" : 0,
    "baselineServiceTime" : 0,
    "hasPicture" : false,
    "plannedSize1" : 0.0,
    "plannedSize2" : 0.0,
    "plannedSize3" : 0.0,
    "plannedPickupSize1" : 0.0,
    "plannedPickupSize2" : 0.0,
    "plannedPickupSize3" : 0.0,
    "hasGps" : false,
    "helperAssignments" : [ ],
    "size1AliasConfig" : {
      "id" : 10000,
      "key" : "Weight",
      "description" : "Weight",
      "icon" : "gmfont-sizes-icon-size1",
      "preferredSize" : "1"
    },
    "size2AliasConfig" : {
      "id" : 10001,
      "key" : "Volume",
      "description" : "Volume",
      "icon" : "gmfont-sizes-icon-size2",
      "preferredSize" : "1"
    },
    "size3AliasConfig" : {
      "id" : 10002,
      "key" : "Value",
      "description" : "Value",
      "icon" : "gmfont-sizes-icon-size3",
      "preferredSize" : "1"
    },
    "onRoute" : false
  },
  "orders" : [ {
    "id" : 10200,
    "creationDate" : "2023-10-19T13:31:00+0000",
    "lastModifier" : {
      "id" : 10060,
      "login" : "gmtmproot",
      "creationDate" : "2023-10-19T13:31:00+0000"
    },
    "lastModificationDate" : "2023-10-19T13:31:00+0000",
    "number" : "128aa9d4-4caa-46c3-a_1_OrderDoc",
    "lineItems" : [ {
      "id" : 10180,
      "creationDate" : "2023-10-19T13:31:00+0000",
      "lastModifier" : {
        "id" : 10060,
        "login" : "gmtmproot",
        "creationDate" : "2023-10-19T13:31:00+0000"
      },
      "lastModificationDate" : "2023-10-19T13:31:00+0000",
      "lineItemID" : "128aa9d4-4caa-46c3-a_1_LID",
      "sku" : {
        "id" : 10162,
        "organization" : {
          "id" : 10320,
          "creationDate" : "2023-10-19T13:30:54+0000",
          "key" : "128aa9d4-4caa-46c3-a_O",
          "description" : "Organization Rest Docs Desc",
          "city" : "São Paulo",
          "state" : "São Paulo",
          "preferedLocale" : {
            "id" : 10000,
            "key" : "I18NLocale_en",
            "language" : "en",
            "description" : "English",
            "dateFormat" : "MM/dd/yyyy",
            "timeFormat" : "hh:mm a",
            "currency" : "US$",
            "decimalSymbol" : ".",
            "digitalGrouping" : ","
          },
          "timeZone" : {
            "id" : 10096,
            "description" : "GMT+0",
            "rawOffsetMinutes" : 0,
            "timezoneName" : "GMT+0"
          },
          "listenerOrganizations" : [ ],
          "unitSystem" : "METRIC"
        },
        "key" : "128aa9d4-4caa-46c3-a_1",
        "description" : "Sample SKU - Juice",
        "enabled" : true,
        "brand" : "Amazing",
        "skuType" : {
          "id" : 10040,
          "organization" : {
            "id" : 10320
          },
          "key" : "128aa9d4-4caa-46c3-a_1",
          "description" : "SkuType Description"
        },
        "baseUnit" : {
          "id" : 10060,
          "key" : "128aa9d4-4caa-46c3-a_1Bottle",
          "description" : "Sample SizeAlias",
          "icon" : "ICON",
          "preferredSize" : "1",
          "sizeDecimalPlaces" : 2
        },
        "secondaryUnit" : {
          "id" : 10061,
          "key" : "128aa9d4-4caa-46c3-a_1Box",
          "description" : "Sample SizeAlias",
          "icon" : "ICON",
          "preferredSize" : "1",
          "sizeDecimalPlaces" : 2
        },
        "tertiaryUnit" : {
          "id" : 10062,
          "key" : "128aa9d4-4caa-46c3-a_1Container",
          "description" : "Sample SizeAlias",
          "icon" : "ICON",
          "preferredSize" : "1",
          "sizeDecimalPlaces" : 2
        },
        "secondaryQty" : 4.0,
        "tertiaryQty" : 4.0,
        "secondaryCompound" : {
          "id" : 10160,
          "organization" : {
            "id" : 10320
          },
          "key" : "128aa9d4-4caa-46c3-a_1SkuSecondary",
          "description" : "Sample SKU",
          "enabled" : true,
          "brand" : "Docik",
          "alternativeKey" : "128aa9d4-4caa-46c3-a_1SkuSecondarynull"
        },
        "tertiaryCompound" : {
          "id" : 10161,
          "organization" : {
            "id" : 10320
          },
          "key" : "128aa9d4-4caa-46c3-a_1SkuTertiary",
          "description" : "Sample SKU",
          "enabled" : true,
          "brand" : "Docik",
          "alternativeKey" : "128aa9d4-4caa-46c3-a_1SkuTertiarynull"
        },
        "secondaryCompoundQty" : 1.0,
        "tertiaryCompoundQty" : 1.0,
        "alternativeKey" : "128aa9d4-4caa-46c3-a_1128aa9d4-4caa-46c3-a_O"
      },
      "hasPicture" : false,
      "size1AliasConfig" : {
        "id" : 10000,
        "key" : "Weight",
        "description" : "Weight",
        "icon" : "gmfont-sizes-icon-size1",
        "preferredSize" : "1"
      },
      "size2AliasConfig" : {
        "id" : 10001,
        "key" : "Volume",
        "description" : "Volume",
        "icon" : "gmfont-sizes-icon-size2",
        "preferredSize" : "1"
      },
      "size3AliasConfig" : {
        "id" : 10002,
        "key" : "Value",
        "description" : "Value",
        "icon" : "gmfont-sizes-icon-size3",
        "preferredSize" : "1"
      }
    } ],
    "plannedSize1" : 0.0,
    "plannedSize2" : 0.0,
    "plannedSize3" : 0.0,
    "plannedPickupSize1" : 0.0,
    "plannedPickupSize2" : 0.0,
    "plannedPickupSize3" : 0.0,
    "hasPicture" : false,
    "size1AliasConfig" : {
      "id" : 10000,
      "key" : "Weight",
      "description" : "Weight",
      "icon" : "gmfont-sizes-icon-size1",
      "preferredSize" : "1"
    },
    "size2AliasConfig" : {
      "id" : 10001,
      "key" : "Volume",
      "description" : "Volume",
      "icon" : "gmfont-sizes-icon-size2",
      "preferredSize" : "1"
    },
    "size3AliasConfig" : {
      "id" : 10002,
      "key" : "Value",
      "description" : "Value",
      "icon" : "gmfont-sizes-icon-size3",
      "preferredSize" : "1"
    }
  } ],
  "location" : {
    "id" : 10280,
    "creationDate" : "2023-10-19T13:30:56+0000",
    "organization" : {
      "id" : 10320,
      "creationDate" : "2023-10-19T13:30:54+0000",
      "key" : "128aa9d4-4caa-46c3-a_O",
      "description" : "Organization Rest Docs Desc",
      "city" : "São Paulo",
      "state" : "São Paulo",
      "preferedLocale" : {
        "id" : 10000,
        "key" : "I18NLocale_en",
        "language" : "en",
        "description" : "English",
        "dateFormat" : "MM/dd/yyyy",
        "timeFormat" : "hh:mm a",
        "currency" : "US$",
        "decimalSymbol" : ".",
        "digitalGrouping" : ","
      },
      "timeZone" : {
        "id" : 10096,
        "description" : "GMT+0",
        "rawOffsetMinutes" : 0,
        "timezoneName" : "GMT+0"
      },
      "listenerOrganizations" : [ ],
      "unitSystem" : "METRIC"
    },
    "key" : "128aa9d4-4caa-46c3-a_1_Loc",
    "locationType" : {
      "id" : 10280,
      "creationDate" : "2023-10-19T13:30:56+0000",
      "organization" : {
        "id" : 10320,
        "creationDate" : "2023-10-19T13:30:54+0000",
        "key" : "128aa9d4-4caa-46c3-a_O",
        "description" : "Organization Rest Docs Desc",
        "city" : "São Paulo",
        "state" : "São Paulo",
        "preferedLocale" : {
          "id" : 10000,
          "key" : "I18NLocale_en",
          "language" : "en",
          "description" : "English",
          "dateFormat" : "MM/dd/yyyy",
          "timeFormat" : "hh:mm a",
          "currency" : "US$",
          "decimalSymbol" : ".",
          "digitalGrouping" : ","
        },
        "timeZone" : {
          "id" : 10096,
          "description" : "GMT+0",
          "rawOffsetMinutes" : 0,
          "timezoneName" : "GMT+0"
        },
        "listenerOrganizations" : [ ],
        "unitSystem" : "METRIC"
      },
      "key" : "128aa9d4-4caa-46c3-a_1_LocLocTypeDoc",
      "description" : "Sample LocationType",
      "showOnMobileCreate" : true,
      "enabled" : true,
      "alternativeKey" : "128aa9d4-4caa-46c3-a_1_LocLocTypeDoc128aa9d4-4caa-46c3-a_O"
    },
    "locationOverrideTimeWindows" : [ ],
    "description" : "Location - Description Sample",
    "city" : "FortalezaDoc",
    "state" : "Ceará",
    "country" : "BR",
    "longitude" : -38.46933,
    "latitude" : -3.734536,
    "phone1" : "+55 (85) 9 9988-7766",
    "phone1Type" : "3",
    "email" : "example.greenmile@gogreen.com",
    "deliveryInstructions" : "Sample Delivery Instructions.",
    "deliveryRadius" : 20,
    "deliveryDays" : "0",
    "enabled" : true,
    "hasGeofence" : false,
    "creditLimit" : 1000,
    "legalName" : "Location's Legal Name",
    "alternativeKey" : "128aa9d4-4caa-46c3-a_1_Loc128aa9d4-4caa-46c3-a_1_LocLocTypeDoc128aa9d4-4caa-46c3-a_O128aa9d4-4caa-46c3-a_O"
  },
  "plannedSequenceNum" : 1,
  "stopType" : {
    "id" : 10280,
    "creationDate" : "2023-10-19T13:30:56+0000",
    "organization" : {
      "id" : 10320,
      "creationDate" : "2023-10-19T13:30:54+0000",
      "key" : "128aa9d4-4caa-46c3-a_O",
      "description" : "Organization Rest Docs Desc",
      "city" : "São Paulo",
      "state" : "São Paulo",
      "preferedLocale" : {
        "id" : 10000,
        "key" : "I18NLocale_en",
        "language" : "en",
        "description" : "English",
        "dateFormat" : "MM/dd/yyyy",
        "timeFormat" : "hh:mm a",
        "currency" : "US$",
        "decimalSymbol" : ".",
        "digitalGrouping" : ","
      },
      "timeZone" : {
        "id" : 10096,
        "description" : "GMT+0",
        "rawOffsetMinutes" : 0,
        "timezoneName" : "GMT+0"
      },
      "listenerOrganizations" : [ ],
      "unitSystem" : "METRIC"
    },
    "key" : "128aa9d4-4caa-46c3-a_1",
    "description" : "Sample StopType",
    "type" : "STOP",
    "locationRequired" : false
  },
  "plannedArrival" : "2023-10-19T13:30:59+0000",
  "projectedArrival" : "2023-10-19T13:31:00+0000",
  "plannedService" : "2023-10-19T13:30:59+0000",
  "projectedService" : "2023-10-19T13:31:00+0000",
  "plannedDeparture" : "2023-10-19T13:30:59+0000",
  "projectedDeparture" : "2023-10-19T13:31:00+0000",
  "plannedDistance" : 0.0,
  "projectedDistance" : 0.0,
  "plannedSize1" : 0.0,
  "plannedSize2" : 0.0,
  "plannedSize3" : 0.0,
  "plannedPickupSize1" : 0.0,
  "plannedPickupSize2" : 0.0,
  "plannedPickupSize3" : 0.0,
  "bulkArriveCanceled" : false,
  "plannedServiceTime" : 0,
  "longitude" : -38.46933,
  "latitude" : -3.734536,
  "ordersInfo" : "[128aa9d4-4caa-46c3-a_1_OrderDoc]",
  "size1AliasConfig" : {
    "id" : 10000,
    "key" : "Weight",
    "description" : "Weight",
    "icon" : "gmfont-sizes-icon-size1",
    "preferredSize" : "1"
  },
  "size2AliasConfig" : {
    "id" : 10001,
    "key" : "Volume",
    "description" : "Volume",
    "icon" : "gmfont-sizes-icon-size2",
    "preferredSize" : "1"
  },
  "size3AliasConfig" : {
    "id" : 10002,
    "key" : "Value",
    "description" : "Value",
    "icon" : "gmfont-sizes-icon-size3",
    "preferredSize" : "1"
  },
  "deliveryStatus" : "PENDING",
  "canceled" : false,
  "returned" : false,
  "redelivered" : false
}, {
  "id" : 10303,
  "creationDate" : "2023-10-19T13:31:00+0000",
  "lastModifier" : {
    "id" : 10060,
    "login" : "gmtmproot",
    "creationDate" : "2023-10-19T13:31:00+0000"
  },
  "lastModificationDate" : "2023-10-19T13:31:00+0000",
  "key" : "128aa9d4-4caa-46c3-a_2",
  "route" : {
    "id" : 10320,
    "creationDate" : "2023-10-19T13:30:59+0000",
    "lastModifier" : {
      "id" : 10060,
      "login" : "gmtmproot",
      "creationDate" : "2023-10-19T13:31:00+0000"
    },
    "lastModificationDate" : "2023-10-19T13:31:00+0000",
    "organization" : {
      "id" : 10320,
      "creationDate" : "2023-10-19T13:30:54+0000",
      "key" : "128aa9d4-4caa-46c3-a_O",
      "description" : "Organization Rest Docs Desc",
      "city" : "São Paulo",
      "state" : "São Paulo",
      "preferedLocale" : {
        "id" : 10000,
        "key" : "I18NLocale_en",
        "language" : "en",
        "description" : "English",
        "dateFormat" : "MM/dd/yyyy",
        "timeFormat" : "hh:mm a",
        "currency" : "US$",
        "decimalSymbol" : ".",
        "digitalGrouping" : ","
      },
      "timeZone" : {
        "id" : 10096,
        "description" : "GMT+0",
        "rawOffsetMinutes" : 0,
        "timezoneName" : "GMT+0"
      },
      "listenerOrganizations" : [ ],
      "unitSystem" : "METRIC"
    },
    "key" : "128aa9d4-4caa-46c3-a",
    "date" : "2023-10-19",
    "description" : "Sample Route Doc",
    "origin" : {
      "id" : 10282,
      "creationDate" : "2023-10-19T13:30:58+0000",
      "organization" : {
        "id" : 10320,
        "creationDate" : "2023-10-19T13:30:54+0000",
        "key" : "128aa9d4-4caa-46c3-a_O",
        "description" : "Organization Rest Docs Desc",
        "city" : "São Paulo",
        "state" : "São Paulo",
        "preferedLocale" : {
          "id" : 10000,
          "key" : "I18NLocale_en",
          "language" : "en",
          "description" : "English",
          "dateFormat" : "MM/dd/yyyy",
          "timeFormat" : "hh:mm a",
          "currency" : "US$",
          "decimalSymbol" : ".",
          "digitalGrouping" : ","
        },
        "timeZone" : {
          "id" : 10096,
          "description" : "GMT+0",
          "rawOffsetMinutes" : 0,
          "timezoneName" : "GMT+0"
        },
        "listenerOrganizations" : [ ],
        "unitSystem" : "METRIC"
      },
      "key" : "128aa9d4-4caa-46c3-a_O",
      "locationType" : {
        "id" : 10282,
        "creationDate" : "2023-10-19T13:30:58+0000",
        "organization" : {
          "id" : 10320,
          "creationDate" : "2023-10-19T13:30:54+0000",
          "key" : "128aa9d4-4caa-46c3-a_O",
          "description" : "Organization Rest Docs Desc",
          "city" : "São Paulo",
          "state" : "São Paulo",
          "preferedLocale" : {
            "id" : 10000,
            "key" : "I18NLocale_en",
            "language" : "en",
            "description" : "English",
            "dateFormat" : "MM/dd/yyyy",
            "timeFormat" : "hh:mm a",
            "currency" : "US$",
            "decimalSymbol" : ".",
            "digitalGrouping" : ","
          },
          "timeZone" : {
            "id" : 10096,
            "description" : "GMT+0",
            "rawOffsetMinutes" : 0,
            "timezoneName" : "GMT+0"
          },
          "listenerOrganizations" : [ ],
          "unitSystem" : "METRIC"
        },
        "key" : "128aa9d4-4caa-46c3-a_OLocTypeDoc",
        "description" : "Sample LocationType",
        "showOnMobileCreate" : true,
        "enabled" : true,
        "alternativeKey" : "128aa9d4-4caa-46c3-a_OLocTypeDoc128aa9d4-4caa-46c3-a_O"
      },
      "description" : "Location - Description Sample",
      "city" : "FortalezaDoc",
      "state" : "Ceará",
      "country" : "BR",
      "longitude" : -38.46933,
      "latitude" : -3.734536,
      "phone1" : "+55 (85) 9 9988-7766",
      "phone1Type" : "3",
      "email" : "example.greenmile@gogreen.com",
      "deliveryInstructions" : "Sample Delivery Instructions.",
      "deliveryRadius" : 20,
      "deliveryDays" : "0",
      "enabled" : true,
      "hasGeofence" : false,
      "creditLimit" : 1000,
      "legalName" : "Location's Legal Name",
      "alternativeKey" : "128aa9d4-4caa-46c3-a_O128aa9d4-4caa-46c3-a_OLocTypeDoc128aa9d4-4caa-46c3-a_O128aa9d4-4caa-46c3-a_O"
    },
    "origLatitude" : -3.734536,
    "origLongitude" : -38.46933,
    "destination" : {
      "id" : 10283,
      "creationDate" : "2023-10-19T13:30:59+0000",
      "organization" : {
        "id" : 10320,
        "creationDate" : "2023-10-19T13:30:54+0000",
        "key" : "128aa9d4-4caa-46c3-a_O",
        "description" : "Organization Rest Docs Desc",
        "city" : "São Paulo",
        "state" : "São Paulo",
        "preferedLocale" : {
          "id" : 10000,
          "key" : "I18NLocale_en",
          "language" : "en",
          "description" : "English",
          "dateFormat" : "MM/dd/yyyy",
          "timeFormat" : "hh:mm a",
          "currency" : "US$",
          "decimalSymbol" : ".",
          "digitalGrouping" : ","
        },
        "timeZone" : {
          "id" : 10096,
          "description" : "GMT+0",
          "rawOffsetMinutes" : 0,
          "timezoneName" : "GMT+0"
        },
        "listenerOrganizations" : [ ],
        "unitSystem" : "METRIC"
      },
      "key" : "128aa9d4-4caa-46c3-a_D",
      "locationType" : {
        "id" : 10283,
        "creationDate" : "2023-10-19T13:30:59+0000",
        "organization" : {
          "id" : 10320,
          "creationDate" : "2023-10-19T13:30:54+0000",
          "key" : "128aa9d4-4caa-46c3-a_O",
          "description" : "Organization Rest Docs Desc",
          "city" : "São Paulo",
          "state" : "São Paulo",
          "preferedLocale" : {
            "id" : 10000,
            "key" : "I18NLocale_en",
            "language" : "en",
            "description" : "English",
            "dateFormat" : "MM/dd/yyyy",
            "timeFormat" : "hh:mm a",
            "currency" : "US$",
            "decimalSymbol" : ".",
            "digitalGrouping" : ","
          },
          "timeZone" : {
            "id" : 10096,
            "description" : "GMT+0",
            "rawOffsetMinutes" : 0,
            "timezoneName" : "GMT+0"
          },
          "listenerOrganizations" : [ ],
          "unitSystem" : "METRIC"
        },
        "key" : "128aa9d4-4caa-46c3-a_DLocTypeDoc",
        "description" : "Sample LocationType",
        "showOnMobileCreate" : true,
        "enabled" : true,
        "alternativeKey" : "128aa9d4-4caa-46c3-a_DLocTypeDoc128aa9d4-4caa-46c3-a_O"
      },
      "description" : "Location - Description Sample",
      "city" : "FortalezaDoc",
      "state" : "Ceará",
      "country" : "BR",
      "longitude" : -38.46933,
      "latitude" : -3.734536,
      "phone1" : "+55 (85) 9 9988-7766",
      "phone1Type" : "3",
      "email" : "example.greenmile@gogreen.com",
      "deliveryInstructions" : "Sample Delivery Instructions.",
      "deliveryRadius" : 20,
      "deliveryDays" : "0",
      "enabled" : true,
      "hasGeofence" : false,
      "creditLimit" : 1000,
      "legalName" : "Location's Legal Name",
      "alternativeKey" : "128aa9d4-4caa-46c3-a_D128aa9d4-4caa-46c3-a_DLocTypeDoc128aa9d4-4caa-46c3-a_O128aa9d4-4caa-46c3-a_O"
    },
    "destLatitude" : -3.734536,
    "destLongitude" : -38.46933,
    "firstStopIsOrigin" : false,
    "lastStopIsDestination" : false,
    "extraLineItems" : [ ],
    "udfs" : [ ],
    "baseLineArrival" : "2023-10-19T13:30:59+0000",
    "baseLineDeparture" : "2023-10-19T13:30:59+0000",
    "plannedArrival" : "2023-10-19T13:30:59+0000",
    "plannedDeparture" : "2023-10-19T13:30:59+0000",
    "projectedArrival" : "2023-10-19T13:30:59+0000",
    "projectedDeparture" : "2023-10-19T13:30:59+0000",
    "baseLineDistance" : 0.0,
    "plannedDistance" : 0.0,
    "projectedDistance" : 0.0,
    "baseLineComplete" : "2023-10-19T13:30:59+0000",
    "plannedComplete" : "2023-10-19T13:30:59+0000",
    "projectedComplete" : "2023-10-19T13:30:59+0000",
    "baseLineCost" : 0,
    "plannedCost" : 0,
    "baseLineStart" : "2023-10-19T13:30:59+0000",
    "plannedStart" : "2023-10-19T13:30:59+0000",
    "projectedStart" : "2023-10-19T13:30:59+0000",
    "hasHelper" : false,
    "driverAssignments" : [ ],
    "equipmentAssignments" : [ ],
    "tagAssignments" : [ ],
    "additionalMaterials" : [ ],
    "consignedSkus" : [ ],
    "holderMaterials" : [ ],
    "manifests" : [ ],
    "notLoadedSkus" : [ ],
    "totalStops" : 4,
    "canceledStops" : 0,
    "undeliveredStops" : 0,
    "redeliveredStops" : 0,
    "actualDepartures" : 0,
    "status" : "NOT_STARTED",
    "plannedTravelTimeMinutes" : 0,
    "baselineTravelTimeMinutes" : 0,
    "plannedServiceTime" : 0,
    "baselineServiceTime" : 0,
    "hasPicture" : false,
    "plannedSize1" : 0.0,
    "plannedSize2" : 0.0,
    "plannedSize3" : 0.0,
    "plannedPickupSize1" : 0.0,
    "plannedPickupSize2" : 0.0,
    "plannedPickupSize3" : 0.0,
    "hasGps" : false,
    "helperAssignments" : [ ],
    "size1AliasConfig" : {
      "id" : 10000,
      "key" : "Weight",
      "description" : "Weight",
      "icon" : "gmfont-sizes-icon-size1",
      "preferredSize" : "1"
    },
    "size2AliasConfig" : {
      "id" : 10001,
      "key" : "Volume",
      "description" : "Volume",
      "icon" : "gmfont-sizes-icon-size2",
      "preferredSize" : "1"
    },
    "size3AliasConfig" : {
      "id" : 10002,
      "key" : "Value",
      "description" : "Value",
      "icon" : "gmfont-sizes-icon-size3",
      "preferredSize" : "1"
    },
    "onRoute" : false
  },
  "orders" : [ {
    "id" : 10201,
    "creationDate" : "2023-10-19T13:31:00+0000",
    "lastModifier" : {
      "id" : 10060,
      "login" : "gmtmproot",
      "creationDate" : "2023-10-19T13:31:00+0000"
    },
    "lastModificationDate" : "2023-10-19T13:31:00+0000",
    "number" : "128aa9d4-4caa-46c3-a_2_OrderDoc",
    "lineItems" : [ {
      "id" : 10181,
      "creationDate" : "2023-10-19T13:31:00+0000",
      "lastModifier" : {
        "id" : 10060,
        "login" : "gmtmproot",
        "creationDate" : "2023-10-19T13:31:00+0000"
      },
      "lastModificationDate" : "2023-10-19T13:31:00+0000",
      "lineItemID" : "128aa9d4-4caa-46c3-a_2_LID",
      "sku" : {
        "id" : 10165,
        "organization" : {
          "id" : 10320,
          "creationDate" : "2023-10-19T13:30:54+0000",
          "key" : "128aa9d4-4caa-46c3-a_O",
          "description" : "Organization Rest Docs Desc",
          "city" : "São Paulo",
          "state" : "São Paulo",
          "preferedLocale" : {
            "id" : 10000,
            "key" : "I18NLocale_en",
            "language" : "en",
            "description" : "English",
            "dateFormat" : "MM/dd/yyyy",
            "timeFormat" : "hh:mm a",
            "currency" : "US$",
            "decimalSymbol" : ".",
            "digitalGrouping" : ","
          },
          "timeZone" : {
            "id" : 10096,
            "description" : "GMT+0",
            "rawOffsetMinutes" : 0,
            "timezoneName" : "GMT+0"
          },
          "listenerOrganizations" : [ ],
          "unitSystem" : "METRIC"
        },
        "key" : "128aa9d4-4caa-46c3-a_2",
        "description" : "Sample SKU - Juice",
        "enabled" : true,
        "brand" : "Amazing",
        "skuType" : {
          "id" : 10041,
          "organization" : {
            "id" : 10320
          },
          "key" : "128aa9d4-4caa-46c3-a_2",
          "description" : "SkuType Description"
        },
        "baseUnit" : {
          "id" : 10063,
          "key" : "128aa9d4-4caa-46c3-a_2Bottle",
          "description" : "Sample SizeAlias",
          "icon" : "ICON",
          "preferredSize" : "1",
          "sizeDecimalPlaces" : 2
        },
        "secondaryUnit" : {
          "id" : 10064,
          "key" : "128aa9d4-4caa-46c3-a_2Box",
          "description" : "Sample SizeAlias",
          "icon" : "ICON",
          "preferredSize" : "1",
          "sizeDecimalPlaces" : 2
        },
        "tertiaryUnit" : {
          "id" : 10065,
          "key" : "128aa9d4-4caa-46c3-a_2Container",
          "description" : "Sample SizeAlias",
          "icon" : "ICON",
          "preferredSize" : "1",
          "sizeDecimalPlaces" : 2
        },
        "secondaryQty" : 4.0,
        "tertiaryQty" : 4.0,
        "secondaryCompound" : {
          "id" : 10163,
          "organization" : {
            "id" : 10320
          },
          "key" : "128aa9d4-4caa-46c3-a_2SkuSecondary",
          "description" : "Sample SKU",
          "enabled" : true,
          "brand" : "Docik",
          "alternativeKey" : "128aa9d4-4caa-46c3-a_2SkuSecondarynull"
        },
        "tertiaryCompound" : {
          "id" : 10164,
          "organization" : {
            "id" : 10320
          },
          "key" : "128aa9d4-4caa-46c3-a_2SkuTertiary",
          "description" : "Sample SKU",
          "enabled" : true,
          "brand" : "Docik",
          "alternativeKey" : "128aa9d4-4caa-46c3-a_2SkuTertiarynull"
        },
        "secondaryCompoundQty" : 1.0,
        "tertiaryCompoundQty" : 1.0,
        "alternativeKey" : "128aa9d4-4caa-46c3-a_2128aa9d4-4caa-46c3-a_O"
      },
      "hasPicture" : false,
      "size1AliasConfig" : {
        "id" : 10000,
        "key" : "Weight",
        "description" : "Weight",
        "icon" : "gmfont-sizes-icon-size1",
        "preferredSize" : "1"
      },
      "size2AliasConfig" : {
        "id" : 10001,
        "key" : "Volume",
        "description" : "Volume",
        "icon" : "gmfont-sizes-icon-size2",
        "preferredSize" : "1"
      },
      "size3AliasConfig" : {
        "id" : 10002,
        "key" : "Value",
        "description" : "Value",
        "icon" : "gmfont-sizes-icon-size3",
        "preferredSize" : "1"
      }
    } ],
    "plannedSize1" : 0.0,
    "plannedSize2" : 0.0,
    "plannedSize3" : 0.0,
    "plannedPickupSize1" : 0.0,
    "plannedPickupSize2" : 0.0,
    "plannedPickupSize3" : 0.0,
    "hasPicture" : false,
    "size1AliasConfig" : {
      "id" : 10000,
      "key" : "Weight",
      "description" : "Weight",
      "icon" : "gmfont-sizes-icon-size1",
      "preferredSize" : "1"
    },
    "size2AliasConfig" : {
      "id" : 10001,
      "key" : "Volume",
      "description" : "Volume",
      "icon" : "gmfont-sizes-icon-size2",
      "preferredSize" : "1"
    },
    "size3AliasConfig" : {
      "id" : 10002,
      "key" : "Value",
      "description" : "Value",
      "icon" : "gmfont-sizes-icon-size3",
      "preferredSize" : "1"
    }
  } ],
  "location" : {
    "id" : 10281,
    "creationDate" : "2023-10-19T13:30:58+0000",
    "organization" : {
      "id" : 10320,
      "creationDate" : "2023-10-19T13:30:54+0000",
      "key" : "128aa9d4-4caa-46c3-a_O",
      "description" : "Organization Rest Docs Desc",
      "city" : "São Paulo",
      "state" : "São Paulo",
      "preferedLocale" : {
        "id" : 10000,
        "key" : "I18NLocale_en",
        "language" : "en",
        "description" : "English",
        "dateFormat" : "MM/dd/yyyy",
        "timeFormat" : "hh:mm a",
        "currency" : "US$",
        "decimalSymbol" : ".",
        "digitalGrouping" : ","
      },
      "timeZone" : {
        "id" : 10096,
        "description" : "GMT+0",
        "rawOffsetMinutes" : 0,
        "timezoneName" : "GMT+0"
      },
      "listenerOrganizations" : [ ],
      "unitSystem" : "METRIC"
    },
    "key" : "128aa9d4-4caa-46c3-a_2_Loc",
    "locationType" : {
      "id" : 10281,
      "creationDate" : "2023-10-19T13:30:58+0000",
      "organization" : {
        "id" : 10320,
        "creationDate" : "2023-10-19T13:30:54+0000",
        "key" : "128aa9d4-4caa-46c3-a_O",
        "description" : "Organization Rest Docs Desc",
        "city" : "São Paulo",
        "state" : "São Paulo",
        "preferedLocale" : {
          "id" : 10000,
          "key" : "I18NLocale_en",
          "language" : "en",
          "description" : "English",
          "dateFormat" : "MM/dd/yyyy",
          "timeFormat" : "hh:mm a",
          "currency" : "US$",
          "decimalSymbol" : ".",
          "digitalGrouping" : ","
        },
        "timeZone" : {
          "id" : 10096,
          "description" : "GMT+0",
          "rawOffsetMinutes" : 0,
          "timezoneName" : "GMT+0"
        },
        "listenerOrganizations" : [ ],
        "unitSystem" : "METRIC"
      },
      "key" : "128aa9d4-4caa-46c3-a_2_LocLocTypeDoc",
      "description" : "Sample LocationType",
      "showOnMobileCreate" : true,
      "enabled" : true,
      "alternativeKey" : "128aa9d4-4caa-46c3-a_2_LocLocTypeDoc128aa9d4-4caa-46c3-a_O"
    },
    "locationOverrideTimeWindows" : [ ],
    "description" : "Location - Description Sample",
    "city" : "FortalezaDoc",
    "state" : "Ceará",
    "country" : "BR",
    "longitude" : -38.46933,
    "latitude" : -3.734536,
    "phone1" : "+55 (85) 9 9988-7766",
    "phone1Type" : "3",
    "email" : "example.greenmile@gogreen.com",
    "deliveryInstructions" : "Sample Delivery Instructions.",
    "deliveryRadius" : 20,
    "deliveryDays" : "0",
    "enabled" : true,
    "hasGeofence" : false,
    "creditLimit" : 1000,
    "legalName" : "Location's Legal Name",
    "alternativeKey" : "128aa9d4-4caa-46c3-a_2_Loc128aa9d4-4caa-46c3-a_2_LocLocTypeDoc128aa9d4-4caa-46c3-a_O128aa9d4-4caa-46c3-a_O"
  },
  "plannedSequenceNum" : 3,
  "stopType" : {
    "id" : 10282,
    "creationDate" : "2023-10-19T13:30:58+0000",
    "organization" : {
      "id" : 10320,
      "creationDate" : "2023-10-19T13:30:54+0000",
      "key" : "128aa9d4-4caa-46c3-a_O",
      "description" : "Organization Rest Docs Desc",
      "city" : "São Paulo",
      "state" : "São Paulo",
      "preferedLocale" : {
        "id" : 10000,
        "key" : "I18NLocale_en",
        "language" : "en",
        "description" : "English",
        "dateFormat" : "MM/dd/yyyy",
        "timeFormat" : "hh:mm a",
        "currency" : "US$",
        "decimalSymbol" : ".",
        "digitalGrouping" : ","
      },
      "timeZone" : {
        "id" : 10096,
        "description" : "GMT+0",
        "rawOffsetMinutes" : 0,
        "timezoneName" : "GMT+0"
      },
      "listenerOrganizations" : [ ],
      "unitSystem" : "METRIC"
    },
    "key" : "128aa9d4-4caa-46c3-a_2",
    "description" : "Sample StopType",
    "type" : "STOP",
    "locationRequired" : false
  },
  "plannedArrival" : "2023-10-19T13:30:59+0000",
  "projectedArrival" : "2023-10-19T13:31:00+0000",
  "plannedService" : "2023-10-19T13:30:59+0000",
  "projectedService" : "2023-10-19T13:31:00+0000",
  "plannedDeparture" : "2023-10-19T13:30:59+0000",
  "projectedDeparture" : "2023-10-19T13:31:00+0000",
  "plannedDistance" : 0.0,
  "projectedDistance" : 0.0,
  "plannedSize1" : 0.0,
  "plannedSize2" : 0.0,
  "plannedSize3" : 0.0,
  "plannedPickupSize1" : 0.0,
  "plannedPickupSize2" : 0.0,
  "plannedPickupSize3" : 0.0,
  "bulkArriveCanceled" : false,
  "plannedServiceTime" : 0,
  "longitude" : -38.46933,
  "latitude" : -3.734536,
  "ordersInfo" : "[128aa9d4-4caa-46c3-a_2_OrderDoc]",
  "size1AliasConfig" : {
    "id" : 10000,
    "key" : "Weight",
    "description" : "Weight",
    "icon" : "gmfont-sizes-icon-size1",
    "preferredSize" : "1"
  },
  "size2AliasConfig" : {
    "id" : 10001,
    "key" : "Volume",
    "description" : "Volume",
    "icon" : "gmfont-sizes-icon-size2",
    "preferredSize" : "1"
  },
  "size3AliasConfig" : {
    "id" : 10002,
    "key" : "Value",
    "description" : "Value",
    "icon" : "gmfont-sizes-icon-size3",
    "preferredSize" : "1"
  },
  "deliveryStatus" : "PENDING",
  "canceled" : false,
  "returned" : false,
  "redelivered" : false
} ]

Resequence Stops

Resequences the order of the stops in the Route.
Resource URL

<greenmile_address>/Route/<routeId>/SequenceStops
Parameters Mandatory Type Description

stops.id

Yes*

BODY

Stop list to be resequenced informing their id’s.

placementType

No

BODY

Method for the insertion of the new Stop. Possible values: AFTER_STOP, BEFORE_STOP, FIRST, LAST. Default: LAST.

relatedStop

No

BODY

Considered only if AFTER_STOP or BEFORE_STOP are used in placement. Indicates that a new Stop must be inserter after or before the referred one.

route.id

Yes

URL

Id for the route where the Stops are being sequenced.

Attribute location.id or location.key must be informed, if the id is informed then key will be ignored.

placement

The following constraints may be used:
  • BEST_INSERTION: Calculates the best position for the new Stop to be inserted at.

  • AFTER_STOP: Adds the Stop after the related Stop indicated on attribute "relatedStopId".

  • BEFORE_STOP: Adds the Stop before the related Stop indicated on attribute "relatedStopId".

  • FIRST: Adds the Stop to the first position after the already serviced Stops. So if there are three serviced stops, a new stop will be on 4th position.

  • LAST: Adds the Stop to the last position.

relatedStop

This parameter will only be considered case placement informed is "AFTER_STOP" or "BEFORE_STOP".
It’s used to indicate the relative position where the new stop will be inserted.

Example

POST /Route/10200/SequenceStops HTTP/1.1
Content-Type: application/json
Host: 10.76.25.108:8080
Content-Length: 109

{
  "stopIdList" : [ 10200, 10201, 10202 ],
  "relatedStopId" : 10200,
  "placementType" : "BEST_INSERTION"
}
HTTP/1.1 200 OK
Content-Encoding: gzip
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Connection: keep-alive
X-Content-Type-Options: nosniff
Transfer-Encoding: chunked
Server-Version: 6.42-feature-925751-433219
Content-Type: application/json
Content-Length: 763

{
  "id" : 10200,
  "key" : "ce3e8d97-aa31-4c88-8",
  "date" : "2023-10-19",
  "stops" : [ {
    "id" : 10200,
    "key" : "ce3e8d97-aa31-4c88-8StopDoc1",
    "plannedSequenceNum" : 1,
    "bulkArriveCanceled" : false,
    "canceled" : false,
    "returned" : false,
    "redelivered" : false
  }, {
    "id" : 10201,
    "key" : "ce3e8d97-aa31-4c88-8StopDoc2",
    "plannedSequenceNum" : 2,
    "bulkArriveCanceled" : false,
    "canceled" : false,
    "returned" : false,
    "redelivered" : false
  }, {
    "id" : 10202,
    "key" : "ce3e8d97-aa31-4c88-8StopDoc3",
    "plannedSequenceNum" : 3,
    "bulkArriveCanceled" : false,
    "canceled" : false,
    "returned" : false,
    "redelivered" : false
  } ],
  "status" : "NOT_STARTED",
  "onRoute" : false
}

Start Route

Start the given Route, with or without a Driver.
Resource URL

<greenmile_address>/Route/<routeId>/Start

Example

POST /Route/10280/Start HTTP/1.1
Content-Type: application/json
Host: 10.76.25.108:8080
Content-Length: 81

{
  "id" : 10280,
  "actualStart" : "2023-10-19T13:30:25Z",
  "onRoute" : false
}
HTTP/1.1 200 OK
Content-Encoding: gzip
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Connection: keep-alive
X-Content-Type-Options: nosniff
Transfer-Encoding: chunked
Server-Version: 6.42-feature-925751-433219
Content-Type: application/json
Content-Length: 4

true

Route Origin Departure

Depart from Route origin, with or without a Driver.
Resource URL

<greenmile_address>/Route/<routeId>/DepartOrigin

<greenmile_address>/Route/<routeId>/DepartOrigin/NoDriver

Example

POST /Route/10180/DepartOrigin HTTP/1.1
Content-Type: application/json
Host: 10.76.25.108:8080
Content-Length: 126

{
  "id" : 10180,
  "actualDeparture" : "2023-10-19T13:29:46Z",
  "actualStart" : "2023-10-19T13:29:45Z",
  "onRoute" : true
}
HTTP/1.1 200 OK
Content-Encoding: gzip
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Connection: keep-alive
X-Content-Type-Options: nosniff
Transfer-Encoding: chunked
Server-Version: 6.42-feature-925751-433219
Content-Type: application/json
Content-Length: 4

true

Arrive Stop

Arrival at Stop in a given Route, with or without a Driver.
Resource URL

<greenmile_address>/Route/<routeId>/Stop/<stopKey>/Arrive

Example

Request
POST /Route/10201/Stop/9d9b8891-157f-485d-9StopDoc/Arrive HTTP/1.1
Content-Type: application/json
Host: 10.76.25.108:8080
Content-Length: 147

{
  "actualArrival" : "2023-10-19T13:30:01Z",
  "bulkArriveCanceled" : false,
  "returned" : false,
  "redelivered" : false,
  "canceled" : false
}
Response
HTTP/1.1 200 OK
Content-Encoding: gzip
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Connection: keep-alive
X-Content-Type-Options: nosniff
Transfer-Encoding: chunked
Server-Version: 6.42-feature-925751-433219
Content-Type: application/json
Content-Length: 4

true

UpdateDeliveryDetailList

The endpoint to update a list of actualSizes for a specific Stop, Order or LineItem

If it is not added any of actualSizes, actualSizes not added will have their valeu added as 0.

If updated on the LineItem, it will be updated as well on Order and Stop, if it is updated in Order, it will also be updated in Stop.

If you have more than one Order or LineItem, the actualSizes those that are higher in the hierarchy will be the sum resulting from the actualSizes below in the hierarchy.

Example

In body must contain Id of Route, Key of Stop, Id of Stop and at least one ActualSize for update.

In body must contain Id of Order and at least one ActualSize for update.

In body must contain Id of Route, Key of Route, Id of LineItem and at least one ActualSize for update.

Request
POST /Stop/UpdateDeliveryDetailList HTTP/1.1
Content-Type: application/json
Host: 10.76.25.108:8080
Content-Length: 216

{
  "stops" : [ {
    "key" : "1ff07e71-43d2-4dda-8_StopDelivery",
    "route" : {
      "id" : 10022,
      "onRoute" : false
    },
    "actualSize1" : 5.0,
    "actualSize2" : 0.0,
    "actualSize3" : 15.0
  } ]
}
Request
POST /Order/UpdateDeliveryDetailList HTTP/1.1
Content-Type: application/json
Host: 10.76.25.108:8080
Content-Length: 120

{
  "orders" : [ {
    "id" : 10020,
    "actualSize1" : 9.0,
    "actualSize2" : 19.0,
    "actualSize3" : 29.0
  } ]
}
Request
POST /LineItem/UpdateDeliveryDetailList HTTP/1.1
Content-Type: application/json
Host: 10.76.25.108:8080
Content-Length: 207

{
  "lineItemList" : [ {
    "route" : {
      "id" : 10000,
      "key" : "e9cf9f4a-60cf-42bc-9"
    },
    "id" : 10000,
    "actualSize1" : 10.0,
    "actualSize2" : 20.0,
    "actualSize3" : 30.0
  } ]
}

Cancel Stop

Cancel a Stop in a given Route, with or without a Driver.
Resource URL

<greenmile_address>/Route/<routeId>/Stop/<stopKey>/Cancel

Example

POST /Route/10220/Stop/bd9f05d8-9eab-4dbc-aStopDoc/Cancel HTTP/1.1
Content-Type: application/json
Host: 10.76.25.108:8080
Content-Length: 1178

{
  "key" : "bd9f05d8-9eab-4dbc-aStopDoc",
  "plannedSequenceNum" : 1,
  "stopType" : {
    "id" : 10200
  },
  "baseLineArrival" : "2023-10-19T13:30:05Z",
  "plannedArrival" : "2023-10-19T13:30:05Z",
  "projectedArrival" : "2023-10-19T13:30:05Z",
  "actualArrival" : "2023-10-19T13:30:07Z",
  "plannedService" : "2023-10-19T13:30:05Z",
  "projectedService" : "2023-10-19T13:30:05Z",
  "baseLineDeparture" : "2023-10-19T13:30:05Z",
  "plannedDeparture" : "2023-10-19T13:30:05Z",
  "projectedDeparture" : "2023-10-19T13:30:05Z",
  "actualDeparture" : "2023-10-19T13:30:06Z",
  "plannedDistance" : 1234567.0,
  "projectedDistance" : 1234567.0,
  "bulkArriveCanceled" : false,
  "cancelCode" : {
    "id" : 10000,
    "organization" : {
      "id" : 10240,
      "key" : "OrganizationDocumentation",
      "description" : "Organization Rest Docs Desc",
      "city" : "São Paulo",
      "state" : "São Paulo",
      "preferedLocale" : {
        "id" : 10000
      },
      "timeZone" : {
        "id" : 10096
      },
      "unitSystem" : "METRIC"
    },
    "key" : "CancelCodeDoc",
    "description" : "CancelCode Sample",
    "enabled" : true
  },
  "plannedServiceTime" : 0
}
HTTP/1.1 200 OK
Content-Encoding: gzip
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Connection: keep-alive
X-Content-Type-Options: nosniff
Transfer-Encoding: chunked
Server-Version: 6.42-feature-925751-433219
Content-Type: application/json
Content-Length: 4

true

Depart Stop

Departs from a Stop in a given Route, with or without a Driver.
Resource URL

<greenmile_address>/Route/<routeId>/Stop/<stopKey>/Depart/NoDriver

<greenmile_address>/Route/<routeId>/Stop/<stopKey>/Depart

Example

Request
POST /Route/10181/Stop/647880fc-fb39-4b66-bStopDoc/Depart/NoDriver HTTP/1.1
Content-Type: application/json
Host: 10.76.25.108:8080
Content-Length: 149

{
  "actualDeparture" : "2023-10-19T13:29:51Z",
  "bulkArriveCanceled" : false,
  "returned" : false,
  "redelivered" : false,
  "canceled" : false
}
Response
HTTP/1.1 200 OK
Content-Encoding: gzip
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Connection: keep-alive
X-Content-Type-Options: nosniff
Transfer-Encoding: chunked
Server-Version: 6.42-feature-925751-433219
Content-Type: application/json
Content-Length: 4

true

Redelivery Stop

Redelivers a Stop later in a given Route, with or without a Driver.
Resource URL

<greenmile_address>/Route/<routeId>/Stop/<stopKey>/Redelivery/NoDriver

<greenmile_address>/Route/<routeId>/Stop/<stopKey>/Redelivery

Example

POST /Route/10240/Stop/9cdd4ec0-d6c1-4a93-8StopDoc/Redelivery/NoDriver HTTP/1.1
Content-Type: application/json
Host: 10.76.25.108:8080
Content-Length: 162

{
  "key" : "StopDocRedeliveryDoc",
  "actualDeparture" : "2023-10-19T13:30:15Z",
  "bulkArriveCanceled" : false,
  "undeliverableCode" : {
    "id" : 10000
  }
}
HTTP/1.1 200 OK
Content-Encoding: gzip
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Connection: keep-alive
X-Content-Type-Options: nosniff
Transfer-Encoding: chunked
Server-Version: 6.42-feature-925751-433219
Content-Type: application/json
Content-Length: 185

{
  "newStop" : {
    "id" : 10241,
    "key" : "StopDocRedeliveryDoc",
    "bulkArriveCanceled" : false,
    "canceled" : false,
    "returned" : false,
    "redelivered" : false
  }
}

Undeliverable Stop

Make a Stop undeliverable in a given Route, with or without a Driver.
Resource URL

<greenmile_address>/Route/<routeId>/Stop/<stopKey>/Return/NoDriver

<greenmile_address>/Route/<routeId>/Stop/<stopKey>/Return

Example

POST /Route/10284/Stop/0366f4ac-ef4f-4aed-9StopDoc/Return/NoDriver HTTP/1.1
Content-Type: application/json
Host: 10.76.25.108:8080
Content-Length: 750

{
  "key" : "0366f4ac-ef4f-4aed-9StopDoc",
  "plannedSequenceNum" : 1,
  "stopType" : {
    "id" : 10260
  },
  "baseLineArrival" : "2023-10-19T13:30:42Z",
  "plannedArrival" : "2023-10-19T13:30:42Z",
  "projectedArrival" : "2023-10-19T13:30:42Z",
  "actualArrival" : "2023-10-19T13:30:45Z",
  "plannedService" : "2023-10-19T13:30:42Z",
  "projectedService" : "2023-10-19T13:30:42Z",
  "baseLineDeparture" : "2023-10-19T13:30:42Z",
  "plannedDeparture" : "2023-10-19T13:30:42Z",
  "projectedDeparture" : "2023-10-19T13:30:42Z",
  "actualDeparture" : "2023-10-19T13:30:45Z",
  "plannedDistance" : 1234567.0,
  "projectedDistance" : 1234567.0,
  "bulkArriveCanceled" : false,
  "undeliverableCode" : {
    "id" : 10020
  },
  "plannedServiceTime" : 0
}
HTTP/1.1 200 OK
Content-Encoding: gzip
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Connection: keep-alive
X-Content-Type-Options: nosniff
Transfer-Encoding: chunked
Server-Version: 6.42-feature-925751-433219
Content-Type: application/json
Content-Length: 4

true

Route Arrive Destination

Arrives at the route’s destination.
Resource URL

<greenmile_address>/Route/<routeId>/ArriveDestination/NoDriver

<greenmile_address>/Route/<routeId>/ArriveDestination

Example

POST /Route/10160/ArriveDestination HTTP/1.1
Content-Type: application/json
Host: 10.76.25.108:8080
Content-Length: 171

{
  "id" : 10160,
  "actualArrival" : "2023-10-19T13:29:42Z",
  "actualDeparture" : "2023-10-19T13:29:41Z",
  "actualStart" : "2023-10-19T13:29:40Z",
  "onRoute" : false
}
HTTP/1.1 200 OK
Content-Encoding: gzip
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Connection: keep-alive
X-Content-Type-Options: nosniff
Transfer-Encoding: chunked
Server-Version: 6.42-feature-925751-433219
Content-Type: application/json
Content-Length: 4

true

Complete Route

Completes the Route.
Resource URL

<greenmile_address>/Route/<routeId>/Complete

Example

POST /Route/10300/Complete HTTP/1.1
Content-Type: application/json
Host: 10.76.25.108:8080
Content-Length: 246

{
  "id" : 10300,
  "actualArrival" : "2023-10-19T13:30:51Z",
  "actualDeparture" : "2023-10-19T13:30:50Z",
  "actualComplete" : "2023-10-19T13:30:51Z",
  "actualStart" : "2023-10-19T13:30:49Z",
  "actualServiceTime" : 1982,
  "onRoute" : false
}
HTTP/1.1 200 OK
Content-Encoding: gzip
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Connection: keep-alive
X-Content-Type-Options: nosniff
Transfer-Encoding: chunked
Server-Version: 6.42-feature-925751-433219
Content-Type: application/json
Content-Length: 4

true

Clone Route

The endpoint to clone a specific Route

POST /Route/Clone/<routeId>

Example

Request
POST /Route/Clone/15261
Content-Type: application/json; charset=UTF-8
Host: stone.greenmile.com

{
	"date": "2019-05-15",
	"key": "DEF321"
}
Response
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Transfer-Encoding: chunked
Connection: keep-alive
Content-Encoding: gzip
Server-Version: 6.16.8

{
    "id": 151567,
    "creationDate": "2019-05-03T13:40:05+0000",
    "lastModificationDate": "2019-05-02T15:53:27+0000",
    "key": "ROUTE01CLONE",
    "date": "2019-05-15",
    "organization":{
        "id" : 10000,
        "lastModificationDate": "2019-04-16T15:47:27+0000",
        "key": "DEFAULT",
        "..." : "..."
    },
    "..." : "..."
}

Update Route Organization

The endpoint to update the Organization of a specific Route

POST /Route/<routeId>/UpdateRouteOrganization

Example

ID of the new organization for the Route.

Request
POST /Route/15261/UpdateRouteOrganization
Content-Type: application/json; charset=UTF-8
Host: stone.greenmile.com

{
	"id": 10035
}

Deleting a Driver from a Route

This endpoint deletes a Driver from a Route.

DELETE /RouteDriver/<routeDriverId>

Example

Request:
DELETE /RouteDriver/25312
Content-Type: application/json; charset=UTF-8
Host: stone.greenmile.com
Response:
true

These services return all information about a Location such as Latitude and Longitude, Address Street, City, etc. The body of the request should be a JSON describing all the information you want for the query.

Parameters

Path Type Description Mandatory Natural ID

address

String(255)

Indicates a precise street address.

locality

String(255)

Indicates an incorporated city or town political entity.

country

String(5)

Indicates the national political entity, and is typically the highest order type returned by the Geocoder.

administrativeArea

String(255)

Indicates a first-order civil entity below the country level. Within the United States, these administrative levels are states. Not all nations exhibit these administrative levels.

postalCode

String(15)

Indicates a postal code as used to address postal mail within the country.

route

Route

Route id.

Example

Request
POST /Geocode HTTP/1.1
Content-Type: application/json
Host: 10.76.25.108:8080
Content-Length: 146

{
  "address" : "Interstate 4",
  "locality" : "Orlando",
  "country" : "US",
  "administrativeArea" : "Orange County",
  "postalCode" : "32839"
}
Response
HTTP/1.1 200 OK
Content-Encoding: gzip
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Connection: keep-alive
X-Content-Type-Options: nosniff
Transfer-Encoding: chunked
Server-Version: 6.42-feature-925751-433219
Content-Type: application/json
Content-Length: 1253

{
  "status" : "OK",
  "results" : [ {
    "types" : [ "route", "intersection" ],
    "formattedAddress" : "I-4, Orlando, FL 32839, United States",
    "addressComponents" : [ {
      "longName" : "32839",
      "shortName" : "32839",
      "types" : [ "postal_code" ]
    }, {
      "longName" : "United States",
      "shortName" : "USA",
      "types" : [ "country", "political" ]
    }, {
      "longName" : "Florida",
      "shortName" : "FL",
      "types" : [ "administrative_area_level_1", "political" ]
    }, {
      "longName" : "Orange",
      "shortName" : "Orange",
      "types" : [ "administrative_area_level_2", "political" ]
    }, {
      "longName" : "Orlando",
      "shortName" : "Orlando",
      "types" : [ "locality", "political" ]
    }, {
      "longName" : "I-4",
      "shortName" : "I-4",
      "types" : [ "route" ]
    } ],
    "geometry" : {
      "location" : {
        "lat" : 28.48914,
        "lng" : -81.43657
      },
      "locationType" : "RANGE_INTERPOLATED",
      "viewport" : {
        "southwest" : {
          "lat" : 28.47853,
          "lng" : -81.44956
        },
        "northeast" : {
          "lat" : 28.50928,
          "lng" : -81.40059
        }
      }
    },
    "partialMatch" : false
  } ]
}

If you prefer, you can send multiple queries. Just put the Geocode Parameters in a JSON Array. See the example below.

Request
POST /Geocode/Bulk HTTP/1.1
Content-Type: application/json
Host: 10.76.25.108:8080
Content-Length: 264

[ {
  "address" : "Interstate 4",
  "locality" : "Orlando",
  "country" : "US",
  "administrativeArea" : "Orange County",
  "postalCode" : "32839"
}, {
  "address" : "Orange Blossom Trail",
  "locality" : "Orlando",
  "country" : "US",
  "postalCode" : "32809"
} ]
Response
HTTP/1.1 200 OK
Content-Encoding: gzip
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Connection: keep-alive
X-Content-Type-Options: nosniff
Transfer-Encoding: chunked
Server-Version: 6.42-feature-925751-433219
Content-Type: application/json
Content-Length: 2563

[ {
  "status" : "OK",
  "results" : [ {
    "types" : [ "route", "intersection" ],
    "formattedAddress" : "I-4, Orlando, FL 32839, United States",
    "addressComponents" : [ {
      "longName" : "32839",
      "shortName" : "32839",
      "types" : [ "postal_code" ]
    }, {
      "longName" : "United States",
      "shortName" : "USA",
      "types" : [ "country", "political" ]
    }, {
      "longName" : "Florida",
      "shortName" : "FL",
      "types" : [ "administrative_area_level_1", "political" ]
    }, {
      "longName" : "Orange",
      "shortName" : "Orange",
      "types" : [ "administrative_area_level_2", "political" ]
    }, {
      "longName" : "Orlando",
      "shortName" : "Orlando",
      "types" : [ "locality", "political" ]
    }, {
      "longName" : "I-4",
      "shortName" : "I-4",
      "types" : [ "route" ]
    } ],
    "geometry" : {
      "location" : {
        "lat" : 28.48914,
        "lng" : -81.43657
      },
      "locationType" : "RANGE_INTERPOLATED",
      "viewport" : {
        "southwest" : {
          "lat" : 28.47853,
          "lng" : -81.44956
        },
        "northeast" : {
          "lat" : 28.50928,
          "lng" : -81.40059
        }
      }
    },
    "partialMatch" : false
  } ]
}, {
  "status" : "OK",
  "results" : [ {
    "types" : [ "route", "intersection" ],
    "formattedAddress" : "S Orange Blossom Trl, Orlando, FL 32809, United States",
    "addressComponents" : [ {
      "longName" : "32809",
      "shortName" : "32809",
      "types" : [ "postal_code" ]
    }, {
      "longName" : "United States",
      "shortName" : "USA",
      "types" : [ "country", "political" ]
    }, {
      "longName" : "Florida",
      "shortName" : "FL",
      "types" : [ "administrative_area_level_1", "political" ]
    }, {
      "longName" : "Orange",
      "shortName" : "Orange",
      "types" : [ "administrative_area_level_2", "political" ]
    }, {
      "longName" : "Orlando",
      "shortName" : "Orlando",
      "types" : [ "locality", "political" ]
    }, {
      "longName" : "S Orange Blossom Trl",
      "shortName" : "S Orange Blossom Trl",
      "types" : [ "route" ]
    } ],
    "geometry" : {
      "location" : {
        "lat" : 28.45578,
        "lng" : -81.39935
      },
      "locationType" : "RANGE_INTERPOLATED",
      "viewport" : {
        "southwest" : {
          "lat" : 28.43522,
          "lng" : -81.40462
        },
        "northeast" : {
          "lat" : 28.47258,
          "lng" : -81.39654
        }
      }
    },
    "partialMatch" : false
  } ]
} ]

Configuration Services

This service is responsible for setting up an organization. Next, we’ll show you which configuration attributes are available, how to create a configuration, how to retrieve a specific organization’s configuration, and how to update configuration values.

Configuration

Represents an Organization’s settings.

API Entity Name : Configuration
Refer to the CRUD Services to see the details about the create, retrieve, update and delete API methods.

Path Type Description Mandatory Natural ID

id

Integer(22)

The entity’s auto-increment id.

organization

Organization

Indicates the Organization of the Configuration(Version not found)

Yes

Yes

gpsPingInterval

Integer

Defines the time interval for sending coordinates when using GM Driver. (in sec)(Version not found)

Yes

gpsStrategy

GPSStrategy

xxx(Version not found)

Yes

driverMustDoStartService

Boolean

Defines whether the driver needs to indicate the start of the service.(Version not found)

Yes

confirmDeliveriesBeforeDepart

Boolean

Indicates whether it is necessary to confirm deliveries before departure(Version not found)

Yes

mandatoryReasonForDelivery

Boolean

Indicates whether the reason for delivery is mandatory(Version not found)

Yes

mandatoryReasonForOver

Boolean

Indicates whether the reason for the over is mandatory(Version not found)

Yes

mandatoryReasonForShort

Boolean

Indicates whether the reason for the short is mandatory(Version not found)

Yes

mandatoryReasonForPickup

Boolean

Indicates whether the reason for the pickup is mandatory(Version not found)

Yes

mandatoryReasonForDamaged

Boolean

Indicates whether the reason for the damaged is mandatory(Version not found)

Yes

allowOver

Boolean

Indicates whether over delivery is allowed.(Version not found)

Yes

allowShort

Boolean

Indicates whether short delivery is allowed.(Version not found)

Yes

allowDamaged

Boolean

Indicates whether damaged delivery is allowed.(Version not found)

Yes

mandatorySignature

Boolean

Indicates whether the signature is mandatory.(Version not found)

Yes

askEndJourneyInCompleteRoute

Boolean

Ask if it is to end the journey by completing the route.(Version not found)

Yes

hideEquipmentInformation

Boolean

Indicates whether to hide equipment information.(Version not found)

Yes

hideDriverInformation

Boolean

Indicates whether to hide driver information(Version not found)

Yes

startHosOnStartRoute

Boolean

Indicates whether to start Hours Of Service when starting the Route.(Version not found)

Yes

finishHosOnCompleteRoute

Boolean

Indicates whether to finish Hours Of Service when finishing the Route.(Version not found)

Yes

displayOutlookShortcutManager

Boolean

Enables Outlook integration in the application.(Version not found)

Yes

displayWhatsappShortcutManager

Boolean

Enables Whatsapp integration in the application.(Version not found)

Yes

enableGMDriverNextStop

Boolean

Indicates whether the display of the next stop in GM Driver is allowed.(Version not found)

Yes

enableDriverReorderStops

Boolean

Indicates whether the driver is allowed to reorder stops.(Version not found)

Yes

driverCanAddNewStops

Boolean

Indicates whether the driver can add new stops.(Version not found)

Yes

driverCanReopenRoute

Boolean

Indicates whether the driver can reopen routes.(Version not found)

Yes

allowCustomerPartialPayment

Boolean

Indicates whether partial customer payments are allowed.(Version not found)

Yes

customersCanRateDelivery

Boolean

Indicates whether customers can evaluate delivery.(Version not found)

Yes

driverCanViewAndReceivePayment

Boolean

Indicates whether the driver can view and receive payments.(Version not found)

Yes

allowMultiplePaymentMethods

Boolean

Indicates whether multiple forms of payment are allowed.(Version not found)

Yes

simplifiedGmDriverWorkflow

Boolean

Indicates whether to link the user to the equipment / route ID, avoiding unnecessary login steps (require Hours of Service enabled)(Version not found)

Yes

requireHosStartRoute

Boolean

indicates whether to request HOS to start the route(Version not found)

Yes

routeListCriteria

RouteListCriteria

Indicates the Load criteria (DRIVER, EQUIPMENT, DRIVER_OR_EQUIPMENT, DRIVER_AND_EQUIPMENT, ROUTE)(Version not found)

Yes

downloadLocationOffline

Boolean

(Version not found)

Yes

interfaceBuilderEnabled

Boolean

(Version not found)

Yes

displayTrackingInfo

Boolean

Indicates whether the driver can see route tracking information.(Version not found)

Yes

allowDocumentsByDriver

Boolean

Indicates whether the driver can print documents.(Version not found)

Yes

monetarySymbol

String

Monetary Symbol of the organization.(Version not found)

detailLevel

DetailLevel

Indicates the Detail level (STOP, ORDER, LINEITEM).(Version not found)

suggestStops

SuggestStopsConfiguration

Indicates whether the application should suggest stops.(Version not found)

minutesToSuggestStop

Integer

Time in minutes to send a stop suggestion.(Version not found)

pushNotificationEnabled

Boolean

Enable to receive push notifications in the app.(Version not found)

customerProjectedStrategy

CustomerProjectedStrategy

(Version not found)

keepGpsAlive

Boolean

Indicates whether to keep GPS on.(Version not found)

accuracyMetersToIgnorePosition

BigDecimal

Indicates the minimum position accuracy to accept the position (in meters).(Version not found)

distanceMetersToGetPosition

BigDecimal

Indicates the distance to retrieve the GPS position (in meters).(Version not found)

locationsVisitRadiusMeters

Float

Indicates the delivery radius (in meters).(Version not found)

checkpointEnabled

Boolean

Indicates the enabled checkpoint.(Version not found)

checkpointVisibility

CheckpointVisibility

Indicates the visibility of the checkpoint (BLIND, PARTIAL, VISIBLE). BLIND (Blind Count), PARTIAL (Partially Open Count) or VISIBLE (Open Count).(Version not found)

startGpsDaemon

Integer

(Version not found)

endGpsDaemon

Integer

(Version not found)

routeStartAskDelayGreaterThan

Integer

Start route if delayed more than…​ (in minutes).(Version not found)

routeEndAskDelayGreaterThan

Integer

Complete route if delayed more than…​ (in minutes).(Version not found)

packagingLoanEnabled

Boolean

(Version not found)

stopAskDelayGreaterThan

Integer

Arrive at Stop if delayed more than…​ (in minutes).(Version not found)

automaticFillActualSize

Boolean

(Version not found)

minutesToMobileSyncStops

Integer

Indicates the minutes to synchronize the stops.(Version not found)

minutesToSyncChatMessages

Integer

Indicates the minutes to synchronize messages.(Version not found)

suggestLocationsWithinRadius

BigDecimal

Suggest locations within radius. (miles or meters).(Version not found)

defaultHoursOfServiceType

HoursOfServiceType

Represents the default HOS type (startHosOnStartRoute must be enabled)(Version not found)

taxIDValidationRule

TaxIDValidationRule

tax ID Validation Rule. (BRAZILIAN_RULES, NONE)(Version not found)

paymentLevel

PaymentLevel

Indicates the payment level (ORDER or STOP)(Version not found)

enableTicketSupport

Boolean

Needs description(Version not found)

askInvoiceIdentifier

Boolean

Needs description(Version not found)

enableManualCargoCheckForMissingItems

Boolean

Needs description(Version not found)

enableIndividualHOSPunch

Boolean

Needs description(Version not found)

automaticAddLunchStop

Boolean

Needs description(Version not found)

automaticAddBreakStop

Boolean

Needs description(Version not found)

allowChatOnDriver

Boolean

Needs description(Version not found)

seeRestrictedWaysOnMap

Boolean

Needs description(Version not found)

seeRestrictedWaysOnMap

Boolean

Needs description(Version not found)

enableManagerReorderStops

Boolean

Created to allow GreenMile Manager 7 users to reorder stops when at the Stop List screen.(Version not found)

transportAuditEnabled

Boolean

Created to identify whether the driver can send transports to the conference while running a route in the Driver app.(Version not found)

allowAutomaticNewOrder

Boolean

Created to enable automatic creation of orders in Driver 7 app.(Version not found)

allowTaskCreation

Boolean

Allows driver to create tasks by GM Driver(Version not found)

hideFutureRoutesEnabled

Boolean

Created to hide routes with future dates from the default route listing (today’s date) in Driver 7 app route selection screen.(Version not found)

defaultLunchStopType

StopType

This is the stopType used when the Driver is going to make a Lunch stop.(Version not found)

defaultBreakStopType

StopType

This is the stopType used when the Driver is going to make a rest stop.(Version not found)

allowRelatedOrder

Boolean

Feature toggle used to identify if the server has the RelatedOrder field available.(Version not found)

Create

Request
POST /Configuration HTTP/1.1
Content-Type: application/json
Host: 10.76.25.108:8080
Content-Length: 1757

{
  "organization" : {
    "id" : 10194
  },
  "monetarySymbol" : "$",
  "routeListCriteria" : "DRIVER_AND_EQUIPMENT",
  "detailLevel" : "ORDER",
  "gpsPingInterval" : 60,
  "driverMustDoStartService" : true,
  "downloadLocationOffline" : false,
  "confirmDeliveriesBeforeDepart" : false,
  "mandatoryReasonForDelivery" : false,
  "mandatoryReasonForOver" : false,
  "mandatoryReasonForShort" : false,
  "mandatoryReasonForPickup" : false,
  "mandatoryReasonForDamaged" : false,
  "allowOver" : true,
  "requireHosStartRoute" : false,
  "allowShort" : true,
  "allowDamaged" : true,
  "mandatorySignature" : false,
  "askEndJourneyInCompleteRoute" : false,
  "hideEquipmentInformation" : false,
  "hideDriverInformation" : false,
  "interfaceBuilderEnabled" : false,
  "startHosOnStartRoute" : false,
  "finishHosOnCompleteRoute" : false,
  "simplifiedGmDriverWorkflow" : false,
  "displayOutlookShortcutManager" : false,
  "displayWhatsappShortcutManager" : false,
  "enableGMDriverNextStop" : false,
  "enableDriverReorderStops" : false,
  "driverCanAddNewStops" : true,
  "driverCanReopenRoute" : true,
  "allowCustomerPartialPayment" : true,
  "transportAuditEnabled" : false,
  "customersCanRateDelivery" : true,
  "driverCanViewAndReceivePayment" : true,
  "displayTrackingInfo" : true,
  "paymentLevel" : "ORDER",
  "allowDocumentsByDriver" : true,
  "allowMultiplePaymentMethods" : true,
  "allowAutomaticNewOrder" : false,
  "allowTaskCreation" : false,
  "allowChatOnDriver" : false,
  "automaticAddLunchStop" : false,
  "automaticAddBreakStop" : false,
  "hideFutureRoutesEnabled" : false,
  "enableIndividualHOSPunch" : false,
  "enableTicketSupport" : false,
  "askInvoiceIdentifier" : false,
  "enableManualCargoCheckForMissingItems" : false
}
Response
HTTP/1.1 200 OK
Content-Encoding: gzip
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Connection: keep-alive
X-Content-Type-Options: nosniff
Transfer-Encoding: chunked
Server-Version: 6.42-feature-925751-433219
Content-Type: application/json
Content-Length: 2614

{
  "id" : 10213,
  "lastModificationDate" : "2023-10-19T13:29:28+0000",
  "organization" : {
    "id" : 10194,
    "creationDate" : "2023-10-19T13:29:28+0000",
    "key" : "2e5ad70a-0745-4dba-8_O",
    "description" : "Organization Rest Docs Desc",
    "city" : "São Paulo",
    "state" : "São Paulo",
    "preferedLocale" : {
      "id" : 10000,
      "key" : "I18NLocale_en",
      "language" : "en",
      "description" : "English",
      "dateFormat" : "MM/dd/yyyy",
      "timeFormat" : "hh:mm a",
      "currency" : "US$",
      "decimalSymbol" : ".",
      "digitalGrouping" : ","
    },
    "timeZone" : {
      "id" : 10096,
      "description" : "GMT+0",
      "rawOffsetMinutes" : 0,
      "timezoneName" : "GMT+0"
    },
    "listenerOrganizations" : [ ],
    "unitSystem" : "METRIC"
  },
  "monetarySymbol" : "$",
  "routeListCriteria" : "DRIVER_AND_EQUIPMENT",
  "detailLevel" : "ORDER",
  "gpsPingInterval" : 60,
  "driverMustDoStartService" : true,
  "downloadLocationOffline" : false,
  "confirmDeliveriesBeforeDepart" : false,
  "mandatoryReasonForDelivery" : false,
  "mandatoryReasonForOver" : false,
  "mandatoryReasonForShort" : false,
  "mandatoryReasonForPickup" : false,
  "mandatoryReasonForDamaged" : false,
  "allowOver" : true,
  "requireHosStartRoute" : false,
  "allowShort" : true,
  "allowDamaged" : true,
  "mandatorySignature" : false,
  "askEndJourneyInCompleteRoute" : false,
  "hideEquipmentInformation" : false,
  "hideDriverInformation" : false,
  "interfaceBuilderEnabled" : false,
  "startHosOnStartRoute" : false,
  "finishHosOnCompleteRoute" : false,
  "simplifiedGmDriverWorkflow" : false,
  "packagingLoanEnabled" : true,
  "displayOutlookShortcutManager" : false,
  "displayWhatsappShortcutManager" : false,
  "enableGMDriverNextStop" : false,
  "enableDriverReorderStops" : false,
  "driverCanAddNewStops" : true,
  "driverCanReopenRoute" : true,
  "allowCustomerPartialPayment" : true,
  "transportAuditEnabled" : false,
  "customersCanRateDelivery" : true,
  "driverCanViewAndReceivePayment" : true,
  "displayTrackingInfo" : true,
  "taxIDValidationRule" : "NONE",
  "paymentLevel" : "ORDER",
  "allowDocumentsByDriver" : true,
  "allowMultiplePaymentMethods" : true,
  "allowAutomaticNewOrder" : false,
  "allowTaskCreation" : false,
  "allowChatOnDriver" : false,
  "automaticAddLunchStop" : false,
  "automaticAddBreakStop" : false,
  "hideFutureRoutesEnabled" : false,
  "enableIndividualHOSPunch" : false,
  "enableTicketSupport" : false,
  "askInvoiceIdentifier" : false,
  "enableManualCargoCheckForMissingItems" : false,
  "allowRelatedOrder" : false
}

Retrieve by Organization

Request
POST /Configuration/restrictions?criteria=%7B%22filters%22%3A%5B%5D%7D HTTP/1.1
Content-Type: application/json
Host: 10.76.25.108:8080
Content-Length: 68

{
  "attr" : "organization.key",
  "eq" : "021118a2-877d-4945-a_O"
}
Response
HTTP/1.1 200 OK
Content-Encoding: gzip
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Connection: keep-alive
X-Content-Type-Options: nosniff
Transfer-Encoding: chunked
Server-Version: 6.42-feature-925751-433219
Content-Type: application/json
Content-Length: 1997

[ {
  "id" : 10212,
  "creationDate" : "2023-10-19T13:29:27+0000",
  "lastModificationDate" : "2023-10-19T13:29:27+0000",
  "organization" : {
    "key" : "021118a2-877d-4945-a_O"
  },
  "monetarySymbol" : "$",
  "routeListCriteria" : "DRIVER_AND_EQUIPMENT",
  "detailLevel" : "ORDER",
  "gpsPingInterval" : 60,
  "driverMustDoStartService" : true,
  "downloadLocationOffline" : false,
  "confirmDeliveriesBeforeDepart" : false,
  "mandatoryReasonForDelivery" : false,
  "mandatoryReasonForOver" : false,
  "mandatoryReasonForShort" : false,
  "mandatoryReasonForPickup" : false,
  "mandatoryReasonForDamaged" : false,
  "allowOver" : true,
  "requireHosStartRoute" : false,
  "allowShort" : true,
  "allowDamaged" : true,
  "mandatorySignature" : false,
  "askEndJourneyInCompleteRoute" : false,
  "hideEquipmentInformation" : false,
  "hideDriverInformation" : false,
  "interfaceBuilderEnabled" : false,
  "startHosOnStartRoute" : false,
  "finishHosOnCompleteRoute" : false,
  "simplifiedGmDriverWorkflow" : false,
  "packagingLoanEnabled" : true,
  "displayOutlookShortcutManager" : false,
  "displayWhatsappShortcutManager" : false,
  "enableGMDriverNextStop" : false,
  "enableDriverReorderStops" : false,
  "driverCanAddNewStops" : true,
  "driverCanReopenRoute" : true,
  "allowCustomerPartialPayment" : true,
  "transportAuditEnabled" : false,
  "customersCanRateDelivery" : true,
  "driverCanViewAndReceivePayment" : true,
  "displayTrackingInfo" : true,
  "taxIDValidationRule" : "NONE",
  "paymentLevel" : "ORDER",
  "allowDocumentsByDriver" : true,
  "allowMultiplePaymentMethods" : true,
  "allowAutomaticNewOrder" : false,
  "allowTaskCreation" : false,
  "allowChatOnDriver" : false,
  "automaticAddLunchStop" : false,
  "automaticAddBreakStop" : false,
  "hideFutureRoutesEnabled" : false,
  "enableIndividualHOSPunch" : false,
  "enableTicketSupport" : false,
  "askInvoiceIdentifier" : false,
  "enableManualCargoCheckForMissingItems" : false,
  "allowRelatedOrder" : false
} ]

Update

Request
PATCH /Configuration HTTP/1.1
Content-Type: application/json
Host: 10.76.25.108:8080
Content-Length: 133

{
  "id" : 10215,
  "mandatorySignature" : "true",
  "enableDriverReorderStops" : "true",
  "organization" : {
    "id" : 10196
  }
}
Response
HTTP/1.1 200 OK
Content-Encoding: gzip
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Connection: keep-alive
X-Content-Type-Options: nosniff
Transfer-Encoding: chunked
Server-Version: 6.42-feature-925751-433219
Content-Type: application/json
Content-Length: 2659

{
  "id" : 10215,
  "creationDate" : "2023-10-19T13:29:31+0000",
  "lastModificationDate" : "2023-10-19T13:29:32+0000",
  "organization" : {
    "id" : 10196,
    "creationDate" : "2023-10-19T13:29:31+0000",
    "key" : "328bd2cd-9020-47ba-8_O",
    "description" : "Organization Rest Docs Desc",
    "city" : "São Paulo",
    "state" : "São Paulo",
    "preferedLocale" : {
      "id" : 10000,
      "key" : "I18NLocale_en",
      "language" : "en",
      "description" : "English",
      "dateFormat" : "MM/dd/yyyy",
      "timeFormat" : "hh:mm a",
      "currency" : "US$",
      "decimalSymbol" : ".",
      "digitalGrouping" : ","
    },
    "timeZone" : {
      "id" : 10096,
      "description" : "GMT+0",
      "rawOffsetMinutes" : 0,
      "timezoneName" : "GMT+0"
    },
    "listenerOrganizations" : [ ],
    "unitSystem" : "METRIC"
  },
  "monetarySymbol" : "$",
  "routeListCriteria" : "DRIVER_AND_EQUIPMENT",
  "detailLevel" : "ORDER",
  "gpsPingInterval" : 60,
  "driverMustDoStartService" : true,
  "downloadLocationOffline" : false,
  "confirmDeliveriesBeforeDepart" : false,
  "mandatoryReasonForDelivery" : false,
  "mandatoryReasonForOver" : false,
  "mandatoryReasonForShort" : false,
  "mandatoryReasonForPickup" : false,
  "mandatoryReasonForDamaged" : false,
  "allowOver" : true,
  "requireHosStartRoute" : false,
  "allowShort" : true,
  "allowDamaged" : true,
  "mandatorySignature" : true,
  "askEndJourneyInCompleteRoute" : false,
  "hideEquipmentInformation" : false,
  "hideDriverInformation" : false,
  "interfaceBuilderEnabled" : false,
  "startHosOnStartRoute" : false,
  "finishHosOnCompleteRoute" : false,
  "simplifiedGmDriverWorkflow" : false,
  "packagingLoanEnabled" : true,
  "displayOutlookShortcutManager" : false,
  "displayWhatsappShortcutManager" : false,
  "enableGMDriverNextStop" : false,
  "enableDriverReorderStops" : true,
  "driverCanAddNewStops" : true,
  "driverCanReopenRoute" : true,
  "allowCustomerPartialPayment" : true,
  "transportAuditEnabled" : false,
  "customersCanRateDelivery" : true,
  "driverCanViewAndReceivePayment" : true,
  "displayTrackingInfo" : true,
  "taxIDValidationRule" : "NONE",
  "paymentLevel" : "ORDER",
  "allowDocumentsByDriver" : true,
  "allowMultiplePaymentMethods" : true,
  "allowAutomaticNewOrder" : false,
  "allowTaskCreation" : false,
  "allowChatOnDriver" : false,
  "automaticAddLunchStop" : false,
  "automaticAddBreakStop" : false,
  "hideFutureRoutesEnabled" : false,
  "enableIndividualHOSPunch" : false,
  "enableTicketSupport" : false,
  "askInvoiceIdentifier" : false,
  "enableManualCargoCheckForMissingItems" : false,
  "allowRelatedOrder" : false
}

Coordinate

Before anything else, authenticate to the system.

Create

This service is used to send GPS positions to and assign it to an existing piece of equipment. There are two ways of sending coordinates: single insertion and batch insert.

Both services use the same set of parameters described below:

Path Type Description Mandatory Natural ID

equipmentGpsUnitId

String(45)

The Unit Code will be an unique identifier found on the GPS unit. (Version not found)

Yes

position

Object

Position coordinate information. It is an Object containing the latitude and longitude information using decimal formats.

Yes

date

Date

Date from that coordinate.(Version not found)

Yes

speedKmh

Float(22)

Speed in Km/h.(Version not found)

telematic

Object

Sends coordinate with telematics.

odometerMeters

Long(22)

Current odometer value.(Version not found)

engineOn

Boolean

Engine status.(Version not found)

latitude

Double(22)

latitude information. (Deprecated version since 6.10.18, please use Position)

longitude

Double(22)

longitude information. (Deprecated version since 6.10.18, please use Position)

When including Telematics please refer to telematics profile to create new properties.

Use find by example call to retrieve Equipment ID.

Use GPSProvider list to retrieve GpsProviderId.

Single Insertion

This method call will be used when a single coordinate needs to be sent to the server.

POST /Coordinate HTTP/1.1
Content-Type: application/json
Host: 10.76.25.108:8080
Content-Length: 747

{
  "id" : null,
  "equipmentId" : 10200,
  "equipmentKey" : null,
  "equipmentTypeOrgId" : null,
  "equipmentTypeKey" : null,
  "organizationId" : null,
  "mobileDeviceId" : null,
  "position" : {
    "longitude" : -98.471664,
    "latitude" : 29.469791,
    "accuracy" : null
  },
  "speedKmh" : 30.0,
  "odometerMeters" : 10250,
  "engineOn" : true,
  "date" : 1697722740430,
  "savedDate" : null,
  "gpsProviderSavedDate" : null,
  "coordSequence" : null,
  "equipmentGpsUnitId" : "ABC-1234",
  "gpsProviderId" : 10160,
  "telematic" : {
    "9a761bd9-aaf5-4484-9_2" : "150",
    "9a761bd9-aaf5-4484-9_1" : "true"
  },
  "autoArriveDate" : null,
  "stoppedSince" : null,
  "route" : null,
  "latitude" : 29.469791,
  "longitude" : -98.471664
}

Batch Insertion

This service should be used when a set of coordinates need to be registered at once. It is useful to reduce network latency and data consumption. The only difference from the single insertion is that a batch JSON of coordinates is sent to the server.

POST /Coordinates HTTP/1.1
Content-Type: application/json
Host: 10.76.25.108:8080
Content-Length: 492

[ {
  "equipmentId" : 10000,
  "position" : {
    "longitude" : -98.471664,
    "latitude" : 29.469791
  },
  "speedKmh" : 30.0,
  "date" : "2023-10-19T13:26:52Z",
  "gpsProviderId" : 10062,
  "latitude" : 29.469791,
  "longitude" : -98.471664
}, {
  "equipmentId" : 10001,
  "position" : {
    "longitude" : -98.471664,
    "latitude" : 29.469791
  },
  "speedKmh" : 30.0,
  "date" : "2023-10-19T13:26:52Z",
  "gpsProviderId" : 10062,
  "latitude" : 29.469791,
  "longitude" : -98.471664
} ]

Retrieve Coordinates

This service retrieves coordinates from the path of the provided equipment. All date attributes must be in ISO 8601 format.

POST /Coordinate/ActualPathByEquipment HTTP/1.1
Content-Type: application/json
Host: 10.76.25.108:8080
Content-Length: 105

{
  "equipmentId" : 10003,
  "beginDate" : "2023-10-18T00:00:00Z",
  "endDate" : "2023-10-20T00:00:00Z"
}

Response sample:

HTTP/1.1 200 OK
Content-Encoding: gzip
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Connection: keep-alive
X-Content-Type-Options: nosniff
Transfer-Encoding: chunked
Server-Version: 6.42-feature-925751-433219
Content-Type: application/json
Content-Length: 228

[ {
  "id" : "65312ea346b1c20cbe8a9af8",
  "equipmentKey" : "9e2ea5d9-6a6d-49e0-9_E1",
  "position" : {
    "longitude" : -98.471664,
    "latitude" : 29.469791
  },
  "speedKmh" : 30.0,
  "date" : "2023-10-19T13:26:59+0000"
} ]

Recent Coordinates by Equipments

This service retrieves the last position of the equipment, containing all the information of the piece of equipment.

GET /Coordinate/RecentCoordinatesByEquipments HTTP/1.1
Content-Type: application/json
Host: 10.76.25.108:8080

Hours Of Service

Hours of Service (HOS) regulations help ensure overall road safety by governing the number of hours that truck drivers can drive and work. In general, HOS rules regulate the maximum number of hours that can be driven, specify mandatory break times and off times, and duty cycles.

HOS feature will help you monitor and regulate your company´s drivers activity, always watching over the execution of their duties within the legislation of the country your company is operating.

HOS feature allows you to identify drivers and helpers current status, either it is On Duty or Off Duty, Driving, Break, Lunch break or Wait.

On / Off Duty

On/Off Duty function will determine whether the driver’s hours of service are counting or not.

Something really important to highlight is the fact that if Driver´s status is Off Duty, they will not be able to perform Arrive, Leave and Start Service actions. This is due to the fact that such actions determine whether the driver is actually working/on duty.

This function can be configured from GreenMile Live at configurations/configurations screen. There will be a checkbox under the name of Automatically start/finish HOS. By tagging it, you will spare the driver from having to check in and out every time they arrive at or leave a location.

Table 11. On Duty Attributes
Path Type Description Mandatory Natural ID

id

Integer(22)

The entity’s auto-increment id.

driver

Driver

Represents the driver to which the service time refers(Version not found)

Yes

hoursOfServiceType

HoursOfServiceType

Represents the type of hours of service(Version not found)

Yes

inProgress

Boolean

Indicates whether the driver’s service time is in progress(Version not found)

Yes

onDuty

Date

Indicates whether the driver is on duty(Version not found)

Yes

events

[HoursOfServiceEvent]

Represents a list of events that have occurred.(Version not found)

Yes

totalWorkingTimeMinutes

Integer

Represents the total minutes of working time(Version not found)

totalDrivingTimeMinutes

Integer

Represents the total minutes of driving time(Version not found)

totalRestTimeMinutes

Integer

Represents the total minutes of rest time(Version not found)

totalLunchTimeMinutes

Integer

Represents the total minutes of lunch time(Version not found)

totalWaitTimeMinutes

Integer

Represents the total minutes of wait time(Version not found)

totalServiceTimeMinutes

Integer

Represents the total minutes of service time(Version not found)

totalWaitTimeOvertime

Integer

Represents the total minutes of over time(Version not found)

offDuty

Date

indicates whether the driver is off duty(Version not found)

Table 12. Event Attributes

Path

Type

Description

Mandatory

Natural ID

eventType

String(20)

Represents the type of the event. (ON_DUTY, OFF_DUTY, BREAK_START, BREAK_END, LUNCH_START, LUNCH_END, WAIT_START, WAIT_END, DRIVING_START, DRIVING_END)

Yes

eventTime

Date

Represents the time of the event.

Yes

stop

Stop

Represents the stop at which the event was triggered.

latitude

Double(22)

Indicates the event’s latitude.

longitude

Double(22)

Indicates the event’s longitude.

coordinateProvider

String(20)

Indicates the coordinate provider. (GPS, NETWORK, FUSED, PASSIVE).

dataQuality

String(20)

Identifies who informed actualDeparture.

accuracyMeters

Integer(22)

Indicates the accuracy in meters of the event.

Start

Request
POST /HOS/StartDuty HTTP/1.1
Content-Type: application/json
Host: 10.76.25.108:8080
Content-Length: 1165

{
  "driver" : {
    "id" : 10243,
    "login" : "804a15cb-33a3-4b62-9",
    "password" : "1234",
    "preferedLocale" : {
      "id" : 10000
    },
    "organization" : {
      "id" : 10345
    },
    "key" : "804a15cb-33a3-4b62-9",
    "name" : "804a15cb-33a3-4b62-9",
    "unitSystem" : "METRIC",
    "externalUser" : false,
    "driverType" : "DEFAULT",
    "driverProfileCost" : {
      "id" : 10041
    },
    "firstName" : "804a15cb-33a3-4b62-9",
    "lastName" : ""
  },
  "hoursOfServiceType" : {
    "id" : 10001,
    "description" : "Sample HoursOfServiceType",
    "allowBreakAppointment" : true,
    "allowLunchAppointment" : true,
    "allowWaitAppointment" : true,
    "inferDriveTimeBasedRouteActions" : true,
    "organization" : {
      "id" : 10345
    },
    "breakTimeThresholdMinutes" : 10,
    "breakTimeDurationMinutes" : 10,
    "lunchTimeThresholdMinutes" : 10,
    "lunchTimeDurationMinutes" : 10,
    "forceBreakTime" : false,
    "forceLunchTime" : false,
    "enabled" : true
  },
  "inProgress" : true,
  "onDuty" : "2023-10-19T13:31:33Z",
  "events" : [ {
    "eventType" : "ON_DUTY",
    "eventTime" : "2023-10-19T13:31:33Z"
  } ]
}

End

Request
POST /HOS/EndDuty/10246 HTTP/1.1
Content-Type: application/json
Host: 10.76.25.108:8080
Content-Length: 70

{
  "eventType" : "OFF_DUTY",
  "eventTime" : "2023-10-19T13:31:40Z"
}

Driving

This option informs you that the driver is driving.

Start

Request
POST /HOS/StartDriving/10252 HTTP/1.1
Content-Type: application/json
Host: 10.76.25.108:8080
Content-Length: 75

{
  "eventType" : "DRIVING_START",
  "eventTime" : "2023-10-19T13:31:55Z"
}

End

Request
POST /HOS/EndDriving/10242 HTTP/1.1
Content-Type: application/json
Host: 10.76.25.108:8080
Content-Length: 73

{
  "eventType" : "DRIVING_END",
  "eventTime" : "2023-10-19T13:31:30Z"
}

Lunch

This option allows the driver and helpers to determine lunchtime duration.

Start

Request
POST /HOS/StartLunch/10249 HTTP/1.1
Content-Type: application/json
Host: 10.76.25.108:8080
Content-Length: 73

{
  "eventType" : "LUNCH_START",
  "eventTime" : "2023-10-19T13:31:47Z"
}

End

Request
POST /HOS/EndLunch/10251 HTTP/1.1
Content-Type: application/json
Host: 10.76.25.108:8080
Content-Length: 71

{
  "eventType" : "LUNCH_END",
  "eventTime" : "2023-10-19T13:31:52Z"
}

Wait

This type of HOS comes in handy when needing to be more granular at the time of determining driver and helper´s working time.

Start

Request
POST /HOS/StartWait/10244 HTTP/1.1
Content-Type: application/json
Host: 10.76.25.108:8080
Content-Length: 72

{
  "eventType" : "WAIT_START",
  "eventTime" : "2023-10-19T13:31:36Z"
}

End

Request
POST /HOS/EndWait/10247 HTTP/1.1
Content-Type: application/json
Host: 10.76.25.108:8080
Content-Length: 70

{
  "eventType" : "WAIT_END",
  "eventTime" : "2023-10-19T13:31:43Z"
}

Break

This option allows the driver and helpers to determine their break duration.

Start

Request
POST /HOS/StartBreak/10248 HTTP/1.1
Content-Type: application/json
Host: 10.76.25.108:8080
Content-Length: 73

{
  "eventType" : "BREAK_START",
  "eventTime" : "2023-10-19T13:31:45Z"
}

End

Request
POST /HOS/EndBreak/10250 HTTP/1.1
Content-Type: application/json
Host: 10.76.25.108:8080
Content-Length: 71

{
  "eventType" : "BREAK_END",
  "eventTime" : "2023-10-19T13:31:50Z"
}

Retrieve HOS

By Driver

Request
GET /HOS/Status/ByDriver/10253 HTTP/1.1
Content-Type: application/json
Host: 10.76.25.108:8080
Response
HTTP/1.1 200 OK
Content-Encoding: gzip
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Connection: keep-alive
X-Content-Type-Options: nosniff
Transfer-Encoding: chunked
Server-Version: 6.42-feature-925751-433219
Content-Type: application/json
Content-Length: 1542

{
  "id" : 10011,
  "driver" : {
    "id" : 10253,
    "externalUser" : false
  },
  "hoursOfServiceType" : {
    "id" : 10011,
    "key" : "a34d575a-e3cf-4512-a91f-4afa5301d4d4",
    "description" : "Sample HoursOfServiceType",
    "allowBreakAppointment" : true,
    "allowLunchAppointment" : true,
    "allowWaitAppointment" : true,
    "inferDriveTimeBasedRouteActions" : true,
    "organization" : {
      "id" : 10355,
      "creationDate" : "2023-10-19T13:31:56+0000",
      "key" : "040e65a2-1208-443a-b_O",
      "description" : "Organization Rest Docs Desc",
      "city" : "São Paulo",
      "state" : "São Paulo",
      "preferedLocale" : {
        "id" : 10000,
        "key" : "I18NLocale_en",
        "language" : "en",
        "description" : "English",
        "dateFormat" : "MM/dd/yyyy",
        "timeFormat" : "hh:mm a",
        "currency" : "US$",
        "decimalSymbol" : ".",
        "digitalGrouping" : ","
      },
      "timeZone" : {
        "id" : 10096,
        "description" : "GMT+0",
        "rawOffsetMinutes" : 0,
        "timezoneName" : "GMT+0"
      },
      "listenerOrganizations" : [ ],
      "unitSystem" : "METRIC"
    },
    "breakTimeThresholdMinutes" : 10,
    "breakTimeDurationMinutes" : 10,
    "lunchTimeThresholdMinutes" : 10,
    "lunchTimeDurationMinutes" : 10,
    "forceBreakTime" : false,
    "forceLunchTime" : false,
    "enabled" : true
  },
  "inProgress" : true,
  "events" : [ {
    "id" : 10027,
    "eventType" : "ON_DUTY",
    "eventTime" : "2023-10-19T13:31:57+0000"
  } ]
}

SkuOrganizationPriceList

Create

Refer to the CRUD Services to see the details about the create, retrieve, update and delete API methods.

Request Example
POST /SkuOrganizationPriceList HTTP/1.1
Content-Type: application/json
Host: 10.76.25.108:8080
Content-Length: 172

{
  "organization" : {
    "id" : 10489
  },
  "sku" : {
    "id" : 10322
  },
  "sizeAlias" : {
    "id" : 10264
  },
  "price" : 15,
  "tax" : 0.2,
  "appliedTax" : 5.0
}
Response Example
HTTP/1.1 200 OK
Content-Encoding: gzip
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Connection: keep-alive
X-Content-Type-Options: nosniff
Transfer-Encoding: chunked
Server-Version: 6.42-feature-925751-433219
Content-Type: application/json
Content-Length: 188

{
  "id" : 10000,
  "organization" : {
    "id" : 10489
  },
  "sku" : {
    "id" : 10322
  },
  "sizeAlias" : {
    "id" : 10264
  },
  "price" : 15,
  "tax" : 0.2,
  "appliedTax" : 5.0
}

Update

Update an existing record in the table.
The record shown in the request was previously created previously with tax = 0.2. Then modified to 0.5.

Request Example
PATCH /SkuOrganizationPriceList HTTP/1.1
Content-Type: application/json
Host: 10.76.25.108:8080
Content-Length: 33

{
  "id" : 10008,
  "tax" : 0.5
}
Response Example
HTTP/1.1 200 OK
Content-Encoding: gzip
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Connection: keep-alive
X-Content-Type-Options: nosniff
Transfer-Encoding: chunked
Server-Version: 6.42-feature-925751-433219
Content-Type: application/json
Content-Length: 6226

{
  "id" : 10008,
  "organization" : {
    "id" : 10493,
    "creationDate" : "2023-10-19T13:38:36+0000",
    "key" : "3cdd7f57-7ad5-4f4a-a_ORG",
    "description" : "Organization Rest Docs Desc",
    "city" : "São Paulo",
    "state" : "São Paulo",
    "preferedLocale" : {
      "id" : 10000,
      "key" : "I18NLocale_en",
      "language" : "en",
      "description" : "English",
      "dateFormat" : "MM/dd/yyyy",
      "timeFormat" : "hh:mm a",
      "currency" : "US$",
      "decimalSymbol" : ".",
      "digitalGrouping" : ","
    },
    "timeZone" : {
      "id" : 10096,
      "description" : "GMT+0",
      "rawOffsetMinutes" : 0,
      "timezoneName" : "GMT+0"
    },
    "listenerOrganizations" : [ ],
    "unitSystem" : "METRIC"
  },
  "sku" : {
    "id" : 10343,
    "creationDate" : "2023-10-19T13:38:37+0000",
    "organization" : {
      "id" : 10493,
      "creationDate" : "2023-10-19T13:38:36+0000",
      "key" : "3cdd7f57-7ad5-4f4a-a_ORG",
      "description" : "Organization Rest Docs Desc",
      "city" : "São Paulo",
      "state" : "São Paulo",
      "preferedLocale" : {
        "id" : 10000,
        "key" : "I18NLocale_en",
        "language" : "en",
        "description" : "English",
        "dateFormat" : "MM/dd/yyyy",
        "timeFormat" : "hh:mm a",
        "currency" : "US$",
        "decimalSymbol" : ".",
        "digitalGrouping" : ","
      },
      "timeZone" : {
        "id" : 10096,
        "description" : "GMT+0",
        "rawOffsetMinutes" : 0,
        "timezoneName" : "GMT+0"
      },
      "listenerOrganizations" : [ ],
      "unitSystem" : "METRIC"
    },
    "key" : "3cdd7f57-7ad5-4f4a-a_SKU",
    "description" : "Sample SKU - Juice",
    "enabled" : true,
    "brand" : "Amazing",
    "skuType" : {
      "id" : 10147,
      "creationDate" : "2023-10-19T13:38:37+0000",
      "organization" : {
        "id" : 10493,
        "creationDate" : "2023-10-19T13:38:36+0000",
        "key" : "3cdd7f57-7ad5-4f4a-a_ORG",
        "description" : "Organization Rest Docs Desc",
        "city" : "São Paulo",
        "state" : "São Paulo",
        "preferedLocale" : {
          "id" : 10000,
          "key" : "I18NLocale_en",
          "language" : "en",
          "description" : "English",
          "dateFormat" : "MM/dd/yyyy",
          "timeFormat" : "hh:mm a",
          "currency" : "US$",
          "decimalSymbol" : ".",
          "digitalGrouping" : ","
        },
        "timeZone" : {
          "id" : 10096,
          "description" : "GMT+0",
          "rawOffsetMinutes" : 0,
          "timezoneName" : "GMT+0"
        },
        "listenerOrganizations" : [ ],
        "unitSystem" : "METRIC"
      },
      "key" : "3cdd7f57-7ad5-4f4a-a_SKU",
      "description" : "SkuType Description"
    },
    "baseUnit" : {
      "id" : 10293,
      "key" : "3cdd7f57-7ad5-4f4a-a_SKUBottle",
      "description" : "Sample SizeAlias",
      "icon" : "ICON",
      "preferredSize" : "1",
      "sizeDecimalPlaces" : 2
    },
    "secondaryUnit" : {
      "id" : 10294,
      "key" : "3cdd7f57-7ad5-4f4a-a_SKUBox",
      "description" : "Sample SizeAlias",
      "icon" : "ICON",
      "preferredSize" : "1",
      "sizeDecimalPlaces" : 2
    },
    "tertiaryUnit" : {
      "id" : 10295,
      "key" : "3cdd7f57-7ad5-4f4a-a_SKUContainer",
      "description" : "Sample SizeAlias",
      "icon" : "ICON",
      "preferredSize" : "1",
      "sizeDecimalPlaces" : 2
    },
    "secondaryQty" : 4.0,
    "tertiaryQty" : 4.0,
    "secondaryCompound" : {
      "id" : 10341,
      "creationDate" : "2023-10-19T13:38:37+0000",
      "organization" : {
        "id" : 10493,
        "creationDate" : "2023-10-19T13:38:36+0000",
        "key" : "3cdd7f57-7ad5-4f4a-a_ORG",
        "description" : "Organization Rest Docs Desc",
        "city" : "São Paulo",
        "state" : "São Paulo",
        "preferedLocale" : {
          "id" : 10000,
          "key" : "I18NLocale_en",
          "language" : "en",
          "description" : "English",
          "dateFormat" : "MM/dd/yyyy",
          "timeFormat" : "hh:mm a",
          "currency" : "US$",
          "decimalSymbol" : ".",
          "digitalGrouping" : ","
        },
        "timeZone" : {
          "id" : 10096,
          "description" : "GMT+0",
          "rawOffsetMinutes" : 0,
          "timezoneName" : "GMT+0"
        },
        "listenerOrganizations" : [ ],
        "unitSystem" : "METRIC"
      },
      "key" : "3cdd7f57-7ad5-4f4a-a_SKUSkuSecondary",
      "description" : "Sample SKU",
      "enabled" : true,
      "brand" : "Docik",
      "alternativeKey" : "3cdd7f57-7ad5-4f4a-a_SKUSkuSecondary3cdd7f57-7ad5-4f4a-a_ORG"
    },
    "tertiaryCompound" : {
      "id" : 10342,
      "creationDate" : "2023-10-19T13:38:37+0000",
      "organization" : {
        "id" : 10493,
        "creationDate" : "2023-10-19T13:38:36+0000",
        "key" : "3cdd7f57-7ad5-4f4a-a_ORG",
        "description" : "Organization Rest Docs Desc",
        "city" : "São Paulo",
        "state" : "São Paulo",
        "preferedLocale" : {
          "id" : 10000,
          "key" : "I18NLocale_en",
          "language" : "en",
          "description" : "English",
          "dateFormat" : "MM/dd/yyyy",
          "timeFormat" : "hh:mm a",
          "currency" : "US$",
          "decimalSymbol" : ".",
          "digitalGrouping" : ","
        },
        "timeZone" : {
          "id" : 10096,
          "description" : "GMT+0",
          "rawOffsetMinutes" : 0,
          "timezoneName" : "GMT+0"
        },
        "listenerOrganizations" : [ ],
        "unitSystem" : "METRIC"
      },
      "key" : "3cdd7f57-7ad5-4f4a-a_SKUSkuTertiary",
      "description" : "Sample SKU",
      "enabled" : true,
      "brand" : "Docik",
      "alternativeKey" : "3cdd7f57-7ad5-4f4a-a_SKUSkuTertiary3cdd7f57-7ad5-4f4a-a_ORG"
    },
    "secondaryCompoundQty" : 1.0,
    "tertiaryCompoundQty" : 1.0,
    "alternativeKey" : "3cdd7f57-7ad5-4f4a-a_SKU3cdd7f57-7ad5-4f4a-a_ORG"
  },
  "sizeAlias" : {
    "id" : 10292,
    "key" : "3cdd7f57-7ad5-4f4a-a_SKUSize",
    "description" : "Sample SizeAlias",
    "icon" : "ICON",
    "preferredSize" : "1",
    "sizeDecimalPlaces" : 2
  },
  "price" : 15,
  "tax" : 0.5,
  "appliedTax" : 5
}

Retrieve

In this example, it is how to perform the query if the SKU already has a record in the SkuOrganizationPriceList table.

Refer to "How to use restrictions criteria /SkuOrganizationPriceList/restrictions" List by Example.
Request Example
POST /SkuOrganizationPriceList/restrictions?criteria=%7B%22filters%22%3A%5B%22id%22%2C%22skuid%22%5D%7D HTTP/1.1
Content-Type: application/json
Host: 10.76.25.108:8080
Content-Length: 211

{
  "criteriaChain" : [ {
    "and" : [ {
      "attr" : "sku.key",
      "eq" : "79dad09c-a848-4c65-9_SKU"
    }, {
      "attr" : "sku.organization.key",
      "eq" : "79dad09c-a848-4c65-9_org"
    } ]
  } ]
}
Response Example
HTTP/1.1 200 OK
Content-Encoding: gzip
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Connection: keep-alive
X-Content-Type-Options: nosniff
Transfer-Encoding: chunked
Server-Version: 6.42-feature-925751-433219
Content-Type: application/json
Content-Length: 22

[ {
  "id" : 10010
} ]

Chat Services

Message

Sends a new message to an active user and returns a message object containing the ID of the message sent and other details such as the date of creation and the date of sending.

The Object to be sent must contain two mandatory attributes: message and to.
Where message is the text of the message and to is the recipient user.
The recipient of the message can be identified by the following values (as per example):

  • Id

  • Login

  • Key and Organization

In response, you will obtain a ChatMessageResponseDto object.

Request

The entry point URL is /Chat/Message and the HTTP method POST.

Table 13. Request Attributes
Attribute Mandatory Type Description

message

Yes

String

the text of the message to send.

to

yes

User

to is the recipient user and can be identified by the following values: id, login, key and organization

Request Example
POST /Chat/Message HTTP/1.1
Content-Type: application/json; charset=UTF-8
Host: stone.greenmile.com

{
  "message": "Hello! i'm a test message",
  "to": {
    "login": "Jonh"
  }
}
Payload Examples
Example 1
{
  "message": "Hello!",
  "to": {
    "login": "Jonh"
  }
}
Example 2
{
  "message": "Hello!",
  "to": {
    "id": 10140
  }
}
Example 3
{
  "message": "Hello!",
  "to": {
    "key": "jonh",
    "organization": {
      "key": "DSG-001"
    }
  }
}

Response

The response will an entity with the following structure.

ChatMessageResponseDto
Table 14. Response Fields
Path Type Description

id

String

The unique message id.

message

String

Message content.

from

User

The user who sent the message.

to

User

The user receiving the message.

mobileUid

String(36)

Unique mobile Id of the user.

createdDate

String(45)

The message’s creation date [ISO 8601].

sentDate

String(45)

The message’s sent date [ISO 8601].

Response Example
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Transfer-Encoding: chunked
Connection: keep-alive
Content-Encoding: gzip
Server-Version: x.x.x

{
	"id": "6290e95e53d4e913631f5b10",
	"message": "Hello! i'm a test message",
	"from": {
		"id": 10000,
		"organization": {
			"id": 10000,
			"key": "DSG-001",
			"description": "DSG-001",
		},
		"key": "USERKEY"
	},
	"to": {
		"id": 10140,
		"login": "jonh"
	},
	"mobileUid": "0bc29a45-89b2-424f-b6ba-e3aa425adefe",
	"createdDate": "2022-05-27T15:08:13+0000",
	"sentDate": "2022-05-27T15:08:13+0000"
}

AllUnreadMessagesTo

See all messages ChatMessageResponseDto that you sent to a user that have not yet been read.

Request

The entry point URL is /Chat/AllUnreadMessagesTo and the HTTP method GET.

Table 15. URL Query Parameters
Parameters Mandatory Type Description

to

Yes

Number

id of the user who received the messages.

Request Example
GET /Chat/AllUnreadMessagesTo?to=10140 HTTP/1.1
Content-Type: application/json; charset=UTF-8
Host: tenant.greenmile.com

Response

The response will be a List of ChatMessageResponseDto.
Here is the example response for the previous example request passing to equals 10140 (user id).

Response Example
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Transfer-Encoding: chunked
Connection: keep-alive
Content-Encoding: gzip
Server-Version: x.x.x

[
      {
          "id": "6290e95e53d4e913631f5b10",
          "message": "Hello! i'm a test message",
          "from": {
              "id": 10000,
              "organization": {
                  "id": 10000,
                  "key": "DSG-001",
                  "description": "DSG-001",
              },
              "key": "USERKEY"
          },
          "to": {
              "id": 10140,
              "login": "jonh"
          },
          "mobileUid": "0bc29a45-89b2-424f-b6ba-e3aa425adefe",
          "createdDate": "2022-05-27T15:08:13+0000",
          "sentDate": "2022-05-27T15:08:13+0000"
      }
]

AllMessagesByIdAndTo

Queries all messages that have ID equal to the id parameter and that were sent by you to the user with ID equal to the to attribute.

Request

The entry point URL is /Chat/AllMessagesByIdAndTo and the HTTP method GET.

Table 16. URL Query Parameters
Parameters Mandatory Type Description

id

Yes

String

id of the message.

to

Yes

Number

id of the user user receiving the message.

Request Example
GET /Chat/AllMessagesByIdAndTo?to=10140&id=628fe39f80cf7a1f3fa7962d HTTP/1.1
Content-Type: application/json; charset=UTF-8
Host: tenant.greenmile.com

Response

The response will be a List of ChatMessageResponseDto.

Response Example
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Transfer-Encoding: chunked
Connection: keep-alive
Content-Encoding: gzip
Server-Version: x.x.x

[
      {
          "id": "6290e95e53d4e913631f5b10",
          "message": "Hello! i'm a test message",
          "from": {
              "id": 10000,
              "organization": {
                  "id": 10000,
                  "key": "DSG-001",
                  "description": "DSG-001",
              },
              "key": "USERKEY"
          },
          "to": {
              "id": 10140,
              "login": "jonh"
          },
          "mobileUid": "0bc29a45-89b2-424f-b6ba-e3aa425adefe",
          "createdDate": "2022-05-27T15:08:13+0000",
          "sentDate": "2022-05-27T15:08:13+0000"
      }
]

AllMessagesByToAndRange

Queries all messages sent by you to the user of ID equal to the parameter [to] and within the date range given in the [dateFrom] and [dateTo] parameters.
The date format accepted in the parameters is yyyy-MM-dd HH:mm:ss.
For example: 2022-05-26 20:31:17

Request

The entry point URL is /Chat/AllMessagesByToAndRange and the HTTP method GET.

Table 17. URL Query Parameters
Parameters Mandatory Type Description

to

Yes

Number

id of the user user receiving the message.

dateFrom

Yes

Date

Range start date in yyyy-MM-dd HH:mm:ss format.

dateTo

Yes

Date

Range end date in yyyy-MM-dd HH:mm:ss format

Request Example
GET Chat/AllMessagesByToAndRange?to=10140&dateFrom=2022-05-26 20:31:17&dateTo=2022-05-27 00:00:00 HTTP/1.1
Content-Type: application/json; charset=UTF-8
Host: tenant.greenmile.com

Response

The response will be a List of ChatMessageResponseDto.

Response Example
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Transfer-Encoding: chunked
Connection: keep-alive
Content-Encoding: gzip
Server-Version: x.x.x

[
      {
          "id": "6290e95e53d4e913631f5b10",
          "message": "Hello! i'm a test message",
          "from": {
              "id": 10000,
              "organization": {
                  "id": 10000,
                  "key": "DSG-001",
                  "description": "DSG-001",
              },
              "key": "USERKEY"
          },
          "to": {
              "id": 10140,
              "login": "jonh"
          },
          "mobileUid": "0bc29a45-89b2-424f-b6ba-e3aa425adefe",
          "createdDate": "2022-05-27T15:08:13+0000",
          "sentDate": "2022-05-27T15:08:13+0000"
      }
]

Organization Services

Retrieve User´s Organizations By Description

This Entry point returns a list of the organizations whose description field matches the query parameter "description". The description parameter is used to match organizations containing the text provided in its description.

Table 18. Response Attributes
Path Type Description

[].id

Integer(22)

The entity’s auto-increment id.

[].key

String(45)

The entity’s key.

[].description

String(45)

The entity’s description.

Request Example
GET /Organization/retrieveUserOrganizationsByDescription?description=Rest%20Docs%20Des HTTP/1.1
Content-Type: application/json
Host: 10.76.25.108:8080
Response Example
HTTP/1.1 200 OK
Content-Encoding: gzip
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Connection: keep-alive
X-Content-Type-Options: nosniff
Transfer-Encoding: chunked
Server-Version: 6.42-feature-925751-433219
Content-Type: application/json
Content-Length: 880

[ {
  "id" : 10022,
  "key" : "9e2ea5d9-6a6d-49e0-9_O",
  "description" : "Organization Rest Docs Desc"
}, {
  "id" : 10240,
  "key" : "OrganizationDocumentation",
  "description" : "Organization Rest Docs Desc"
}, {
  "id" : 10362,
  "key" : "9d0eeebc-d797-4ae1-8_O",
  "description" : "Organization Rest Docs Desc"
}, {
  "id" : 10518,
  "key" : "d3dcce1e-b7c1-46c2-82b2-42efd16d4015",
  "description" : "Organization Rest Docs Desc"
}, {
  "id" : 10400,
  "key" : "b908256d-49f3-42b3-9_O",
  "description" : "Organization Rest Docs Desc"
}, {
  "id" : 10401,
  "key" : "d4ba510e-b963-4102-9_O",
  "description" : "Organization Rest Docs Desc"
}, {
  "id" : 10517,
  "key" : "d3dcce1e-b7c1-46c2-82b2-42efd16d4015_parent",
  "description" : "Organization Rest Docs Desc"
}, {
  "id" : 10399,
  "key" : "c78becd7-01cb-4007-8_O",
  "description" : "Organization Rest Docs Desc"
} ]

ALL Organizations Tree Hierarchy

Returns a list of ALL the parent Organizations with their children organizations as a Tree ofOrganizations

Table 19. Response Attributes
Path Type Description

[].organization

Organization

Parent Organization

[].childOrganizations

List<Organization>

List of child Organizations

[].childOrganizations[].organization

Organization

Child Organization

Request Example
GET /Organization/TreeHierarchy HTTP/1.1
Content-Type: application/json
Host: 10.76.25.108:8080
Response Example
HTTP/1.1 200 OK
Content-Encoding: gzip
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Connection: keep-alive
X-Content-Type-Options: nosniff
Transfer-Encoding: chunked
Server-Version: 6.42-feature-925751-433219
Content-Type: application/json
Content-Length: 7036

[ {
  "organization" : {
    "id" : 10401,
    "creationDate" : "2023-10-19T13:34:09+0000",
    "key" : "d4ba510e-b963-4102-9_O",
    "description" : "Organization Rest Docs Desc",
    "city" : "São Paulo",
    "state" : "São Paulo",
    "preferedLocale" : {
      "id" : 10000,
      "key" : "I18NLocale_en",
      "language" : "en",
      "description" : "English",
      "dateFormat" : "MM/dd/yyyy",
      "timeFormat" : "hh:mm a",
      "currency" : "US$",
      "decimalSymbol" : ".",
      "digitalGrouping" : ","
    },
    "timeZone" : {
      "id" : 10096,
      "description" : "GMT+0",
      "rawOffsetMinutes" : 0,
      "timezoneName" : "GMT+0"
    },
    "listenerOrganizations" : [ ],
    "unitSystem" : "METRIC"
  }
}, {
  "organization" : {
    "id" : 10240,
    "creationDate" : "2023-10-19T13:30:09+0000",
    "key" : "OrganizationDocumentation",
    "description" : "Organization Rest Docs Desc",
    "city" : "São Paulo",
    "state" : "São Paulo",
    "preferedLocale" : {
      "id" : 10000,
      "key" : "I18NLocale_en",
      "language" : "en",
      "description" : "English",
      "dateFormat" : "MM/dd/yyyy",
      "timeFormat" : "hh:mm a",
      "currency" : "US$",
      "decimalSymbol" : ".",
      "digitalGrouping" : ","
    },
    "timeZone" : {
      "id" : 10096,
      "description" : "GMT+0",
      "rawOffsetMinutes" : 0,
      "timezoneName" : "GMT+0"
    },
    "listenerOrganizations" : [ ],
    "unitSystem" : "METRIC"
  }
}, {
  "organization" : {
    "id" : 10362,
    "creationDate" : "2023-10-19T13:32:16+0000",
    "key" : "9d0eeebc-d797-4ae1-8_O",
    "description" : "Organization Rest Docs Desc",
    "city" : "São Paulo",
    "state" : "São Paulo",
    "preferedLocale" : {
      "id" : 10000,
      "key" : "I18NLocale_en",
      "language" : "en",
      "description" : "English",
      "dateFormat" : "MM/dd/yyyy",
      "timeFormat" : "hh:mm a",
      "currency" : "US$",
      "decimalSymbol" : ".",
      "digitalGrouping" : ","
    },
    "timeZone" : {
      "id" : 10096,
      "description" : "GMT+0",
      "rawOffsetMinutes" : 0,
      "timezoneName" : "GMT+0"
    },
    "listenerOrganizations" : [ ],
    "unitSystem" : "METRIC"
  }
}, {
  "organization" : {
    "id" : 10399,
    "creationDate" : "2023-10-19T13:34:07+0000",
    "key" : "c78becd7-01cb-4007-8_O",
    "description" : "Organization Rest Docs Desc",
    "city" : "São Paulo",
    "state" : "São Paulo",
    "preferedLocale" : {
      "id" : 10000,
      "key" : "I18NLocale_en",
      "language" : "en",
      "description" : "English",
      "dateFormat" : "MM/dd/yyyy",
      "timeFormat" : "hh:mm a",
      "currency" : "US$",
      "decimalSymbol" : ".",
      "digitalGrouping" : ","
    },
    "timeZone" : {
      "id" : 10096,
      "description" : "GMT+0",
      "rawOffsetMinutes" : 0,
      "timezoneName" : "GMT+0"
    },
    "listenerOrganizations" : [ ],
    "unitSystem" : "METRIC"
  }
}, {
  "organization" : {
    "id" : 10400,
    "creationDate" : "2023-10-19T13:34:08+0000",
    "key" : "b908256d-49f3-42b3-9_O",
    "description" : "Organization Rest Docs Desc",
    "city" : "São Paulo",
    "state" : "São Paulo",
    "preferedLocale" : {
      "id" : 10000,
      "key" : "I18NLocale_en",
      "language" : "en",
      "description" : "English",
      "dateFormat" : "MM/dd/yyyy",
      "timeFormat" : "hh:mm a",
      "currency" : "US$",
      "decimalSymbol" : ".",
      "digitalGrouping" : ","
    },
    "timeZone" : {
      "id" : 10096,
      "description" : "GMT+0",
      "rawOffsetMinutes" : 0,
      "timezoneName" : "GMT+0"
    },
    "listenerOrganizations" : [ ],
    "unitSystem" : "METRIC"
  }
}, {
  "organization" : {
    "id" : 10508,
    "creationDate" : "2023-10-19T13:39:27+0000",
    "key" : "7db2ba74-4999-4818-85db-f11cd26efadc_parent",
    "description" : "Organization Rest Docs Desc",
    "city" : "São Paulo",
    "state" : "São Paulo",
    "preferedLocale" : {
      "id" : 10000,
      "key" : "I18NLocale_en",
      "language" : "en",
      "description" : "English",
      "dateFormat" : "MM/dd/yyyy",
      "timeFormat" : "hh:mm a",
      "currency" : "US$",
      "decimalSymbol" : ".",
      "digitalGrouping" : ","
    },
    "timeZone" : {
      "id" : 10096,
      "description" : "GMT+0",
      "rawOffsetMinutes" : 0,
      "timezoneName" : "GMT+0"
    },
    "listenerOrganizations" : [ ],
    "unitSystem" : "METRIC"
  },
  "childOrganizations" : [ {
    "organization" : {
      "id" : 10509,
      "creationDate" : "2023-10-19T13:39:28+0000",
      "key" : "7db2ba74-4999-4818-85db-f11cd26efadc",
      "parentOrganization" : {
        "id" : 10508,
        "creationDate" : "2023-10-19T13:39:27+0000",
        "key" : "7db2ba74-4999-4818-85db-f11cd26efadc_parent",
        "description" : "Organization Rest Docs Desc",
        "city" : "São Paulo",
        "state" : "São Paulo",
        "preferedLocale" : {
          "id" : 10000,
          "key" : "I18NLocale_en",
          "language" : "en",
          "description" : "English",
          "dateFormat" : "MM/dd/yyyy",
          "timeFormat" : "hh:mm a",
          "currency" : "US$",
          "decimalSymbol" : ".",
          "digitalGrouping" : ","
        },
        "timeZone" : {
          "id" : 10096,
          "description" : "GMT+0",
          "rawOffsetMinutes" : 0,
          "timezoneName" : "GMT+0"
        },
        "listenerOrganizations" : [ ],
        "unitSystem" : "METRIC"
      },
      "description" : "Organization Rest Docs Desc",
      "city" : "São Paulo",
      "state" : "São Paulo",
      "preferedLocale" : {
        "id" : 10000,
        "key" : "I18NLocale_en",
        "language" : "en",
        "description" : "English",
        "dateFormat" : "MM/dd/yyyy",
        "timeFormat" : "hh:mm a",
        "currency" : "US$",
        "decimalSymbol" : ".",
        "digitalGrouping" : ","
      },
      "timeZone" : {
        "id" : 10096,
        "description" : "GMT+0",
        "rawOffsetMinutes" : 0,
        "timezoneName" : "GMT+0"
      },
      "listenerOrganizations" : [ ],
      "unitSystem" : "METRIC"
    }
  } ]
}, {
  "organization" : {
    "id" : 10022,
    "creationDate" : "2023-10-19T13:26:58+0000",
    "key" : "9e2ea5d9-6a6d-49e0-9_O",
    "description" : "Organization Rest Docs Desc",
    "city" : "São Paulo",
    "state" : "São Paulo",
    "preferedLocale" : {
      "id" : 10000,
      "key" : "I18NLocale_en",
      "language" : "en",
      "description" : "English",
      "dateFormat" : "MM/dd/yyyy",
      "timeFormat" : "hh:mm a",
      "currency" : "US$",
      "decimalSymbol" : ".",
      "digitalGrouping" : ","
    },
    "timeZone" : {
      "id" : 10096,
      "description" : "GMT+0",
      "rawOffsetMinutes" : 0,
      "timezoneName" : "GMT+0"
    },
    "listenerOrganizations" : [ ],
    "unitSystem" : "METRIC"
  }
}, {
  "organization" : {
    "id" : 10000,
    "key" : "DEFAULT",
    "description" : "Default",
    "listenerOrganizations" : [ ],
    "unitSystem" : "METRIC"
  }
} ]

Organizations Tree Hierarchy by User

Returns a list of the parent Organizations (owned by the user) with their children organizations as a Tree of Organizations

Table 20. Response Attributes
Path Type Description

[].organization

Organization

Parent Organization

[].childOrganizations

List<Organization>

List of child Organizations

[].childOrganizations[].organization

Organization

Child Organization

[].hasPermission

Boolean

Indicates whereas the user has permissions over the Organization

Request Example
GET /Organization/TreeHierarchyByUserOrganization HTTP/1.1
Content-Type: application/json
Host: 10.76.25.108:8080
Response Example
HTTP/1.1 200 OK
Content-Encoding: gzip
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Connection: keep-alive
X-Content-Type-Options: nosniff
Transfer-Encoding: chunked
Server-Version: 6.42-feature-925751-433219
Content-Type: application/json
Content-Length: 7272

[ {
  "organization" : {
    "id" : 10401,
    "creationDate" : "2023-10-19T13:34:09+0000",
    "key" : "d4ba510e-b963-4102-9_O",
    "description" : "Organization Rest Docs Desc",
    "city" : "São Paulo",
    "state" : "São Paulo",
    "preferedLocale" : {
      "id" : 10000,
      "key" : "I18NLocale_en",
      "language" : "en",
      "description" : "English",
      "dateFormat" : "MM/dd/yyyy",
      "timeFormat" : "hh:mm a",
      "currency" : "US$",
      "decimalSymbol" : ".",
      "digitalGrouping" : ","
    },
    "timeZone" : {
      "id" : 10096,
      "description" : "GMT+0",
      "rawOffsetMinutes" : 0,
      "timezoneName" : "GMT+0"
    },
    "listenerOrganizations" : [ ],
    "unitSystem" : "METRIC"
  },
  "hasPermission" : true
}, {
  "organization" : {
    "id" : 10240,
    "creationDate" : "2023-10-19T13:30:09+0000",
    "key" : "OrganizationDocumentation",
    "description" : "Organization Rest Docs Desc",
    "city" : "São Paulo",
    "state" : "São Paulo",
    "preferedLocale" : {
      "id" : 10000,
      "key" : "I18NLocale_en",
      "language" : "en",
      "description" : "English",
      "dateFormat" : "MM/dd/yyyy",
      "timeFormat" : "hh:mm a",
      "currency" : "US$",
      "decimalSymbol" : ".",
      "digitalGrouping" : ","
    },
    "timeZone" : {
      "id" : 10096,
      "description" : "GMT+0",
      "rawOffsetMinutes" : 0,
      "timezoneName" : "GMT+0"
    },
    "listenerOrganizations" : [ ],
    "unitSystem" : "METRIC"
  },
  "hasPermission" : true
}, {
  "organization" : {
    "id" : 10362,
    "creationDate" : "2023-10-19T13:32:16+0000",
    "key" : "9d0eeebc-d797-4ae1-8_O",
    "description" : "Organization Rest Docs Desc",
    "city" : "São Paulo",
    "state" : "São Paulo",
    "preferedLocale" : {
      "id" : 10000,
      "key" : "I18NLocale_en",
      "language" : "en",
      "description" : "English",
      "dateFormat" : "MM/dd/yyyy",
      "timeFormat" : "hh:mm a",
      "currency" : "US$",
      "decimalSymbol" : ".",
      "digitalGrouping" : ","
    },
    "timeZone" : {
      "id" : 10096,
      "description" : "GMT+0",
      "rawOffsetMinutes" : 0,
      "timezoneName" : "GMT+0"
    },
    "listenerOrganizations" : [ ],
    "unitSystem" : "METRIC"
  },
  "hasPermission" : true
}, {
  "organization" : {
    "id" : 10399,
    "creationDate" : "2023-10-19T13:34:07+0000",
    "key" : "c78becd7-01cb-4007-8_O",
    "description" : "Organization Rest Docs Desc",
    "city" : "São Paulo",
    "state" : "São Paulo",
    "preferedLocale" : {
      "id" : 10000,
      "key" : "I18NLocale_en",
      "language" : "en",
      "description" : "English",
      "dateFormat" : "MM/dd/yyyy",
      "timeFormat" : "hh:mm a",
      "currency" : "US$",
      "decimalSymbol" : ".",
      "digitalGrouping" : ","
    },
    "timeZone" : {
      "id" : 10096,
      "description" : "GMT+0",
      "rawOffsetMinutes" : 0,
      "timezoneName" : "GMT+0"
    },
    "listenerOrganizations" : [ ],
    "unitSystem" : "METRIC"
  },
  "hasPermission" : true
}, {
  "organization" : {
    "id" : 10400,
    "creationDate" : "2023-10-19T13:34:08+0000",
    "key" : "b908256d-49f3-42b3-9_O",
    "description" : "Organization Rest Docs Desc",
    "city" : "São Paulo",
    "state" : "São Paulo",
    "preferedLocale" : {
      "id" : 10000,
      "key" : "I18NLocale_en",
      "language" : "en",
      "description" : "English",
      "dateFormat" : "MM/dd/yyyy",
      "timeFormat" : "hh:mm a",
      "currency" : "US$",
      "decimalSymbol" : ".",
      "digitalGrouping" : ","
    },
    "timeZone" : {
      "id" : 10096,
      "description" : "GMT+0",
      "rawOffsetMinutes" : 0,
      "timezoneName" : "GMT+0"
    },
    "listenerOrganizations" : [ ],
    "unitSystem" : "METRIC"
  },
  "hasPermission" : true
}, {
  "organization" : {
    "id" : 10519,
    "creationDate" : "2023-10-19T13:39:37+0000",
    "key" : "f930a75c-e697-4614-92f9-1d3f90cbb3d7_parent",
    "description" : "Organization Rest Docs Desc",
    "city" : "São Paulo",
    "state" : "São Paulo",
    "preferedLocale" : {
      "id" : 10000,
      "key" : "I18NLocale_en",
      "language" : "en",
      "description" : "English",
      "dateFormat" : "MM/dd/yyyy",
      "timeFormat" : "hh:mm a",
      "currency" : "US$",
      "decimalSymbol" : ".",
      "digitalGrouping" : ","
    },
    "timeZone" : {
      "id" : 10096,
      "description" : "GMT+0",
      "rawOffsetMinutes" : 0,
      "timezoneName" : "GMT+0"
    },
    "listenerOrganizations" : [ ],
    "unitSystem" : "METRIC"
  },
  "childOrganizations" : [ {
    "organization" : {
      "id" : 10520,
      "creationDate" : "2023-10-19T13:39:38+0000",
      "key" : "f930a75c-e697-4614-92f9-1d3f90cbb3d7",
      "parentOrganization" : {
        "id" : 10519,
        "creationDate" : "2023-10-19T13:39:37+0000",
        "key" : "f930a75c-e697-4614-92f9-1d3f90cbb3d7_parent",
        "description" : "Organization Rest Docs Desc",
        "city" : "São Paulo",
        "state" : "São Paulo",
        "preferedLocale" : {
          "id" : 10000,
          "key" : "I18NLocale_en",
          "language" : "en",
          "description" : "English",
          "dateFormat" : "MM/dd/yyyy",
          "timeFormat" : "hh:mm a",
          "currency" : "US$",
          "decimalSymbol" : ".",
          "digitalGrouping" : ","
        },
        "timeZone" : {
          "id" : 10096,
          "description" : "GMT+0",
          "rawOffsetMinutes" : 0,
          "timezoneName" : "GMT+0"
        },
        "listenerOrganizations" : [ ],
        "unitSystem" : "METRIC"
      },
      "description" : "Organization Rest Docs Desc",
      "city" : "São Paulo",
      "state" : "São Paulo",
      "preferedLocale" : {
        "id" : 10000,
        "key" : "I18NLocale_en",
        "language" : "en",
        "description" : "English",
        "dateFormat" : "MM/dd/yyyy",
        "timeFormat" : "hh:mm a",
        "currency" : "US$",
        "decimalSymbol" : ".",
        "digitalGrouping" : ","
      },
      "timeZone" : {
        "id" : 10096,
        "description" : "GMT+0",
        "rawOffsetMinutes" : 0,
        "timezoneName" : "GMT+0"
      },
      "listenerOrganizations" : [ ],
      "unitSystem" : "METRIC"
    },
    "hasPermission" : true
  } ],
  "hasPermission" : true
}, {
  "organization" : {
    "id" : 10022,
    "creationDate" : "2023-10-19T13:26:58+0000",
    "key" : "9e2ea5d9-6a6d-49e0-9_O",
    "description" : "Organization Rest Docs Desc",
    "city" : "São Paulo",
    "state" : "São Paulo",
    "preferedLocale" : {
      "id" : 10000,
      "key" : "I18NLocale_en",
      "language" : "en",
      "description" : "English",
      "dateFormat" : "MM/dd/yyyy",
      "timeFormat" : "hh:mm a",
      "currency" : "US$",
      "decimalSymbol" : ".",
      "digitalGrouping" : ","
    },
    "timeZone" : {
      "id" : 10096,
      "description" : "GMT+0",
      "rawOffsetMinutes" : 0,
      "timezoneName" : "GMT+0"
    },
    "listenerOrganizations" : [ ],
    "unitSystem" : "METRIC"
  },
  "hasPermission" : true
}, {
  "organization" : {
    "id" : 10000,
    "key" : "DEFAULT",
    "description" : "Default",
    "listenerOrganizations" : [ ],
    "unitSystem" : "METRIC"
  },
  "hasPermission" : true
} ]

Retrieve Parent Organizations by child id

Returns a list of the parent Organizations which are parents of the organization with id passed as Path parameter

Table 21. Response Attributes
Path Type Description

[]

Array<Integer>

List of Parent Organizations Ids

Request Example
GET /Organization/Parents/10522 HTTP/1.1
Content-Type: application/json
Host: 10.76.25.108:8080
Response Example
HTTP/1.1 200 OK
Content-Encoding: gzip
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Connection: keep-alive
X-Content-Type-Options: nosniff
Transfer-Encoding: chunked
Server-Version: 6.42-feature-925751-433219
Content-Type: application/json
Content-Length: 9

[ 10521 ]

Location Services

Retrieve Latest Services

This Entry point returns a list the latest stops serviced (actually departed) filtered by the location

Table 22. URL Query Parameters
Parameters Mandatory Type Description

locationId

Yes

Number

id to the location.

firstResult

No

Number

The first result to retrieve, numbered from 0.

maxResults

No

Number

The maximum number of results

firstResult and maxResults are optional but it is recommended to use them to implement a pagination. In case no record was found a empty array is returned.

Table 23. Response Attributes
Path Type Description

[].driverId

Integer(22)

Driver internal id.

[].driverKey

String(45)

Driver’s key.

[].driverName

String(105)

Driver Name.

[].lastVisit

Date

Date of the last Visit.

[].lastPlannedVisit

Date

Date of the planned last Visit.

[].reasonDescription

String

Event Reason Description .

[].actualSize1

Double(22)

Actual amount of product that will be delivered on size1.

[].actualSize2

Double(22)

Actual amount of product that will be delivered on size2.

[].actualSize3

Double(22)

Actual amount of product that will be delivered on size3.

Request Example
GET /Location/LatestServices?locationId=10468&maxResults=5&firstResult=0 HTTP/1.1
Content-Type: application/json
Host: 10.76.25.108:8080
Response Example
HTTP/1.1 200 OK
Content-Encoding: gzip
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Connection: keep-alive
X-Content-Type-Options: nosniff
Transfer-Encoding: chunked
Server-Version: 6.42-feature-925751-433219
Content-Type: application/json
Content-Length: 172

[ {
  "driverId" : 10307,
  "driverKey" : "919121a3-4045-45e6-9Driver",
  "driverName" : "919121a3-4045-45e6-9Driver",
  "lastPlannedVisit" : "2023-10-19T13:39:58+0000"
} ]

Retrieve Delivery Statistics

This Entry point returns the delivery statistics for a location (by its id)

Table 24. URL Query Parameters
Parameters Mandatory Type Description

locationId

Yes

Number

id of the location.

Table 25. Response Attributes
Path Type Description

numberOfDeliveries

Integer(22)

Number of Deliveries

deliveriesOnTimeWindow

Integer(22)

Deliveries on TimeWindow

avgSize1

Double(22)

Average amount of product that will be delivered on size1.

avgSize2

Double(22)

Average amount of product that will be delivered on size2.

avgSize3

Double(22)

Average amount of product that will be delivered on size3.

Request Example
GET /Location/DeliveryStatistics?locationId=10466 HTTP/1.1
Content-Type: application/json
Host: 10.76.25.108:8080
Response Example
HTTP/1.1 200 OK
Content-Encoding: gzip
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Connection: keep-alive
X-Content-Type-Options: nosniff
Transfer-Encoding: chunked
Server-Version: 6.42-feature-925751-433219
Content-Type: application/json
Content-Length: 122

{
  "numberOfDeliveries" : 0,
  "deliveriesOnTimeWindow" : 0,
  "avgSize1" : 0.0,
  "avgSize2" : 0.0,
  "avgSize3" : 0.0
}

Find By Bounding Box

Returns a list of [Locations] where its coordinates (lat, long) fall inside the bounding box of coordinates (lat, long) provided.

Table 26. Request Attributes
Path Type Description Mandatory Natural ID

upperRight

Object

Upper Right Box corner

Yes

upperRight.latitude

Number

Upper Right Box corner Point latitude

Yes

upperRight.longitude

Number

Upper Right Box corner Point longitude

Yes

lowerLeft

Object

Lower Left Box corner

Yes

lowerLeft.latitude

Number

Lower Left Box corner Point latitude

Yes

lowerLeft.longitude

Number

Lower Left Box corner Point longitude

Yes

Table 27. Response Attributes
Path Type Description

[].id

Number

The entity’s auto-increment id.

[].creationDate

String

The entity’s creation date.

[].lastModificationDate

String

The moment of the last update of the entity.

[].key

String

The unique database key associated with the specific Location template being defined.

[].description

String

The name that will be displayed in the system for the Location.

[].addressLine1

String

The street address for the Location.

[].addressLine2

String

Additional address information such as apartment.

[].city

String

City of Location’s address.

[].zipCode

String

Postal code of Location’s address.

[].longitude

Number

Longitude using decimal format.

[].latitude

Number

Latitude using decimal format.

[].deliveryDays

String

Delivery days can be represented by M,T,W,R,F,S,U. Each letter represents one delivery day on the week. Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, Sunday. For example, the String "M,R" will represent the delivery days of Monday and Thursday.

[].enabled

Boolean

Activates the Location in GreenMile to be utilized.

[].hasGeofence

Boolean

Shows if the Location has a Geofence.

[].alternativeKey

String

The database alternative key associated with the specific Location template being defined.

[].state

String

State of Location’s address.

[].geocodingQuality

String

Quality of the geocoding information.

[].geocodingDate

String

Date when the location was geocoded.

[].geocodingLastCheck

String

Date time the location geocode was checked

[].nonHelperFixedTimeSecs

Number

Time in seconds fixed of a Non Helper.

[].country

String

Country of Location’s address.

[].phone1

String

Location’s phone number (1) for informational use.

[].phone1Type

String

Primary phone number type. Valid values: 0,1,2,3,4. Meaning: 0 = Work, 1 = Home, 2 = Other, 3 = Mobile, 4 = Fax

[].email

String

Location’s e-mail address.

[].deliveryInstructions

String

Delivery instructions.

[].deliveryRadius

Number

Creates a circle around the location with the radius of the circle configured according to the number entered in miles.

[].creditLimit

Number

Location credit limit.

[].legalName

String

Name of the individual or entity issuing the check.

[].taxID

String

Tax identifier (CPF/CNPJ).

[].nonHelperVarTimeSecs

Number

Time in seconds variable of a Non Helper.

[].taxType

String

Tax type charged at location.

[].appliedTax

Number

The amount related to the tax charged at location.

[].perSize1Rate

Number

Rate per Size 1.

[].fixedCost

Number

Fixed Cost of Location.

[].helperFixedTimeSecs

Number

Time in seconds fixed of a Helper

[].district

String

District of Location’s address.

[].helperVarTimeSecs

Number

Time in seconds variable of a Helper

[].locationType

Object

Location Type.

[].locationType.id

Number

Location Type unique id.

Request Example
POST /Location/FindByBoundingBox HTTP/1.1
Content-Type: application/json
Host: 10.76.25.108:8080
Content-Length: 197

{
  "upperRight" : {
    "latitude" : 12.900000001490117,
    "longitude" : 12.900000001490117
  },
  "lowerLeft" : {
    "latitude" : 11.699999998509885,
    "longitude" : 11.699999998509885
  }
}
Response Example
HTTP/1.1 200 OK
Content-Encoding: gzip
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Connection: keep-alive
X-Content-Type-Options: nosniff
Transfer-Encoding: chunked
Server-Version: 6.42-feature-925751-433219
Content-Type: application/json
Content-Length: 1197

[ {
  "id" : 10429,
  "key" : "5caf68ba-7655-43e5-a95d-c9e64ce7dbe2",
  "locationType" : {
    "id" : 10427
  },
  "longitude" : 12.300000190734863,
  "latitude" : 12.300000190734863,
  "alternativeKey" : "5caf68ba-7655-43e5-a95d-c9e64ce7dbe2"
}, {
  "id" : 10430,
  "key" : "8177edb9-284b-4a16-9830-03176b755f2e",
  "locationType" : {
    "id" : 10427
  },
  "longitude" : 12.40000057220459,
  "latitude" : 12.40000057220459,
  "alternativeKey" : "8177edb9-284b-4a16-9830-03176b755f2e"
}, {
  "id" : 10431,
  "key" : "4afcfdf7-86fa-49f6-9b06-90d524b33d04",
  "locationType" : {
    "id" : 10427
  },
  "longitude" : 12.5,
  "latitude" : 12.5,
  "alternativeKey" : "4afcfdf7-86fa-49f6-9b06-90d524b33d04"
}, {
  "id" : 10432,
  "key" : "9c5a2473-00c5-4934-84e8-0c7f2844081b",
  "locationType" : {
    "id" : 10427
  },
  "longitude" : 12.600000381469727,
  "latitude" : 12.600000381469727,
  "alternativeKey" : "9c5a2473-00c5-4934-84e8-0c7f2844081b"
}, {
  "id" : 10433,
  "key" : "158e087a-6b15-4ef4-80c9-9674fd76f270",
  "locationType" : {
    "id" : 10427
  },
  "longitude" : 12.699999809265137,
  "latitude" : 12.699999809265137,
  "alternativeKey" : "158e087a-6b15-4ef4-80c9-9674fd76f270"
} ]

DeviceStatisticLog Service

Single Log Creation

A simple DeviceStatisticLog entity can be created throughout the following endpoint.

Request Example
POST /DeviceStatistic/Log HTTP/1.1
Content-Type: application/json
Host: 10.76.25.108:8080
Content-Length: 485

{
  "device" : {
    "id" : 10000
  },
  "route" : {
    "id" : 10141
  },
  "when" : "2023-10-19T13:29:06Z",
  "message" : "Message.Message",
  "airPlaneMode" : false,
  "batteryLevel" : 88,
  "gpsStatus" : true,
  "gpsNetworkStatus" : true,
  "connectionStatus" : true,
  "connectionType" : "WIFI",
  "lastValidCoordinate" : "2023-10-19T13:29:06Z",
  "lastCollectedCoordinate" : "2023-10-19T13:29:06Z",
  "pendingGPSCoordinates" : 0,
  "pendingQueue" : 0,
  "appVersion" : "23.0.4"
}
Response Example
HTTP/1.1 200 OK
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Connection: keep-alive
X-Content-Type-Options: nosniff
Server-Version: 6.42-feature-925751-433219

Batch Log Creation

The creation of DeviceStatiscLog entities in batch mode can be achieved by using the endpoint shown next.

Request Example
POST /DeviceStatistic/batch HTTP/1.1
Content-Type: application/json
Host: 10.76.25.108:8080
Content-Length: 976

[ {
  "device" : {
    "id" : 10001
  },
  "route" : {
    "id" : 10142
  },
  "when" : "2023-10-19T13:29:07Z",
  "message" : "Message.Message",
  "airPlaneMode" : false,
  "batteryLevel" : 88,
  "gpsStatus" : true,
  "gpsNetworkStatus" : true,
  "connectionStatus" : true,
  "connectionType" : "WIFI",
  "lastValidCoordinate" : "2023-10-19T13:29:07Z",
  "lastCollectedCoordinate" : "2023-10-19T13:29:07Z",
  "pendingGPSCoordinates" : 0,
  "pendingQueue" : 0,
  "appVersion" : "23.0.4"
}, {
  "device" : {
    "id" : 10001
  },
  "route" : {
    "id" : 10142
  },
  "when" : "2023-10-19T13:29:07Z",
  "message" : "Message.Message",
  "airPlaneMode" : false,
  "batteryLevel" : 88,
  "gpsStatus" : true,
  "gpsNetworkStatus" : true,
  "connectionStatus" : true,
  "connectionType" : "WIFI",
  "lastValidCoordinate" : "2023-10-19T13:29:07Z",
  "lastCollectedCoordinate" : "2023-10-19T13:29:07Z",
  "pendingGPSCoordinates" : 0,
  "pendingQueue" : 0,
  "appVersion" : "23.0.4"
} ]
Response Example
HTTP/1.1 200 OK
Content-Encoding: gzip
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Connection: keep-alive
X-Content-Type-Options: nosniff
Transfer-Encoding: chunked
Server-Version: 6.42-feature-925751-433219
Content-Type: application/json
Content-Length: 4

true

Retrieve DeviceStatisticLog

The request to find DeviceStatisticLog entities can be achieved by sending Monet Criteria in the body of the request POST /DeviceStatistic/restrictions. Next are shown HTTP request and response examples for this endpoint.

Request Example
POST /DeviceStatistic/restrictions?criteria=%7B%22filters%22%3A%5B%22id%22%2C%22when%22%2C%22route.key%22%2C%22device.deviceModel%22%2C%22message%22%2C%22airPlaneMode%22%2C%22batteryLevel%22%2C%22gpsStatus%22%2C%22gpsNetworkStatus%22%2C%22connectionStatus%22%2C%22connectionType%22%2C%22lastValidCoordinate%22%2C%22lastCollectedCoordinate%22%2C%22pendingGPSCoordinates%22%2C%22pendingQueue%22%2C%22route.id%22%5D%2C%22firstResult%22%3A0%2C%22maxResults%22%3A51%7D HTTP/1.1
Content-Type: application/json
Host: 10.76.25.108:8080
Content-Length: 228

{
  "criteriaChain" : [ {
    "and" : [ {
      "attr" : "route.key",
      "eq" : "b9fbba0d-4558-4364-91fc-03bd4da5360f",
      "matchMode" : "EXACT"
    } ]
  } ],
  "sort" : [ {
    "attr" : "when",
    "type" : "ASC"
  } ]
}
Response Example
HTTP/1.1 200 OK
Content-Encoding: gzip
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Connection: keep-alive
X-Content-Type-Options: nosniff
Transfer-Encoding: chunked
Server-Version: 6.42-feature-925751-433219
Content-Type: application/json
Content-Length: 1128

[ {
  "id" : 10003,
  "device" : {
    "id" : 10002
  },
  "route" : {
    "id" : 10143,
    "key" : "b9fbba0d-4558-4364-91fc-03bd4da5360f",
    "onRoute" : false
  },
  "when" : "2023-10-19T13:29:07+0000",
  "message" : "Message.Message",
  "airPlaneMode" : false,
  "batteryLevel" : 88,
  "gpsStatus" : true,
  "gpsNetworkStatus" : true,
  "connectionStatus" : true,
  "connectionType" : "WIFI",
  "lastValidCoordinate" : "2023-10-19T13:29:07+0000",
  "lastCollectedCoordinate" : "2023-10-19T13:29:07+0000",
  "pendingGPSCoordinates" : 0,
  "pendingQueue" : 0
}, {
  "id" : 10004,
  "device" : {
    "id" : 10002
  },
  "route" : {
    "id" : 10143,
    "key" : "b9fbba0d-4558-4364-91fc-03bd4da5360f",
    "onRoute" : false
  },
  "when" : "2023-10-19T13:29:07+0000",
  "message" : "Message.Message",
  "airPlaneMode" : false,
  "batteryLevel" : 88,
  "gpsStatus" : true,
  "gpsNetworkStatus" : true,
  "connectionStatus" : true,
  "connectionType" : "WIFI",
  "lastValidCoordinate" : "2023-10-19T13:29:07+0000",
  "lastCollectedCoordinate" : "2023-10-19T13:29:07+0000",
  "pendingGPSCoordinates" : 0,
  "pendingQueue" : 0
} ]

Driver Services

Save

This entrypoint is similar to Create and Update By Id when id is not provided will create a new entity and if provided it will attemp to update the entity.

Table 28. Request Attributes
Path Type Description Mandatory Natural ID

id

Integer(22)

The entity’s auto-increment id.

password

String(45)

The user’s password.

key

String(45)

The key associated with the specific Driver template being defined.

Yes

Yes

login

String(45)

The name the Driver will enter when logging into the GreenMile system.

Yes

Yes

preferedLocale

I18NLocale

The language associated with the specific Driver template being defined.

organization

Organization

The organization to which the current Driver will apply.

name

String(45)

The name of the Driver you would like displayed in the GreenMile system.

unitSystem

String(10)

The system of measurement that will displayed for the Driver in GreenMile Driver.

licenseNumber

String(45)

The number issues to the driver.

driverType

String(7)

Type of Job for the Driver.

licenseExpires

Date

Date the license expires on.

driverProfileCost

DriverProfileCost

The cost profile that will be utilized to compute the driver’s cost of the route .

lastDrugsTest

Date

The date of the driver’s last drug test.

lastPhysicalTest

Date

The date of the driver’s last physical.

lastAlcoholTest

Date

The date of the driver’s last alcohol test.

smartTrack

Boolean

Indicates if Driver has smart track or not.

failedAttempts

Integer(22)

Amount of login attempts.

lockDate

Date

Locked account Date.

expireDate

Date

Date to lock account.

latestLogin

Date

Date of last login.

passwordExpire

Integer(22)

Days left to change password.

email

String(45)

User’s e-mail address.

enabled

Boolean

Activates the Driver in GreenMile to allow them to log into the system.

timeZone

TimeZone

Driver’s time zone.

udfs

UserUDF

User’s Defined Fields associated to Driver.

organizations

UserOrganization

The organization to which the current Driver will apply.

userAllowedEquipments

UserEquipment

Indicates if Driver has smart track or not.

userAllowedDrivers

UserDriver

Indicates if Driver has smart track or not.

userAllowedTags

UserTag

Represents a list of tags allowed for the user.

addressLine1

String(45)

The street address for the driver.

addressLine2

String(45)

Additional address information such as apartment.

city

String(45)

City of driver’s address.

state

String(45)

State of driver’s address.

zipCode

String(45)

Postal code of driver’s address.

district

String(45)

District of driver’s address.

country

String(45)

County of driver’s address.

longitude

Double(22)

Map coordinates for Longitude of driver’s address.

latitude

Double(22)

Map coordinates for Latitude of driver’s address.

geocodingQuality

String(13)

A selection assigned to how accurate the geocode is.

phone1

String(13)

A selection assigned to how accurate the geocode is.

phone1Type

String(45)

The phone type entered in Phone 1.

phone2

String(45)

User’s phone number (2) for informational use.

phone2Type

String(45)

The phone type entered in Phone 2.

adpFileNumber

String(45)

The employee number provided by ADP for exporting of payroll data to ADP.

defaultEncoding

String(12)

The employee number provided by ADP for exporting of payroll data to ADP.

restrictTags

Boolean

Represents a list of tags not allowed to the user.

leader

User

Represents the leader of the user.

subordinates

User

Represents a list of user subordinates.

restrictUsers

Boolean

Represents a list of restricted users for this user.

ipRangeProfile

IPRangeProfile

Ip Range Profile.

groups

Group

List of groups where the driver belongs.

groups[].id

Boolean

groups[].name

String

groups[].key

String

groups[].isSystem

Boolean

groups[].locked

Boolean

groups[].admin

Boolean

groups[].sysAdmin

Boolean

restrictEquipments

Boolean

Represents a list of restricted users for this user.

restrictDrivers

Boolean

Represents a list of restricted users for this user.

isSystem

Boolean

Indifactes if is system

externalUser

Boolean

Indicates if the driver is an external user

firstName

String(45)

First name of the driver.

lastName

String(45)

Last name of the driver.

ticketTypes

TicketType

Identifies the Ticket Type list.

Table 29. Response Attributes
Path Type Description

id

Integer(22)

The entity’s auto-increment id.

creationDate

Date

The entity’s creation date.

lastModificationDate

Date

The entity’s last modification date.

password

String(45)

The user’s password.

key

String(45)

The key associated with the specific Driver template being defined.

login

String(45)

The name the Driver will enter when logging into the GreenMile system.

preferedLocale

I18NLocale

The language associated with the specific Driver template being defined.

organization

Organization

The organization to which the current Driver will apply.

name

String(45)

The name of the Driver you would like displayed in the GreenMile system.

unitSystem

String(10)

The system of measurement that will displayed for the Driver in GreenMile Driver.

licenseNumber

String(45)

The number issues to the driver.

driverType

String(7)

Type of Job for the Driver.

licenseExpires

Date

Date the license expires on.

driverProfileCost

DriverProfileCost

The cost profile that will be utilized to compute the driver’s cost of the route .

lastDrugsTest

Date

The date of the driver’s last drug test.

lastPhysicalTest

Date

The date of the driver’s last physical.

lastAlcoholTest

Date

The date of the driver’s last alcohol test.

smartTrack

Boolean

Indicates if Driver has smart track or not.

failedAttempts

Integer(22)

Amount of login attempts.

lockDate

Date

Locked account Date.

expireDate

Date

Date to lock account.

latestLogin

Date

Date of last login.

passwordExpire

Integer(22)

Days left to change password.

email

String(45)

User’s e-mail address.

enabled

Boolean

Activates the Driver in GreenMile to allow them to log into the system.

timeZone

TimeZone

Driver’s time zone.

udfs

UserUDF

User’s Defined Fields associated to Driver.

organizations

UserOrganization

The organization to which the current Driver will apply.

userAllowedEquipments

UserEquipment

Indicates if Driver has smart track or not.

userAllowedDrivers

UserDriver

Indicates if Driver has smart track or not.

userAllowedTags

UserTag

Represents a list of tags allowed for the user.

addressLine1

String(45)

The street address for the driver.

addressLine2

String(45)

Additional address information such as apartment.

city

String(45)

City of driver’s address.

state

String(45)

State of driver’s address.

zipCode

String(45)

Postal code of driver’s address.

district

String(45)

District of driver’s address.

country

String(45)

County of driver’s address.

longitude

Double(22)

Map coordinates for Longitude of driver’s address.

latitude

Double(22)

Map coordinates for Latitude of driver’s address.

geocodingQuality

String(13)

A selection assigned to how accurate the geocode is.

phone1

String(13)

A selection assigned to how accurate the geocode is.

phone1Type

String(45)

The phone type entered in Phone 1.

phone2

String(45)

User’s phone number (2) for informational use.

phone2Type

String(45)

The phone type entered in Phone 2.

adpFileNumber

String(45)

The employee number provided by ADP for exporting of payroll data to ADP.

defaultEncoding

String(12)

The employee number provided by ADP for exporting of payroll data to ADP.

restrictTags

Boolean

Represents a list of tags not allowed to the user.

leader

User

Represents the leader of the user.

subordinates

User

Represents a list of user subordinates.

restrictUsers

Boolean

Represents a list of restricted users for this user.

ipRangeProfile

IPRangeProfile

Ip Range Profile.

groups

Group

List of groups where the driver belongs.

groups[].id

Boolean

groups[].name

String

groups[].key

String

groups[].isSystem

Boolean

groups[].locked

Boolean

groups[].admin

Boolean

groups[].sysAdmin

Boolean

restrictEquipments

Boolean

Represents a list of restricted users for this user.

restrictDrivers

Boolean

Represents a list of restricted users for this user.

isSystem

Boolean

Indifactes if is system

externalUser

Boolean

Indicates if the driver is an external user

firstName

String(45)

First name of the driver.

lastName

String(45)

Last name of the driver.

ticketTypes

TicketType

Identifies the Ticket Type list.

Request Example
POST /Driver/Save HTTP/1.1
Content-Type: application/json
Host: 10.76.25.108:8080
Content-Length: 811

{
  "login" : "0ba3ae78-be57-47f7-8",
  "password" : "1234",
  "preferedLocale" : {
    "id" : 10000
  },
  "organization" : {
    "id" : 10535
  },
  "key" : "0ba3ae78-be57-47f7-8",
  "name" : "0ba3ae78-be57-47f7-8",
  "unitSystem" : "METRIC",
  "externalUser" : false,
  "driverType" : "DEFAULT",
  "driverProfileCost" : {
    "id" : 10093,
    "organization" : {
      "id" : 10535
    },
    "description" : "0ba3ae78-be57-47f7-8_DPC Sample",
    "fixedRouteCost" : 1200,
    "costPerHour" : 15,
    "minimumTimeHours" : 8,
    "overtimeRatePerHour" : 30,
    "perDistanceRateKm" : 4,
    "minimumDistance" : 10000,
    "perSize1Rate" : 1,
    "minimumSize1" : 10,
    "enabled" : true,
    "regularTimeMinutes" : 10,
    "fixedStopCost" : 10
  },
  "firstName" : "0ba3ae78-be57-47f7-8",
  "lastName" : ""
}
Response Example
HTTP/1.1 200 OK
Content-Encoding: gzip
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Connection: keep-alive
X-Content-Type-Options: nosniff
Transfer-Encoding: chunked
Server-Version: 6.42-feature-925751-433219
Content-Type: application/json
Content-Length: 1108

{
  "id" : 10313,
  "login" : "0ba3ae78-be57-47f7-8",
  "enabled" : true,
  "failedAttempts" : 0,
  "preferedLocale" : {
    "id" : 10000
  },
  "organization" : {
    "id" : 10535
  },
  "key" : "0ba3ae78-be57-47f7-8",
  "name" : "0ba3ae78-be57-47f7-8",
  "unitSystem" : "METRIC",
  "groups" : [ {
    "id" : 10001,
    "name" : "Drivers",
    "key" : "DRIVER",
    "isSystem" : false,
    "locked" : true,
    "sysAdmin" : false,
    "admin" : false
  } ],
  "restrictEquipments" : false,
  "restrictDrivers" : false,
  "isSystem" : false,
  "externalUser" : false,
  "driverType" : "DEFAULT",
  "driverProfileCost" : {
    "id" : 10093,
    "organization" : {
      "id" : 10535
    },
    "description" : "0ba3ae78-be57-47f7-8_DPC Sample",
    "fixedRouteCost" : 1200,
    "costPerHour" : 15,
    "minimumTimeHours" : 8,
    "overtimeRatePerHour" : 30,
    "perDistanceRateKm" : 4,
    "minimumDistance" : 10000,
    "perSize1Rate" : 1,
    "minimumSize1" : 10,
    "enabled" : true,
    "regularTimeMinutes" : 10,
    "fixedStopCost" : 10
  },
  "firstName" : "0ba3ae78-be57-47f7-8",
  "lastName" : ""
}

Find Assignment Availability

In this entry point "/Driver/FindAssignmentAvailability" a search is performed filtering by a Monet Criteria. It will return a list of Driver that matches the criteria.

Table 30. Response Attributes
Path Type Description

[].driver

Driver

Available driver.

[].assignedToNotCompletedRoute

Boolean

Boolean value that indicates if the Driver is assigned to a not completed route

Request Example
POST /Driver/FindAssignmentAvailability HTTP/1.1
Content-Type: application/json
Host: 10.76.25.108:8080
Content-Length: 102

{
  "attr" : "organization.key",
  "eq" : "4d3d619b-3d57-4be6-8_O_ASSIG",
  "singleOperation" : true
}
Response Example
HTTP/1.1 200 OK
Content-Encoding: gzip
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Connection: keep-alive
X-Content-Type-Options: nosniff
Transfer-Encoding: chunked
Server-Version: 6.42-feature-925751-433219
Content-Type: application/json
Content-Length: 581

[ {
  "driver" : {
    "id" : 10315,
    "login" : "4d3d619b-3d57-4be6-8Driver",
    "enabled" : true,
    "failedAttempts" : 0,
    "organization" : {
      "key" : "4d3d619b-3d57-4be6-8_O_ASSIG"
    },
    "key" : "4d3d619b-3d57-4be6-8Driver",
    "name" : "4d3d619b-3d57-4be6-8Driver",
    "unitSystem" : "METRIC",
    "restrictEquipments" : false,
    "restrictDrivers" : false,
    "isSystem" : false,
    "externalUser" : false,
    "driverType" : "DEFAULT",
    "firstName" : "4d3d619b-3d57-4be6-8Driver",
    "lastName" : ""
  },
  "assignedToNotCompletedRoute" : false
} ]

Equipment Services

Save

This entrypoint is similar to Create and Update By Id when id is not provided will create a new entity and if provided it will attemp to update the entity.

Table 31. Request Attributes
Path Type Description Mandatory Natural ID

key

String(45)

The unique database key associated with the specific Equipment template being defined.

id

Integer(22)

The unique database id associated with the specific Equipment template being defined.

creationDate

String(45)

The entity’s creation date.

lastModificationDate

String(45)

The entity’s last modification date.

organization

Organization

The organization to which the current Equipment template will apply.

equipmentType

EquipmentType

The Equipment Type to which the current Equipment template will apply.

description

String(45)

The name that will be displayed in the system for the Equipment.

enabled

Boolean

Activates the Equipment in GreenMile to allow them to log into the system.

gpsUnitId

String(45)

The Unit Code will be an unique identifier found on the GPS unit.

gpsProvider

GPSProvider

The GPS Black Box provider that is installed in the equipment.

tags

Tag

The name of the tag you would like to associate the equipment with.

udfs

EquipmentUDF

User’s Defined Fields associated to Equipment.

gpsProviderTelematicProfile

GPSProviderTelematicProfile

Profile of GPS provider.

Table 32. Response Attributes
Path Type Description

key

String(45)

The unique database key associated with the specific Equipment template being defined.

id

Integer(22)

The unique database id associated with the specific Equipment template being defined.

creationDate

String(45)

The entity’s creation date.

lastModificationDate

String(45)

The entity’s last modification date.

organization

Organization

The organization to which the current Equipment template will apply.

equipmentType

EquipmentType

The Equipment Type to which the current Equipment template will apply.

description

String(45)

The name that will be displayed in the system for the Equipment.

enabled

Boolean

Activates the Equipment in GreenMile to allow them to log into the system.

gpsUnitId

String(45)

The Unit Code will be an unique identifier found on the GPS unit.

gpsProvider

GPSProvider

The GPS Black Box provider that is installed in the equipment.

tags

Tag

The name of the tag you would like to associate the equipment with.

udfs

EquipmentUDF

User’s Defined Fields associated to Equipment.

gpsProviderTelematicProfile

GPSProviderTelematicProfile

Profile of GPS provider.

Request Example
POST /Equipment/Save HTTP/1.1
Content-Type: application/json
Host: 10.76.25.108:8080
Content-Length: 2200

{
  "id" : null,
  "creationDate" : null,
  "lastModificationDate" : null,
  "organization" : {
    "id" : 10425,
    "creationDate" : null,
    "lastModificationDate" : null,
    "key" : null,
    "parentOrganization" : null,
    "description" : null,
    "addressLine1" : null,
    "addressLine2" : null,
    "city" : null,
    "state" : null,
    "zipcode" : null,
    "district" : null,
    "country" : null,
    "taxid" : null,
    "preferedLocale" : null,
    "timeZone" : null,
    "listenerOrganizations" : null,
    "unitSystem" : null,
    "dsgOrgId" : null,
    "dsgOrganizationId" : null
  },
  "key" : "5db2fecb-e047-4ff1-9",
  "equipmentType" : {
    "id" : 10205,
    "creationDate" : null,
    "lastModificationDate" : null,
    "organization" : null,
    "key" : null,
    "description" : null,
    "udfs" : null,
    "weight" : null,
    "height" : null,
    "width" : null,
    "averageFuelConsumption" : null,
    "carbonFactor" : null,
    "enabled" : null,
    "size1" : null,
    "size2" : null,
    "size3" : null,
    "fixedRouteCost" : null,
    "costPerMinute" : null,
    "minimumTimeMinutes" : null,
    "perDistanceRateKm" : null,
    "minimumDistance" : null,
    "perSize1Rate" : null,
    "minimumSize1" : null,
    "vehicleType" : null,
    "avoidTollRoads" : null,
    "avoidTunnels" : null,
    "avoidShortTurns" : null,
    "avoidAlreadyUsedRoutes" : null,
    "disableChangesFromDriver" : null,
    "maximumEquipmentHeight" : null,
    "equipmentLength" : null,
    "grossEquipmentWeight" : null,
    "axleCount" : null,
    "trailerCount" : null,
    "weightPerAxle" : null,
    "maximumSupportedWeight" : null,
    "tunnelCategory" : null
  },
  "udfs" : null,
  "description" : "Sample Equipment",
  "enabled" : true,
  "gpsUnitId" : null,
  "gpsProvider" : {
    "id" : 10148,
    "key" : "5db2fecb-e047-4ff1-9GPSProviderDoc",
    "description" : "GPSProviderDoc",
    "gpsProviderParams" : null,
    "enabled" : true,
    "country" : "br",
    "timeZone" : {
      "id" : 10096,
      "description" : null,
      "rawOffsetMinutes" : null,
      "alias" : null,
      "timezoneName" : null
    }
  },
  "tags" : [ ],
  "gpsProviderTelematicProfile" : null
}
Response Example
HTTP/1.1 200 OK
Content-Encoding: gzip
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Connection: keep-alive
X-Content-Type-Options: nosniff
Transfer-Encoding: chunked
Server-Version: 6.42-feature-925751-433219
Content-Type: application/json
Content-Length: 479

{
  "id" : 10186,
  "creationDate" : "2023-10-19T13:35:20+0000",
  "organization" : {
    "id" : 10425
  },
  "key" : "5db2fecb-e047-4ff1-9",
  "equipmentType" : {
    "id" : 10205
  },
  "description" : "Sample Equipment",
  "enabled" : true,
  "gpsProvider" : {
    "id" : 10148,
    "key" : "5db2fecb-e047-4ff1-9GPSProviderDoc",
    "description" : "GPSProviderDoc",
    "enabled" : true,
    "country" : "br",
    "timeZone" : {
      "id" : 10096
    }
  },
  "tags" : [ ]
}

Find Assignment Availability

In this entry point "/Equipment/FindAssignmentAvailability" a search is performed filtering by a Monet Criteria. It will return a list of Equipment that matches the criteria.

Table 33. Response Attributes
Path Type Description

[].equipment

Equipment

Route status’s equipment.

[].assignedToNotCompletedRoute

Boolean

Indicates if the equipment is assigned to a not compleated route.

Request Example
POST /Equipment/FindAssignmentAvailability HTTP/1.1
Content-Type: application/json
Host: 10.76.25.108:8080
Content-Length: 706

{
  "attr" : null,
  "aggregate" : null,
  "or" : null,
  "and" : null,
  "criteriaChain" : [ {
    "attr" : "equipment.id",
    "aggregate" : null,
    "or" : null,
    "and" : null,
    "criteriaChain" : null,
    "gt" : null,
    "gte" : null,
    "lt" : null,
    "lte" : null,
    "eq" : 10187,
    "isNull" : null,
    "in" : null,
    "neq" : null,
    "notIn" : null,
    "count" : null,
    "sort" : null,
    "matchMode" : null,
    "singleOperation" : true
  } ],
  "gt" : null,
  "gte" : null,
  "lt" : null,
  "lte" : null,
  "eq" : null,
  "isNull" : null,
  "in" : null,
  "neq" : null,
  "notIn" : null,
  "count" : null,
  "sort" : null,
  "matchMode" : null,
  "singleOperation" : false
}
Response Example
HTTP/1.1 200 OK
Content-Encoding: gzip
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Connection: keep-alive
X-Content-Type-Options: nosniff
Transfer-Encoding: chunked
Server-Version: 6.42-feature-925751-433219
Content-Type: application/json
Content-Length: 700

[ {
  "equipment" : {
    "id" : 10187,
    "creationDate" : "2023-10-19T13:35:22+0000",
    "key" : "ebdc23e4-1ee4-4058-a",
    "description" : "Sample Equipment",
    "enabled" : true
  },
  "assignedToNotCompletedRoute" : false
}, {
  "equipment" : {
    "id" : 10160,
    "creationDate" : "2023-10-19T13:32:17+0000",
    "key" : "9d0eeebc-d797-4ae1-8",
    "description" : "Sample Equipment",
    "enabled" : true
  },
  "assignedToNotCompletedRoute" : true
}, {
  "equipment" : {
    "id" : 10003,
    "creationDate" : "2023-10-19T13:26:59+0000",
    "key" : "9e2ea5d9-6a6d-49e0-9_E1",
    "description" : "Sample Equipment",
    "enabled" : true
  },
  "assignedToNotCompletedRoute" : false
} ]

Route Status

A call to "/Equipment/{equipmentId}/RouteStatus" will return the [RouteStatus] that matches the Equipment with id equals equipmentId.

Table 34. URL Path Parameters
Parameters Mandatory Type Description

equipmentId

Yes

Number

id of the Equipment.

Table 35. Response Attributes
Path Type Description

route

Route

Route status’s route.

equipment

Equipment

Route status’s equipment.

currentArrivals[]

Stop

List of Stops

totalStops

Integer(22)

Route status’s total stops

totalCancelStops

Integer(22)

Route status’s total canceled stops

totalRedeliveryStops

Integer(22)

Route status’s total redelivery stops

totalArrivesStops

Integer(22)

Route status’s total arrives stops

Request Example
GET /Equipment/10180/RouteStatus HTTP/1.1
Content-Type: application/json
Host: 10.76.25.108:8080
Response Example
HTTP/1.1 200 OK
Content-Encoding: gzip
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Connection: keep-alive
X-Content-Type-Options: nosniff
Transfer-Encoding: chunked
Server-Version: 6.42-feature-925751-433219
Content-Type: application/json
Content-Length: 448

{
  "route" : {
    "id" : 10391,
    "organization" : {
      "id" : 10421,
      "description" : "Organization Rest Docs Desc"
    },
    "key" : "ebf0b5be-4c7a-4f40-9",
    "date" : "2023-10-19",
    "status" : "NOT_STARTED",
    "onRoute" : false
  },
  "equipment" : {
    "id" : 10180,
    "enabled" : true
  },
  "currentArrivals" : [ ],
  "totalStops" : 0,
  "totalCancelStops" : 0,
  "totalRedeliveryStops" : 0,
  "totalArrivesStops" : 0
}

Import Route

Table 36. Specification

URL

/Integration/RouteAndDependencies

Method

POST

Body

Route with all dependencies (see an example of this call at the end of this document)

This service creates and updates a Route and its dependencies. The body of the request should be a JSON describing the route filled with all its dependencies, like Locations, StopTypes, Equipment, etc.
For each dependency, if it does not exists the service will create it. If the dependency already exists, the service will update it with the changed information.
It’s important to note that:

  1. You are not required to specify the ID due to the fact that since the entity does not exist, its ID will be created.

  2. If the entity exists and you do not specify its id, we will try to identify it based on its natural IDs. So, if you don’t specify the entity ID, you must specify its natural IDs.

  3. You don’t need to (actually, you should not) request on all the entities the route depends on before you create the route. You should only send a request (this one) with all things inside.

  4. You don’t need to worry about erasing attributes that you will not send on the body for each entity. We will only update the attributes that you specify.

  5. You cannot update a route after it was started.

Affected Entities

This service will create or update these entities:

Note that Organization is not on this list. That means that this service will not create either update organizations. You should send only existent organizations, identified by its key.

Assumptions

  1. If you do not specify the organization of any entity, we will consider the route’s organization.

  2. When creating Location: If Location’s Timezone is not specified, we will use the Route’s Organization Timezone.

  3. When creating Driver: If you do not specify the Driver’s language (preferred locale) we will consider the language of the Route’s Organization. If it’s empty we will throw EntityNotFoundException.

Attributes

Minimum Attributes

More details at: Route.

Table 37. Attributes
Path Type Description Mandatory

stops

stops

List of Stops.

Yes

key

String(45)

Identifier to Route.

Yes

date

Date

Route date.

Yes

organization

organization

The organization to which the route belongs.

Yes

origin

location

Location of the starting point of the route.

Yes

destination

location

Last location to end the route.

Yes

lastStopIsDestination

Boolean

if the last stop is destination.

Yes

plannedStart

Date

Planned start of the route.

Yes

plannedDeparture

Date

Planned departure of the route.

Yes (calculatePlanning: if sent as true, GM will be responsible for calculating this property)

plannedArrival

Date

Planned arrival of the route.

Yes (calculatePlanning: if sent as true, GM will be responsible for calculating this property)

plannedComplete

Date

Planned complete of the route.

Yes (calculatePlanning: if sent as true, GM will be responsible for calculating this property)

hasHelper

Boolean

the route has a helper.

Yes

organization

More details at: Organization.

Table 38. Attributes
Path Type Description Mandatory

key

String(45)

Identifier to Organization.

Yes

location

More details at: Location.

If you do not enter the latitude and longitude of the location, we recommend using the Route Detail And Dependencies endpoint.
In order to accurately mark the location, you must enter the address containing as much information as possible.
Table 39. Attributes
Path Type Description Mandatory

key

String(45)

Identifier to Location.

Yes

latitude

Double(22)

Map coordinates for Latitude.

Yes

longitude

Double(22)

Map coordinates for Longitude.

Yes

locationType

locationType

The location type associated with this location.

Yes

addressLine1

String(255)

The street address for the Location.

addressLine2

String(255)

Additional address information such as apartment.

city

String(45)

City of Location’s address.

state

String(20)

State of Location’s address.

zipCode

String(15)

Postal code of Location’s address.

district

String(45)

District of Location’s address.

country

String(5)

Country of Location’s address.

locationType

More details at: LocationType.

Table 40. Attributes
Path Type Description Mandatory

key

String(255)

Identifier to LocationType.

Yes

stops

More details at: Stop.

Table 41. Attributes
Path Type Description Mandatory

orders

orders

List of orders that were made for this stop.

Yes

key

String(45)

Identifier to Stop.

Yes

stopType

stopType

The stop type.

Yes

location

location

Location of the stop.

Yes

plannedArrival

Date

Planned arrival of the stop.

Yes

plannedDeparture

Date

Planned departure of the stop.

Yes

plannedDistance

Date

Planned departure of the stop.

Yes

stopType

More details at: StopType.

Table 42. Attributes
Path Type Description Mandatory

type

Type

StopType’s Type. (STOP, DEPOT, PAID_BREAK…​)

key

String(45)

Identifier to StopType.

Yes

orders

More details at: Order.

Table 43. Attributes
Path Type Description Mandatory

plannedSize3

Double(22)

Planned amount of products that will be delivered in size3.

number

String(45)

The order number.

Yes

lineItems

lineItems

List of lineItems that were made for this order.

Yes

plannedSize1

Double(22)

Planned amount of products that will be delivered in size1.

plannedSize2

Double(22)

Planned amount of products that will be delivered in size2.

lineItems

More details at: LineItem.

Table 44. Attributes
Path Type Description Mandatory

totalPrice

Float(22)

Total price

lineItemID

String(45)

Identifier to LineItem.

Yes

sku

sku

sku to which the lineItem refers.

Yes

plannedSize1

Double(22)

Planned amount of products that will be delivered in size1.

plannedSize2

Double(22)

Planned amount of products that will be delivered in size2.

plannedSize3

Double(22)

Planned amount of products that will be delivered in size3.

sku

More details at: Sku.

Table 45. Attributes
Path Type Description Mandatory

brand

String(255)

The SKU brand.

key

String(45)

Identifier to Sku.

Yes

description

String(255)

Description of the SKU.

enabled

Boolean

Indicates whether it is enabled.

Example of Use

The Route Path will only be created if all location data is filled in.

Route And Dependencies

Sending a post to /Integration/RouteAndDependencies with the body bellow will create the route and the mentioned entities.

Params Information

We have an optional additional attribute in the request: resequence.

resequence: if sent as true, GM will be responsible for calculating the best sequence of stops to be visited and also planned properties for those stops. If it is false, the original sequence will be maintained.

{{url}}/Integration/RouteAndDependencies?resequence=true
A Previous Organization must exist!
Import Route and Dependencies Request
POST /Integration/RouteAndDependencies HTTP/1.1
Content-Type: application/json
Host: 10.76.25.108:8080
Content-Length: 2227

{
  "id" : 10023,
  "organization" : {
    "id" : 10061
  },
  "key" : "949e8ed0-68b1-49d8-9",
  "date" : "2023-10-19",
  "description" : "Sample Route Doc",
  "origin" : {
    "id" : 10026,
    "organization" : {
      "id" : 10061
    },
    "key" : "949e8ed0-68b1-49d8-9_O",
    "locationType" : {
      "id" : 10042,
      "organization" : {
        "id" : 10061
      },
      "key" : "949e8ed0-68b1-49d8-9_OLocTypeDoc",
      "description" : "Sample LocationType",
      "enabled" : true
    },
    "description" : "Location - Description Sample",
    "city" : "FortalezaDoc",
    "state" : "Ceará",
    "country" : "BR",
    "longitude" : -38.46933,
    "latitude" : -3.734536,
    "phone1" : "+55 (85) 9 9988-7766",
    "phone1Type" : "3",
    "email" : "example.greenmile@gogreen.com",
    "deliveryInstructions" : "Sample Delivery Instructions.",
    "deliveryRadius" : 20,
    "hasGeofence" : false,
    "creditLimit" : 1000,
    "legalName" : "Location's Legal Name"
  },
  "origLatitude" : -3.734536,
  "origLongitude" : -38.46933,
  "destination" : {
    "id" : 10027,
    "organization" : {
      "id" : 10061
    },
    "key" : "949e8ed0-68b1-49d8-9_D",
    "locationType" : {
      "id" : 10043,
      "organization" : {
        "id" : 10061
      },
      "key" : "949e8ed0-68b1-49d8-9_DLocTypeDoc",
      "description" : "Sample LocationType",
      "enabled" : true
    },
    "description" : "Location - Description Sample",
    "city" : "FortalezaDoc",
    "state" : "Ceará",
    "country" : "BR",
    "longitude" : -38.46933,
    "latitude" : -3.734536,
    "phone1" : "+55 (85) 9 9988-7766",
    "phone1Type" : "3",
    "email" : "example.greenmile@gogreen.com",
    "deliveryInstructions" : "Sample Delivery Instructions.",
    "deliveryRadius" : 20,
    "hasGeofence" : false,
    "creditLimit" : 1000,
    "legalName" : "Location's Legal Name"
  },
  "destLatitude" : -3.734536,
  "destLongitude" : -38.46933,
  "lastStopIsDestination" : false,
  "plannedArrival" : "2023-10-19T13:27:36Z",
  "plannedDeparture" : "2023-10-19T13:27:36Z",
  "plannedComplete" : "2023-10-19T13:27:36Z",
  "plannedStart" : "2023-10-19T13:27:36Z",
  "hasHelper" : false,
  "plannedServiceTime" : 0,
  "onRoute" : false
}
Import Route and Dependencies Response
HTTP/1.1 200 OK
Content-Encoding: gzip
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Connection: keep-alive
X-Content-Type-Options: nosniff
Transfer-Encoding: chunked
Server-Version: 6.42-feature-925751-433219
Content-Type: application/json
Content-Length: 39

{
  "id" : 10024,
  "onRoute" : false
}

If a dependency, like Location, already exists on the database and you just want to specify it, you should only fill it with its natural IDs. In this case: (LocationType, Key).

Route Detail And Dependencies

Sending a post to /Integration/RouteDetailAndDependencies with the body bellow will create the route and the mentioned entities.

Payload Informations

calculatePlanning: if sent as true, GM will be responsible for calculating the planned properties. If it is false, the GM will use the information sent in the payload.

calculateServiceTime: if sent as true, the GM will be responsible for calculating the service time of a Stop. If it is false, the GM will use the information sent in the payload.

Params Information

We have three additional attributes in the request: returnIdOnly, resequence and geocodeLocations.

returnIdOnly: Indicates whether to only receive the ID of the created route.

{{url}}/Integration/RouteDetailAndDependencies?returnIdOnly=true

resequence: if sent as true, GM will be responsible for calculating the best sequence of stops to be visited and also planned properties for those stops (even if the calculatePlanning is false). If it is false, the original sequence will be maintained and the planned properties will only be modified if informed by calculatePlanning.

{{url}}/Integration/RouteDetailAndDependencies?resequence=true

geocodeLocations: Indicates whether it is necessary to perform geolocation processing of the addresses of the locations on the route.

{{url}}/Integration/RouteDetailAndDependencies?geocodeLocations=true

You can also use all queryParams in the same request.

{{url}}/Integration/RouteDetailAndDependencies?returnIdOnly=true&geocodeLocations=true&resequence=true

The Geocoding Process

geocode

A Previous Organization must exist!
Import Route Detail and Dependencies Request
POST /Integration/RouteDetailAndDependencies?returnIdOnly=false&geocodeLocations=true HTTP/1.1
Content-Type: application/json
Host: 10.76.25.108:8080
Content-Length: 16364

{ "route" : {"organization":{"id":10064,"key":"3fbbe756-6907-4bed-aO","description":"Organization Rest Docs Desc","city":"São Paulo","state":"São Paulo","preferedLocale":{"id":10000},"timeZone":{"id":10096},"unitSystem":"METRIC"},"key":"3fbbe756-6907-4bed-a","date":"2023-10-19","description":"Sample Route Doc","origin":{"id":10035,"organization":{"id":10064,"key":"3fbbe756-6907-4bed-aO","description":"Organization Rest Docs Desc","city":"São Paulo","state":"São Paulo","preferedLocale":{"id":10000},"timeZone":{"id":10096},"unitSystem":"METRIC"},"key":"3fbbe756-6907-4bed-aOD","locationType":{"id":10046,"organization":{"id":10064,"key":"3fbbe756-6907-4bed-aO","description":"Organization Rest Docs Desc","city":"São Paulo","state":"São Paulo","preferedLocale":{"id":10000},"timeZone":{"id":10096},"unitSystem":"METRIC"},"key":"3fbbe756-6907-4bed-aLT","description":"Sample LocationType","enabled":true},"description":"Location - Description Sample","state":"Ceará","country":"BR","longitude":-38.46933,"latitude":-3.734536,"phone1":"+55 (85) 9 9988-7766","phone1Type":"3","email":"example.greenmile@gogreen.com","deliveryInstructions":"Sample Delivery Instructions.","deliveryRadius":20,"hasGeofence":false,"creditLimit":1000,"legalName":"Location's Legal Name"},"destination":{"id":10036,"organization":{"id":10064,"key":"3fbbe756-6907-4bed-aO","description":"Organization Rest Docs Desc","city":"São Paulo","state":"São Paulo","preferedLocale":{"id":10000},"timeZone":{"id":10096},"unitSystem":"METRIC"},"key":"3fbbe756-6907-4bed-aDD","locationType":{"id":10046,"organization":{"id":10064,"key":"3fbbe756-6907-4bed-aO","description":"Organization Rest Docs Desc","city":"São Paulo","state":"São Paulo","preferedLocale":{"id":10000},"timeZone":{"id":10096},"unitSystem":"METRIC"},"key":"3fbbe756-6907-4bed-aLT","description":"Sample LocationType","enabled":true},"description":"Location - Description Sample","state":"Ceará","country":"BR","longitude":-38.46933,"latitude":-3.734536,"phone1":"+55 (85) 9 9988-7766","phone1Type":"3","email":"example.greenmile@gogreen.com","deliveryInstructions":"Sample Delivery Instructions.","deliveryRadius":20,"hasGeofence":false,"creditLimit":1000,"legalName":"Location's Legal Name"},"lastStopIsDestination":false,"stops":[{"key":"3fbbe756-6907-4bed-aS1","orders":[{"number":"OrderDoc","lineItems":[{"lineItemID":"LineItemDoc","sku":{"id":10020,"organization":{"id":10064,"key":"3fbbe756-6907-4bed-aO","description":"Organization Rest Docs Desc","city":"São Paulo","state":"São Paulo","preferedLocale":{"id":10000},"timeZone":{"id":10096},"unitSystem":"METRIC"},"key":"3fbbe756-6907-4bed-aS1SKU","description":"Sample SKU","enabled":true,"brand":"Docik"},"plannedSize1":10.0,"plannedSize2":2.0,"plannedSize3":2.0,"hasPicture":false,"totalPrice":302,"bonusKey":"BONUSKEY-3fbbe756-6907-4bed-aS1"}],"plannedSize1":25.0,"plannedSize2":0.0,"plannedSize3":0.0,"hasPicture":false,"orderClass":{"id":10000,"organization":{"id":10064,"key":"3fbbe756-6907-4bed-aO","description":"Organization Rest Docs Desc","city":"São Paulo","state":"São Paulo","preferedLocale":{"id":10000},"timeZone":{"id":10096},"unitSystem":"METRIC"},"key":"OrderClass-3fbbe756-6907-4bed-aS1","description":"Sample OrderClass","enabled":true,"pickup":false,"allowNewOrder":false,"allDamaged":false,"useConsignedSku":false}}],"location":{"id":10032,"organization":{"id":10064,"key":"3fbbe756-6907-4bed-aO","description":"Organization Rest Docs Desc","city":"São Paulo","state":"São Paulo","preferedLocale":{"id":10000},"timeZone":{"id":10096},"unitSystem":"METRIC"},"key":"3fbbe756-6907-4bed-aS1Loc1","locationType":{"id":10046,"organization":{"id":10064,"key":"3fbbe756-6907-4bed-aO","description":"Organization Rest Docs Desc","city":"São Paulo","state":"São Paulo","preferedLocale":{"id":10000},"timeZone":{"id":10096},"unitSystem":"METRIC"},"key":"3fbbe756-6907-4bed-aLT","description":"Sample LocationType","enabled":true},"description":"Location - Description Sample","state":"Ceará","country":"BR","longitude":-38.46933,"latitude":-3.734536,"phone1":"+55 (85) 9 9988-7766","phone1Type":"3","email":"example.greenmile@gogreen.com","deliveryInstructions":"Sample Delivery Instructions.","deliveryRadius":20,"hasGeofence":false,"creditLimit":1000,"legalName":"Location's Legal Name"},"stopType":{"id":10040,"organization":{"id":10064,"key":"3fbbe756-6907-4bed-aO","description":"Organization Rest Docs Desc","city":"São Paulo","state":"São Paulo","preferedLocale":{"id":10000},"timeZone":{"id":10096},"unitSystem":"METRIC"},"key":"3fbbe756-6907-4bed-aS1ST","description":"Sample StopType","type":"STOP","locationRequired":false},"plannedArrival":"2023-10-19T13:27:49Z","plannedDeparture":"2023-10-19T13:27:49Z","plannedDistance":0.0,"bulkArriveCanceled":false,"ordersInfo":"[OrderDoc]"},{"key":"3fbbe756-6907-4bed-aS2","orders":[{"number":"OrderDoc","lineItems":[{"lineItemID":"LineItemDoc","sku":{"id":10021,"organization":{"id":10064,"key":"3fbbe756-6907-4bed-aO","description":"Organization Rest Docs Desc","city":"São Paulo","state":"São Paulo","preferedLocale":{"id":10000},"timeZone":{"id":10096},"unitSystem":"METRIC"},"key":"3fbbe756-6907-4bed-aS2SKU","description":"Sample SKU","enabled":true,"brand":"Docik"},"plannedSize1":15.0,"plannedSize2":1.0,"plannedSize3":3.0,"hasPicture":false,"totalPrice":1466,"bonusKey":"BONUSKEY-3fbbe756-6907-4bed-aS2"}],"plannedSize1":16.0,"plannedSize2":0.0,"plannedSize3":0.0,"hasPicture":false,"orderClass":{"id":10001,"organization":{"id":10064,"key":"3fbbe756-6907-4bed-aO","description":"Organization Rest Docs Desc","city":"São Paulo","state":"São Paulo","preferedLocale":{"id":10000},"timeZone":{"id":10096},"unitSystem":"METRIC"},"key":"OrderClass-3fbbe756-6907-4bed-aS2","description":"Sample OrderClass","enabled":true,"pickup":false,"allowNewOrder":false,"allDamaged":false,"useConsignedSku":false}}],"location":{"id":10033,"organization":{"id":10064,"key":"3fbbe756-6907-4bed-aO","description":"Organization Rest Docs Desc","city":"São Paulo","state":"São Paulo","preferedLocale":{"id":10000},"timeZone":{"id":10096},"unitSystem":"METRIC"},"key":"3fbbe756-6907-4bed-aS2Loc2","locationType":{"id":10046,"organization":{"id":10064,"key":"3fbbe756-6907-4bed-aO","description":"Organization Rest Docs Desc","city":"São Paulo","state":"São Paulo","preferedLocale":{"id":10000},"timeZone":{"id":10096},"unitSystem":"METRIC"},"key":"3fbbe756-6907-4bed-aLT","description":"Sample LocationType","enabled":true},"description":"Location - Description Sample","state":"Ceará","country":"BR","longitude":-38.46933,"latitude":-3.734536,"phone1":"+55 (85) 9 9988-7766","phone1Type":"3","email":"example.greenmile@gogreen.com","deliveryInstructions":"Sample Delivery Instructions.","deliveryRadius":20,"hasGeofence":false,"creditLimit":1000,"legalName":"Location's Legal Name"},"stopType":{"id":10041,"organization":{"id":10064,"key":"3fbbe756-6907-4bed-aO","description":"Organization Rest Docs Desc","city":"São Paulo","state":"São Paulo","preferedLocale":{"id":10000},"timeZone":{"id":10096},"unitSystem":"METRIC"},"key":"3fbbe756-6907-4bed-aS2ST","description":"Sample StopType","type":"STOP","locationRequired":false},"plannedArrival":"2023-10-19T13:27:50Z","plannedDeparture":"2023-10-19T13:27:50Z","plannedDistance":0.0,"bulkArriveCanceled":false,"ordersInfo":"[OrderDoc]"},{"key":"3fbbe756-6907-4bed-aS3","orders":[{"number":"OrderDoc","lineItems":[{"lineItemID":"LineItemDoc","sku":{"id":10022,"organization":{"id":10064,"key":"3fbbe756-6907-4bed-aO","description":"Organization Rest Docs Desc","city":"São Paulo","state":"São Paulo","preferedLocale":{"id":10000},"timeZone":{"id":10096},"unitSystem":"METRIC"},"key":"3fbbe756-6907-4bed-aS3SKU","description":"Sample SKU","enabled":true,"brand":"Docik"},"plannedSize1":28.0,"plannedSize2":7.0,"plannedSize3":2.0,"hasPicture":false,"totalPrice":229,"bonusKey":"BONUSKEY-3fbbe756-6907-4bed-aS3"}],"plannedSize1":7.0,"plannedSize2":0.0,"plannedSize3":0.0,"hasPicture":false,"orderClass":{"id":10002,"organization":{"id":10064,"key":"3fbbe756-6907-4bed-aO","description":"Organization Rest Docs Desc","city":"São Paulo","state":"São Paulo","preferedLocale":{"id":10000},"timeZone":{"id":10096},"unitSystem":"METRIC"},"key":"OrderClass-3fbbe756-6907-4bed-aS3","description":"Sample OrderClass","enabled":true,"pickup":false,"allowNewOrder":false,"allDamaged":false,"useConsignedSku":false}}],"location":{"id":10034,"organization":{"id":10064,"key":"3fbbe756-6907-4bed-aO","description":"Organization Rest Docs Desc","city":"São Paulo","state":"São Paulo","preferedLocale":{"id":10000},"timeZone":{"id":10096},"unitSystem":"METRIC"},"key":"3fbbe756-6907-4bed-aS3Loc3","locationType":{"id":10046,"organization":{"id":10064,"key":"3fbbe756-6907-4bed-aO","description":"Organization Rest Docs Desc","city":"São Paulo","state":"São Paulo","preferedLocale":{"id":10000},"timeZone":{"id":10096},"unitSystem":"METRIC"},"key":"3fbbe756-6907-4bed-aLT","description":"Sample LocationType","enabled":true},"description":"Location - Description Sample","state":"Ceará","country":"BR","longitude":-38.46933,"latitude":-3.734536,"phone1":"+55 (85) 9 9988-7766","phone1Type":"3","email":"example.greenmile@gogreen.com","deliveryInstructions":"Sample Delivery Instructions.","deliveryRadius":20,"hasGeofence":false,"creditLimit":1000,"legalName":"Location's Legal Name"},"stopType":{"id":10042,"organization":{"id":10064,"key":"3fbbe756-6907-4bed-aO","description":"Organization Rest Docs Desc","city":"São Paulo","state":"São Paulo","preferedLocale":{"id":10000},"timeZone":{"id":10096},"unitSystem":"METRIC"},"key":"3fbbe756-6907-4bed-aS3ST","description":"Sample StopType","type":"STOP","locationRequired":false},"plannedArrival":"2023-10-19T13:27:51Z","plannedDeparture":"2023-10-19T13:27:51Z","plannedDistance":0.0,"bulkArriveCanceled":false,"ordersInfo":"[OrderDoc]"}],"extraLineItems":[{"sku":{"id":10020,"organization":{"id":10064,"key":"3fbbe756-6907-4bed-aO","description":"Organization Rest Docs Desc","city":"São Paulo","state":"São Paulo","preferedLocale":{"id":10000},"timeZone":{"id":10096},"unitSystem":"METRIC"},"key":"3fbbe756-6907-4bed-aS1SKU","description":"Sample SKU","enabled":true,"brand":"Docik"},"plannedSize1":10.0,"availableSize1":10.0}],"plannedArrival":"2023-10-19T13:27:52Z","plannedDeparture":"2023-10-19T13:27:52Z","plannedDistance":120.5,"plannedComplete":"2023-10-19T13:27:52Z","plannedCost":0,"plannedStart":"2023-10-19T13:27:52Z","hasHelper":false,"principalEquipment":"3fbbe756-6907-4bed-aE","driversName":"[3fbbe756-6907-4bed-aD] 3fbbe756-6907-4bed-aD","driverAssignments":[{"driver":{"id":10080,"login":"3fbbe756-6907-4bed-aD","password":"1234","enabled":true,"preferedLocale":{"id":10000},"organization":{"id":10064,"key":"3fbbe756-6907-4bed-aO","description":"Organization Rest Docs Desc","city":"São Paulo","state":"São Paulo","preferedLocale":{"id":10000},"timeZone":{"id":10096},"unitSystem":"METRIC"},"key":"3fbbe756-6907-4bed-aD","name":"3fbbe756-6907-4bed-aD","unitSystem":"METRIC","externalUser":false,"driverType":"DEFAULT","smartTrack":false,"firstName":"3fbbe756-6907-4bed-aD","lastName":""}}],"equipmentAssignments":[{"equipment":{"id":10020,"organization":{"id":10064,"key":"3fbbe756-6907-4bed-aO","description":"Organization Rest Docs Desc","city":"São Paulo","state":"São Paulo","preferedLocale":{"id":10000},"timeZone":{"id":10096},"unitSystem":"METRIC"},"key":"3fbbe756-6907-4bed-aE","equipmentType":{"id":10020,"organization":{"id":10064,"key":"3fbbe756-6907-4bed-aO","description":"Organization Rest Docs Desc","city":"São Paulo","state":"São Paulo","preferedLocale":{"id":10000},"timeZone":{"id":10096},"unitSystem":"METRIC"},"key":"3fbbe756-6907-4bed-aEET","description":"Sample EquipmentType","enabled":true},"description":"Sample Equipment","enabled":true},"principal":true}],"tagAssignments":[{"tag":{"id":10000,"organization":{"id":10064,"key":"3fbbe756-6907-4bed-aO","description":"Organization Rest Docs Desc","city":"São Paulo","state":"São Paulo","preferedLocale":{"id":10000},"timeZone":{"id":10096},"unitSystem":"METRIC"},"description":"3fbbe756-6907-4bed-a","enabled":true,"tagType":"ROUTE"}}],"locationPendingPayments":[{"location":{"id":10032,"organization":{"id":10064,"key":"3fbbe756-6907-4bed-aO","description":"Organization Rest Docs Desc","city":"São Paulo","state":"São Paulo","preferedLocale":{"id":10000},"timeZone":{"id":10096},"unitSystem":"METRIC"},"key":"3fbbe756-6907-4bed-aS1Loc1","locationType":{"id":10046,"organization":{"id":10064,"key":"3fbbe756-6907-4bed-aO","description":"Organization Rest Docs Desc","city":"São Paulo","state":"São Paulo","preferedLocale":{"id":10000},"timeZone":{"id":10096},"unitSystem":"METRIC"},"key":"3fbbe756-6907-4bed-aLT","description":"Sample LocationType","enabled":true},"description":"Location - Description Sample","state":"Ceará","country":"BR","longitude":-38.46933,"latitude":-3.734536,"phone1":"+55 (85) 9 9988-7766","phone1Type":"3","email":"example.greenmile@gogreen.com","deliveryInstructions":"Sample Delivery Instructions.","deliveryRadius":20,"hasGeofence":false,"creditLimit":1000,"legalName":"Location's Legal Name"},"amount":200,"amountPayed":50,"saleDate":"2023-10-19T13:27:51Z","dueDate":"2023-10-19T13:27:51Z","documentKey":"PENDINGPAYMENT01","paymentDocument":"DOC PAYMENT 001"}],"additionalMaterials":[{"sku":{"key":"3fbbe756-6907-4bed-aSKU","description":"Pallet","alternativeKey":"3fbbe756-6907-4bed-aSKU"},"quantity":5}],"consignedSkus":[{"location":{"id":10032,"organization":{"id":10064,"key":"3fbbe756-6907-4bed-aO","description":"Organization Rest Docs Desc","city":"São Paulo","state":"São Paulo","preferedLocale":{"id":10000},"timeZone":{"id":10096},"unitSystem":"METRIC"},"key":"3fbbe756-6907-4bed-aS1Loc1","locationType":{"id":10046,"organization":{"id":10064,"key":"3fbbe756-6907-4bed-aO","description":"Organization Rest Docs Desc","city":"São Paulo","state":"São Paulo","preferedLocale":{"id":10000},"timeZone":{"id":10096},"unitSystem":"METRIC"},"key":"3fbbe756-6907-4bed-aLT","description":"Sample LocationType","enabled":true},"description":"Location - Description Sample","state":"Ceará","country":"BR","longitude":-38.46933,"latitude":-3.734536,"phone1":"+55 (85) 9 9988-7766","phone1Type":"3","email":"example.greenmile@gogreen.com","deliveryInstructions":"Sample Delivery Instructions.","deliveryRadius":20,"hasGeofence":false,"creditLimit":1000,"legalName":"Location's Legal Name"},"sku":{"id":10020,"organization":{"id":10064,"key":"3fbbe756-6907-4bed-aO","description":"Organization Rest Docs Desc","city":"São Paulo","state":"São Paulo","preferedLocale":{"id":10000},"timeZone":{"id":10096},"unitSystem":"METRIC"},"key":"3fbbe756-6907-4bed-aS1SKU","description":"Sample SKU","enabled":true,"brand":"Docik"},"dateConsigned":"2023-10-19T13:27:51Z","amount":10,"amountReceived":1,"newRouteConsignedSku":true,"consigned":false}],"holderMaterials":[{"sku":{"id":10020,"organization":{"id":10064,"key":"3fbbe756-6907-4bed-aO","description":"Organization Rest Docs Desc","city":"São Paulo","state":"São Paulo","preferedLocale":{"id":10000},"timeZone":{"id":10096},"unitSystem":"METRIC"},"key":"3fbbe756-6907-4bed-aS1SKU","description":"Sample SKU","enabled":true,"brand":"Docik"},"transport":{"key":"3fbbe756-6907-4bed-aTH","date":"2023-10-19","status":"PENDING","alternativeKey":"3fbbe756-6907-4bed-aTH"},"size1Quantity":1.0}],"manifests":[{"sku":{"key":"3fbbe756-6907-4bed-aSKU","description":"Pallet","alternativeKey":"3fbbe756-6907-4bed-aSKU"},"transport":{"key":"3fbbe756-6907-4bed-aTH","date":"2023-10-19","status":"PENDING","alternativeKey":"3fbbe756-6907-4bed-aTH"},"size1":10.0}],"plannedServiceTime":0,"helperAssignments":[{"helper":{"id":10081,"login":"3fbbe756-6907-4bed-aDH","password":"1234","enabled":true,"preferedLocale":{"id":10000},"organization":{"id":10064,"key":"3fbbe756-6907-4bed-aO","description":"Organization Rest Docs Desc","city":"São Paulo","state":"São Paulo","preferedLocale":{"id":10000},"timeZone":{"id":10096},"unitSystem":"METRIC"},"key":"3fbbe756-6907-4bed-aDH","name":"3fbbe756-6907-4bed-aDH","unitSystem":"METRIC","externalUser":false,"driverType":"DEFAULT","smartTrack":false,"firstName":"3fbbe756-6907-4bed-aDH","lastName":""}}],"onRoute":false}},"calculateServiceTime": true,"calculatePlanning": true
Unlike RouteAndDependencies, RouteDetailAndDependencies sends a JSON with the "route" attribute containing the route information.
Import Route Detail and Dependencies Response
HTTP/1.1 200 OK
Content-Encoding: gzip
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Connection: keep-alive
X-Content-Type-Options: nosniff
Transfer-Encoding: chunked
Server-Version: 6.42-feature-925751-433219
Content-Type: application/json
Content-Length: 106492

{
  "id" : 10027,
  "creationDate" : "2023-10-19T13:27:52+0000",
  "organization" : {
    "id" : 10064,
    "key" : "3fbbe756-6907-4bed-aO",
    "preferedLocale" : {
      "id" : 10000
    },
    "timeZone" : {
      "id" : 10096,
      "description" : "GMT+0",
      "rawOffsetMinutes" : 0,
      "timezoneName" : "GMT+0"
    },
    "unitSystem" : "METRIC"
  },
  "key" : "3fbbe756-6907-4bed-a",
  "date" : "2023-10-19",
  "description" : "Sample Route Doc",
  "origin" : {
    "id" : 10035,
    "creationDate" : "2023-10-19T13:27:51+0000",
    "lastModificationDate" : "2023-10-19T13:27:52+0000",
    "organization" : {
      "id" : 10064,
      "creationDate" : "2023-10-19T13:27:47+0000",
      "key" : "3fbbe756-6907-4bed-aO",
      "description" : "Organization Rest Docs Desc",
      "city" : "São Paulo",
      "state" : "São Paulo",
      "timeZone" : {
        "id" : 10096,
        "description" : "GMT+0",
        "rawOffsetMinutes" : 0,
        "timezoneName" : "GMT+0"
      },
      "unitSystem" : "METRIC"
    },
    "key" : "3fbbe756-6907-4bed-aOD",
    "description" : "Location - Description Sample",
    "state" : "Ceará",
    "country" : "BR",
    "longitude" : -38.46933,
    "geocodingQuality" : "MANUAL",
    "latitude" : -3.734536,
    "phone1" : "+55 (85) 9 9988-7766",
    "phone1Type" : "3",
    "email" : "example.greenmile@gogreen.com",
    "deliveryInstructions" : "Sample Delivery Instructions.",
    "deliveryRadius" : 20,
    "deliveryDays" : "0",
    "geocodingDate" : "2023-10-19T13:27:52+0000",
    "geocodingLastCheck" : "2023-10-19T13:27:52+0000",
    "enabled" : true,
    "hasGeofence" : false,
    "creditLimit" : 1000,
    "legalName" : "Location's Legal Name",
    "alternativeKey" : "3fbbe756-6907-4bed-aOD3fbbe756-6907-4bed-aO"
  },
  "origLatitude" : -3.734536,
  "origLongitude" : -38.46933,
  "destination" : {
    "id" : 10036,
    "creationDate" : "2023-10-19T13:27:52+0000",
    "organization" : {
      "id" : 10064,
      "creationDate" : "2023-10-19T13:27:47+0000",
      "key" : "3fbbe756-6907-4bed-aO",
      "description" : "Organization Rest Docs Desc",
      "city" : "São Paulo",
      "state" : "São Paulo",
      "timeZone" : {
        "id" : 10096,
        "description" : "GMT+0",
        "rawOffsetMinutes" : 0,
        "timezoneName" : "GMT+0"
      },
      "unitSystem" : "METRIC"
    },
    "key" : "3fbbe756-6907-4bed-aDD",
    "description" : "Location - Description Sample",
    "state" : "Ceará",
    "country" : "BR",
    "longitude" : -38.46933,
    "latitude" : -3.734536,
    "phone1" : "+55 (85) 9 9988-7766",
    "phone1Type" : "3",
    "email" : "example.greenmile@gogreen.com",
    "deliveryInstructions" : "Sample Delivery Instructions.",
    "deliveryRadius" : 20,
    "deliveryDays" : "0",
    "enabled" : true,
    "hasGeofence" : false,
    "creditLimit" : 1000,
    "legalName" : "Location's Legal Name",
    "alternativeKey" : "3fbbe756-6907-4bed-aDD3fbbe756-6907-4bed-aO"
  },
  "destLatitude" : -3.734536,
  "destLongitude" : -38.46933,
  "firstStopIsOrigin" : false,
  "lastStopIsDestination" : false,
  "stops" : [ {
    "id" : 10040,
    "creationDate" : "2023-10-19T13:27:52+0000",
    "key" : "3fbbe756-6907-4bed-aS1",
    "route" : {
      "id" : 10027,
      "creationDate" : "2023-10-19T13:27:52+0000",
      "organization" : {
        "id" : 10064,
        "key" : "3fbbe756-6907-4bed-aO",
        "preferedLocale" : {
          "id" : 10000
        },
        "timeZone" : {
          "id" : 10096,
          "description" : "GMT+0",
          "rawOffsetMinutes" : 0,
          "timezoneName" : "GMT+0"
        },
        "unitSystem" : "METRIC"
      },
      "key" : "3fbbe756-6907-4bed-a",
      "date" : "2023-10-19",
      "description" : "Sample Route Doc",
      "origin" : {
        "id" : 10035,
        "creationDate" : "2023-10-19T13:27:51+0000",
        "lastModificationDate" : "2023-10-19T13:27:52+0000",
        "organization" : {
          "id" : 10064,
          "creationDate" : "2023-10-19T13:27:47+0000",
          "key" : "3fbbe756-6907-4bed-aO",
          "description" : "Organization Rest Docs Desc",
          "city" : "São Paulo",
          "state" : "São Paulo",
          "timeZone" : {
            "id" : 10096,
            "description" : "GMT+0",
            "rawOffsetMinutes" : 0,
            "timezoneName" : "GMT+0"
          },
          "unitSystem" : "METRIC"
        },
        "key" : "3fbbe756-6907-4bed-aOD",
        "description" : "Location - Description Sample",
        "state" : "Ceará",
        "country" : "BR",
        "longitude" : -38.46933,
        "geocodingQuality" : "MANUAL",
        "latitude" : -3.734536,
        "phone1" : "+55 (85) 9 9988-7766",
        "phone1Type" : "3",
        "email" : "example.greenmile@gogreen.com",
        "deliveryInstructions" : "Sample Delivery Instructions.",
        "deliveryRadius" : 20,
        "deliveryDays" : "0",
        "geocodingDate" : "2023-10-19T13:27:52+0000",
        "geocodingLastCheck" : "2023-10-19T13:27:52+0000",
        "enabled" : true,
        "hasGeofence" : false,
        "creditLimit" : 1000,
        "legalName" : "Location's Legal Name",
        "alternativeKey" : "3fbbe756-6907-4bed-aOD3fbbe756-6907-4bed-aO"
      },
      "origLatitude" : -3.734536,
      "origLongitude" : -38.46933,
      "destination" : {
        "id" : 10036,
        "creationDate" : "2023-10-19T13:27:52+0000",
        "organization" : {
          "id" : 10064,
          "creationDate" : "2023-10-19T13:27:47+0000",
          "key" : "3fbbe756-6907-4bed-aO",
          "description" : "Organization Rest Docs Desc",
          "city" : "São Paulo",
          "state" : "São Paulo",
          "timeZone" : {
            "id" : 10096,
            "description" : "GMT+0",
            "rawOffsetMinutes" : 0,
            "timezoneName" : "GMT+0"
          },
          "unitSystem" : "METRIC"
        },
        "key" : "3fbbe756-6907-4bed-aDD",
        "description" : "Location - Description Sample",
        "state" : "Ceará",
        "country" : "BR",
        "longitude" : -38.46933,
        "latitude" : -3.734536,
        "phone1" : "+55 (85) 9 9988-7766",
        "phone1Type" : "3",
        "email" : "example.greenmile@gogreen.com",
        "deliveryInstructions" : "Sample Delivery Instructions.",
        "deliveryRadius" : 20,
        "deliveryDays" : "0",
        "enabled" : true,
        "hasGeofence" : false,
        "creditLimit" : 1000,
        "legalName" : "Location's Legal Name",
        "alternativeKey" : "3fbbe756-6907-4bed-aDD3fbbe756-6907-4bed-aO"
      },
      "destLatitude" : -3.734536,
      "destLongitude" : -38.46933,
      "firstStopIsOrigin" : false,
      "lastStopIsDestination" : false,
      "extraLineItems" : [ {
        "id" : 10000,
        "creationDate" : "2023-10-19T13:27:53+0000",
        "sku" : {
          "id" : 10020,
          "creationDate" : "2023-10-19T13:27:49+0000",
          "organization" : {
            "id" : 10064,
            "creationDate" : "2023-10-19T13:27:47+0000",
            "key" : "3fbbe756-6907-4bed-aO",
            "description" : "Organization Rest Docs Desc",
            "city" : "São Paulo",
            "state" : "São Paulo",
            "preferedLocale" : {
              "id" : 10000,
              "key" : "I18NLocale_en",
              "language" : "en",
              "description" : "English",
              "dateFormat" : "MM/dd/yyyy",
              "timeFormat" : "hh:mm a",
              "currency" : "US$",
              "decimalSymbol" : ".",
              "digitalGrouping" : ","
            },
            "timeZone" : {
              "id" : 10096,
              "description" : "GMT+0",
              "rawOffsetMinutes" : 0,
              "timezoneName" : "GMT+0"
            },
            "listenerOrganizations" : [ ],
            "unitSystem" : "METRIC"
          },
          "key" : "3fbbe756-6907-4bed-aS1SKU",
          "description" : "Sample SKU",
          "enabled" : true,
          "brand" : "Docik",
          "skuSizeConversions" : [ ],
          "udfs" : [ ],
          "skuMeasurementUnits" : [ ],
          "alternativeKey" : "3fbbe756-6907-4bed-aS1SKU3fbbe756-6907-4bed-aO"
        },
        "plannedSize1" : 10.0,
        "availableSize1" : 10.0
      } ],
      "baseLineArrival" : "2023-10-19T13:27:52+0000",
      "baseLineDeparture" : "2023-10-19T13:27:52+0000",
      "plannedArrival" : "2023-10-19T13:27:52+0000",
      "plannedDeparture" : "2023-10-19T13:27:52+0000",
      "projectedArrival" : "2023-10-19T13:27:52+0000",
      "projectedDeparture" : "2023-10-19T13:27:52+0000",
      "baseLineDistance" : 120.5,
      "plannedDistance" : 120.5,
      "projectedDistance" : 120.5,
      "baseLineComplete" : "2023-10-19T13:27:52+0000",
      "plannedComplete" : "2023-10-19T13:27:52+0000",
      "projectedComplete" : "2023-10-19T13:27:52+0000",
      "baseLineCost" : 0,
      "plannedCost" : 0,
      "baseLineStart" : "2023-10-19T13:27:52+0000",
      "plannedStart" : "2023-10-19T13:27:52+0000",
      "projectedStart" : "2023-10-19T13:27:52+0000",
      "hasHelper" : false,
      "principalEquipment" : "3fbbe756-6907-4bed-aE",
      "driversName" : "[3fbbe756-6907-4bed-aD] 3fbbe756-6907-4bed-aD",
      "driverAssignments" : [ {
        "id" : 10000,
        "creationDate" : "2023-10-19T13:27:53+0000",
        "driver" : {
          "id" : 10080,
          "login" : "3fbbe756-6907-4bed-aD",
          "preferedLocale" : {
            "id" : 10000
          },
          "organization" : {
            "id" : 10064,
            "key" : "3fbbe756-6907-4bed-aO"
          },
          "key" : "3fbbe756-6907-4bed-aD",
          "name" : "3fbbe756-6907-4bed-aD",
          "externalUser" : false,
          "firstName" : "3fbbe756-6907-4bed-aD",
          "lastName" : ""
        }
      } ],
      "equipmentAssignments" : [ {
        "id" : 10000,
        "creationDate" : "2023-10-19T13:27:53+0000",
        "equipment" : {
          "id" : 10020,
          "creationDate" : "2023-10-19T13:27:49+0000",
          "lastModificationDate" : "2023-10-19T13:27:52+0000",
          "organization" : {
            "id" : 10064,
            "creationDate" : "2023-10-19T13:27:47+0000",
            "key" : "3fbbe756-6907-4bed-aO",
            "description" : "Organization Rest Docs Desc",
            "city" : "São Paulo",
            "state" : "São Paulo",
            "preferedLocale" : {
              "id" : 10000,
              "key" : "I18NLocale_en",
              "language" : "en",
              "description" : "English",
              "dateFormat" : "MM/dd/yyyy",
              "timeFormat" : "hh:mm a",
              "currency" : "US$",
              "decimalSymbol" : ".",
              "digitalGrouping" : ","
            },
            "timeZone" : {
              "id" : 10096,
              "description" : "GMT+0",
              "rawOffsetMinutes" : 0,
              "timezoneName" : "GMT+0"
            },
            "listenerOrganizations" : [ ],
            "unitSystem" : "METRIC"
          },
          "key" : "3fbbe756-6907-4bed-aE",
          "equipmentType" : {
            "id" : 10020,
            "organization" : {
              "id" : 10064,
              "creationDate" : "2023-10-19T13:27:47+0000",
              "key" : "3fbbe756-6907-4bed-aO",
              "description" : "Organization Rest Docs Desc",
              "city" : "São Paulo",
              "state" : "São Paulo",
              "preferedLocale" : {
                "id" : 10000,
                "key" : "I18NLocale_en",
                "language" : "en",
                "description" : "English",
                "dateFormat" : "MM/dd/yyyy",
                "timeFormat" : "hh:mm a",
                "currency" : "US$",
                "decimalSymbol" : ".",
                "digitalGrouping" : ","
              },
              "timeZone" : {
                "id" : 10096,
                "description" : "GMT+0",
                "rawOffsetMinutes" : 0,
                "timezoneName" : "GMT+0"
              },
              "listenerOrganizations" : [ ],
              "unitSystem" : "METRIC"
            },
            "key" : "3fbbe756-6907-4bed-aEET"
          },
          "udfs" : [ ],
          "description" : "Sample Equipment",
          "enabled" : true,
          "tags" : [ ]
        },
        "principal" : true
      } ],
      "tagAssignments" : [ {
        "id" : 10000,
        "creationDate" : "2023-10-19T13:27:52+0000",
        "tag" : {
          "id" : 10000,
          "organization" : {
            "id" : 10064,
            "key" : "3fbbe756-6907-4bed-aO",
            "description" : "Organization Rest Docs Desc",
            "city" : "São Paulo",
            "state" : "São Paulo",
            "preferedLocale" : {
              "id" : 10000
            },
            "timeZone" : {
              "id" : 10096
            },
            "unitSystem" : "METRIC"
          },
          "description" : "3fbbe756-6907-4bed-a",
          "enabled" : true,
          "tagType" : "ROUTE"
        }
      } ],
      "additionalMaterials" : [ {
        "id" : 10000,
        "sku" : {
          "id" : 10023,
          "creationDate" : "2023-10-19T13:27:52+0000",
          "organization" : {
            "id" : 10064,
            "key" : "3fbbe756-6907-4bed-aO"
          },
          "key" : "3fbbe756-6907-4bed-aSKU",
          "description" : "Pallet",
          "enabled" : true,
          "alternativeKey" : "3fbbe756-6907-4bed-aSKU3fbbe756-6907-4bed-aO"
        },
        "quantity" : 5
      } ],
      "consignedSkus" : [ {
        "id" : 10000,
        "location" : {
          "id" : 10032,
          "creationDate" : "2023-10-19T13:27:49+0000",
          "organization" : {
            "id" : 10064,
            "creationDate" : "2023-10-19T13:27:47+0000",
            "key" : "3fbbe756-6907-4bed-aO",
            "description" : "Organization Rest Docs Desc",
            "city" : "São Paulo",
            "state" : "São Paulo",
            "preferedLocale" : {
              "id" : 10000,
              "key" : "I18NLocale_en",
              "language" : "en",
              "description" : "English",
              "dateFormat" : "MM/dd/yyyy",
              "timeFormat" : "hh:mm a",
              "currency" : "US$",
              "decimalSymbol" : ".",
              "digitalGrouping" : ","
            },
            "timeZone" : {
              "id" : 10096,
              "description" : "GMT+0",
              "rawOffsetMinutes" : 0,
              "timezoneName" : "GMT+0"
            },
            "listenerOrganizations" : [ ],
            "unitSystem" : "METRIC"
          },
          "key" : "3fbbe756-6907-4bed-aS1Loc1",
          "locationType" : {
            "id" : 10046,
            "creationDate" : "2023-10-19T13:27:49+0000",
            "organization" : {
              "id" : 10064,
              "creationDate" : "2023-10-19T13:27:47+0000",
              "key" : "3fbbe756-6907-4bed-aO",
              "description" : "Organization Rest Docs Desc",
              "city" : "São Paulo",
              "state" : "São Paulo",
              "preferedLocale" : {
                "id" : 10000,
                "key" : "I18NLocale_en",
                "language" : "en",
                "description" : "English",
                "dateFormat" : "MM/dd/yyyy",
                "timeFormat" : "hh:mm a",
                "currency" : "US$",
                "decimalSymbol" : ".",
                "digitalGrouping" : ","
              },
              "timeZone" : {
                "id" : 10096,
                "description" : "GMT+0",
                "rawOffsetMinutes" : 0,
                "timezoneName" : "GMT+0"
              },
              "listenerOrganizations" : [ ],
              "unitSystem" : "METRIC"
            },
            "key" : "3fbbe756-6907-4bed-aLT",
            "description" : "Sample LocationType",
            "showOnMobileCreate" : true,
            "enabled" : true,
            "alternativeKey" : "3fbbe756-6907-4bed-aLT3fbbe756-6907-4bed-aO"
          },
          "locationOverrideTimeWindows" : [ ],
          "udfs" : [ ],
          "description" : "Location - Description Sample",
          "state" : "Ceará",
          "country" : "BR",
          "longitude" : -38.46933,
          "latitude" : -3.734536,
          "phone1" : "+55 (85) 9 9988-7766",
          "phone1Type" : "3",
          "email" : "example.greenmile@gogreen.com",
          "deliveryInstructions" : "Sample Delivery Instructions.",
          "deliveryRadius" : 20,
          "deliveryDays" : "0",
          "consignees" : [ ],
          "allowedUsers" : [ ],
          "enabled" : true,
          "hasGeofence" : false,
          "creditLimit" : 1000,
          "legalName" : "Location's Legal Name",
          "locationPaymentMethods" : [ ],
          "alternativeKey" : "3fbbe756-6907-4bed-aS1Loc13fbbe756-6907-4bed-aLT3fbbe756-6907-4bed-aO3fbbe756-6907-4bed-aO"
        },
        "sku" : {
          "id" : 10020,
          "creationDate" : "2023-10-19T13:27:49+0000",
          "organization" : {
            "id" : 10064,
            "creationDate" : "2023-10-19T13:27:47+0000",
            "key" : "3fbbe756-6907-4bed-aO",
            "description" : "Organization Rest Docs Desc",
            "city" : "São Paulo",
            "state" : "São Paulo",
            "preferedLocale" : {
              "id" : 10000,
              "key" : "I18NLocale_en",
              "language" : "en",
              "description" : "English",
              "dateFormat" : "MM/dd/yyyy",
              "timeFormat" : "hh:mm a",
              "currency" : "US$",
              "decimalSymbol" : ".",
              "digitalGrouping" : ","
            },
            "timeZone" : {
              "id" : 10096,
              "description" : "GMT+0",
              "rawOffsetMinutes" : 0,
              "timezoneName" : "GMT+0"
            },
            "listenerOrganizations" : [ ],
            "unitSystem" : "METRIC"
          },
          "key" : "3fbbe756-6907-4bed-aS1SKU",
          "description" : "Sample SKU",
          "enabled" : true,
          "brand" : "Docik",
          "skuSizeConversions" : [ ],
          "udfs" : [ ],
          "skuMeasurementUnits" : [ ],
          "alternativeKey" : "3fbbe756-6907-4bed-aS1SKU3fbbe756-6907-4bed-aO"
        },
        "dateConsigned" : "2023-10-19T13:27:51+0000",
        "amount" : 10,
        "amountReceived" : 1,
        "newRouteConsignedSku" : true,
        "consigned" : false
      } ],
      "holderMaterials" : [ {
        "id" : 10000,
        "sku" : {
          "id" : 10020,
          "creationDate" : "2023-10-19T13:27:49+0000",
          "organization" : {
            "id" : 10064,
            "creationDate" : "2023-10-19T13:27:47+0000",
            "key" : "3fbbe756-6907-4bed-aO",
            "description" : "Organization Rest Docs Desc",
            "city" : "São Paulo",
            "state" : "São Paulo",
            "preferedLocale" : {
              "id" : 10000,
              "key" : "I18NLocale_en",
              "language" : "en",
              "description" : "English",
              "dateFormat" : "MM/dd/yyyy",
              "timeFormat" : "hh:mm a",
              "currency" : "US$",
              "decimalSymbol" : ".",
              "digitalGrouping" : ","
            },
            "timeZone" : {
              "id" : 10096,
              "description" : "GMT+0",
              "rawOffsetMinutes" : 0,
              "timezoneName" : "GMT+0"
            },
            "listenerOrganizations" : [ ],
            "unitSystem" : "METRIC"
          },
          "key" : "3fbbe756-6907-4bed-aS1SKU",
          "description" : "Sample SKU",
          "enabled" : true,
          "brand" : "Docik",
          "skuSizeConversions" : [ ],
          "udfs" : [ ],
          "skuMeasurementUnits" : [ ],
          "alternativeKey" : "3fbbe756-6907-4bed-aS1SKU3fbbe756-6907-4bed-aO"
        },
        "transport" : {
          "id" : 10000,
          "creationDate" : "2023-10-19T13:27:52+0000",
          "organization" : {
            "id" : 10064,
            "key" : "3fbbe756-6907-4bed-aO"
          },
          "key" : "3fbbe756-6907-4bed-aTH",
          "date" : "2023-10-19",
          "status" : "PENDING",
          "alternativeKey" : "3fbbe756-6907-4bed-aTH3fbbe756-6907-4bed-aO"
        },
        "size1Quantity" : 1.0
      } ],
      "manifests" : [ {
        "id" : 10000,
        "sku" : {
          "id" : 10023,
          "creationDate" : "2023-10-19T13:27:52+0000",
          "organization" : {
            "id" : 10064,
            "key" : "3fbbe756-6907-4bed-aO"
          },
          "key" : "3fbbe756-6907-4bed-aSKU",
          "description" : "Pallet",
          "enabled" : true,
          "alternativeKey" : "3fbbe756-6907-4bed-aSKU3fbbe756-6907-4bed-aO"
        },
        "transport" : {
          "id" : 10000,
          "creationDate" : "2023-10-19T13:27:52+0000",
          "organization" : {
            "id" : 10064,
            "key" : "3fbbe756-6907-4bed-aO"
          },
          "key" : "3fbbe756-6907-4bed-aTH",
          "date" : "2023-10-19",
          "status" : "PENDING",
          "alternativeKey" : "3fbbe756-6907-4bed-aTH3fbbe756-6907-4bed-aO"
        },
        "size1" : 10.0
      } ],
      "totalStops" : 3,
      "canceledStops" : 0,
      "undeliveredStops" : 0,
      "redeliveredStops" : 0,
      "actualDepartures" : 0,
      "status" : "NOT_STARTED",
      "plannedTravelTimeMinutes" : 0,
      "baselineTravelTimeMinutes" : 0,
      "plannedServiceTime" : 0,
      "baselineServiceTime" : 0,
      "hasPicture" : false,
      "plannedSize1" : 53.0,
      "plannedSize2" : 10.0,
      "plannedSize3" : 7.0,
      "plannedPickupSize1" : 0.0,
      "plannedPickupSize2" : 0.0,
      "plannedPickupSize3" : 0.0,
      "hasGps" : false,
      "helperAssignments" : [ {
        "id" : 10000,
        "creationDate" : "2023-10-19T13:27:53+0000",
        "helper" : {
          "id" : 10081,
          "login" : "3fbbe756-6907-4bed-aDH",
          "preferedLocale" : {
            "id" : 10000
          },
          "organization" : {
            "id" : 10064,
            "key" : "3fbbe756-6907-4bed-aO"
          },
          "key" : "3fbbe756-6907-4bed-aDH",
          "name" : "3fbbe756-6907-4bed-aDH",
          "externalUser" : false,
          "firstName" : "3fbbe756-6907-4bed-aDH",
          "lastName" : ""
        }
      } ],
      "size1AliasConfig" : {
        "id" : 10000,
        "key" : "Weight",
        "description" : "Weight",
        "icon" : "gmfont-sizes-icon-size1",
        "preferredSize" : "1"
      },
      "size2AliasConfig" : {
        "id" : 10001,
        "key" : "Volume",
        "description" : "Volume",
        "icon" : "gmfont-sizes-icon-size2",
        "preferredSize" : "1"
      },
      "size3AliasConfig" : {
        "id" : 10002,
        "key" : "Value",
        "description" : "Value",
        "icon" : "gmfont-sizes-icon-size3",
        "preferredSize" : "1"
      },
      "onRoute" : false
    },
    "orders" : [ {
      "id" : 10040,
      "creationDate" : "2023-10-19T13:27:52+0000",
      "number" : "OrderDoc",
      "lineItems" : [ {
        "id" : 10020,
        "creationDate" : "2023-10-19T13:27:52+0000",
        "lineItemID" : "LineItemDoc",
        "sku" : {
          "id" : 10020,
          "creationDate" : "2023-10-19T13:27:49+0000",
          "organization" : {
            "id" : 10064,
            "creationDate" : "2023-10-19T13:27:47+0000",
            "key" : "3fbbe756-6907-4bed-aO",
            "description" : "Organization Rest Docs Desc",
            "city" : "São Paulo",
            "state" : "São Paulo",
            "preferedLocale" : {
              "id" : 10000,
              "key" : "I18NLocale_en",
              "language" : "en",
              "description" : "English",
              "dateFormat" : "MM/dd/yyyy",
              "timeFormat" : "hh:mm a",
              "currency" : "US$",
              "decimalSymbol" : ".",
              "digitalGrouping" : ","
            },
            "timeZone" : {
              "id" : 10096,
              "description" : "GMT+0",
              "rawOffsetMinutes" : 0,
              "timezoneName" : "GMT+0"
            },
            "listenerOrganizations" : [ ],
            "unitSystem" : "METRIC"
          },
          "key" : "3fbbe756-6907-4bed-aS1SKU",
          "description" : "Sample SKU",
          "enabled" : true,
          "brand" : "Docik",
          "skuSizeConversions" : [ ],
          "udfs" : [ ],
          "skuMeasurementUnits" : [ ],
          "alternativeKey" : "3fbbe756-6907-4bed-aS1SKU3fbbe756-6907-4bed-aO"
        },
        "plannedSize1" : 10.0,
        "plannedSize2" : 2.0,
        "plannedSize3" : 2.0,
        "hasPicture" : false,
        "size1AliasConfig" : {
          "id" : 10000,
          "key" : "Weight",
          "description" : "Weight",
          "icon" : "gmfont-sizes-icon-size1",
          "preferredSize" : "1"
        },
        "size2AliasConfig" : {
          "id" : 10001,
          "key" : "Volume",
          "description" : "Volume",
          "icon" : "gmfont-sizes-icon-size2",
          "preferredSize" : "1"
        },
        "size3AliasConfig" : {
          "id" : 10002,
          "key" : "Value",
          "description" : "Value",
          "icon" : "gmfont-sizes-icon-size3",
          "preferredSize" : "1"
        },
        "totalPrice" : 302,
        "bonusKey" : "BONUSKEY-3fbbe756-6907-4bed-aS1"
      } ],
      "plannedSize1" : 10.0,
      "plannedSize2" : 2.0,
      "plannedSize3" : 2.0,
      "baselineSize1" : 25.0,
      "baselineSize2" : 0.0,
      "baselineSize3" : 0.0,
      "plannedPickupSize1" : 0.0,
      "plannedPickupSize2" : 0.0,
      "plannedPickupSize3" : 0.0,
      "hasPicture" : false,
      "size1AliasConfig" : {
        "id" : 10000,
        "key" : "Weight",
        "description" : "Weight",
        "icon" : "gmfont-sizes-icon-size1",
        "preferredSize" : "1"
      },
      "size2AliasConfig" : {
        "id" : 10001,
        "key" : "Volume",
        "description" : "Volume",
        "icon" : "gmfont-sizes-icon-size2",
        "preferredSize" : "1"
      },
      "size3AliasConfig" : {
        "id" : 10002,
        "key" : "Value",
        "description" : "Value",
        "icon" : "gmfont-sizes-icon-size3",
        "preferredSize" : "1"
      },
      "orderClass" : {
        "id" : 10000,
        "organization" : {
          "id" : 10064,
          "creationDate" : "2023-10-19T13:27:47+0000",
          "key" : "3fbbe756-6907-4bed-aO",
          "description" : "Organization Rest Docs Desc",
          "city" : "São Paulo",
          "state" : "São Paulo",
          "preferedLocale" : {
            "id" : 10000,
            "key" : "I18NLocale_en",
            "language" : "en",
            "description" : "English",
            "dateFormat" : "MM/dd/yyyy",
            "timeFormat" : "hh:mm a",
            "currency" : "US$",
            "decimalSymbol" : ".",
            "digitalGrouping" : ","
          },
          "timeZone" : {
            "id" : 10096,
            "description" : "GMT+0",
            "rawOffsetMinutes" : 0,
            "timezoneName" : "GMT+0"
          },
          "listenerOrganizations" : [ ],
          "unitSystem" : "METRIC"
        },
        "key" : "OrderClass-3fbbe756-6907-4bed-aS1",
        "description" : "Sample OrderClass",
        "enabled" : true,
        "pickup" : false,
        "allowNewOrder" : false,
        "allDamaged" : false,
        "allowedLocationTypes" : [ ],
        "allowedSkuTypes" : [ ],
        "useConsignedSku" : false,
        "allowedOrderSizes" : [ ]
      }
    } ],
    "location" : {
      "id" : 10032,
      "creationDate" : "2023-10-19T13:27:49+0000",
      "organization" : {
        "id" : 10064,
        "creationDate" : "2023-10-19T13:27:47+0000",
        "key" : "3fbbe756-6907-4bed-aO",
        "description" : "Organization Rest Docs Desc",
        "city" : "São Paulo",
        "state" : "São Paulo",
        "timeZone" : {
          "id" : 10096,
          "description" : "GMT+0",
          "rawOffsetMinutes" : 0,
          "timezoneName" : "GMT+0"
        },
        "unitSystem" : "METRIC"
      },
      "key" : "3fbbe756-6907-4bed-aS1Loc1",
      "description" : "Location - Description Sample",
      "state" : "Ceará",
      "country" : "BR",
      "longitude" : -38.46933,
      "latitude" : -3.734536,
      "phone1" : "+55 (85) 9 9988-7766",
      "phone1Type" : "3",
      "email" : "example.greenmile@gogreen.com",
      "deliveryInstructions" : "Sample Delivery Instructions.",
      "deliveryRadius" : 20,
      "deliveryDays" : "0",
      "enabled" : true,
      "hasGeofence" : false,
      "creditLimit" : 1000,
      "legalName" : "Location's Legal Name",
      "alternativeKey" : "3fbbe756-6907-4bed-aS1Loc13fbbe756-6907-4bed-aO"
    },
    "baseLineSequenceNum" : 1,
    "plannedSequenceNum" : 1,
    "stopType" : {
      "id" : 10040,
      "creationDate" : "2023-10-19T13:27:49+0000",
      "organization" : {
        "id" : 10064,
        "creationDate" : "2023-10-19T13:27:47+0000",
        "key" : "3fbbe756-6907-4bed-aO",
        "description" : "Organization Rest Docs Desc",
        "city" : "São Paulo",
        "state" : "São Paulo",
        "preferedLocale" : {
          "id" : 10000,
          "key" : "I18NLocale_en",
          "language" : "en",
          "description" : "English",
          "dateFormat" : "MM/dd/yyyy",
          "timeFormat" : "hh:mm a",
          "currency" : "US$",
          "decimalSymbol" : ".",
          "digitalGrouping" : ","
        },
        "timeZone" : {
          "id" : 10096,
          "description" : "GMT+0",
          "rawOffsetMinutes" : 0,
          "timezoneName" : "GMT+0"
        },
        "listenerOrganizations" : [ ],
        "unitSystem" : "METRIC"
      },
      "key" : "3fbbe756-6907-4bed-aS1ST",
      "description" : "Sample StopType",
      "type" : "STOP",
      "locationRequired" : false
    },
    "baseLineArrival" : "2023-10-19T13:27:49+0000",
    "plannedArrival" : "2023-10-19T13:27:49+0000",
    "projectedArrival" : "2023-10-19T13:27:49+0000",
    "baseLineService" : "2023-10-19T13:27:49+0000",
    "plannedService" : "2023-10-19T13:27:49+0000",
    "projectedService" : "2023-10-19T13:27:49+0000",
    "baseLineDeparture" : "2023-10-19T13:27:49+0000",
    "plannedDeparture" : "2023-10-19T13:27:49+0000",
    "projectedDeparture" : "2023-10-19T13:27:49+0000",
    "baseLineDistance" : 0.0,
    "plannedDistance" : 0.0,
    "projectedDistance" : 0.0,
    "plannedSize1" : 10.0,
    "plannedSize2" : 2.0,
    "plannedSize3" : 2.0,
    "plannedPickupSize1" : 0.0,
    "plannedPickupSize2" : 0.0,
    "plannedPickupSize3" : 0.0,
    "bulkArriveCanceled" : false,
    "plannedServiceTime" : 0,
    "baselineServiceTime" : 0,
    "longitude" : -38.46933,
    "latitude" : -3.734536,
    "ordersInfo" : "[OrderDoc]",
    "size1AliasConfig" : {
      "id" : 10000,
      "key" : "Weight",
      "description" : "Weight",
      "icon" : "gmfont-sizes-icon-size1",
      "preferredSize" : "1"
    },
    "size2AliasConfig" : {
      "id" : 10001,
      "key" : "Volume",
      "description" : "Volume",
      "icon" : "gmfont-sizes-icon-size2",
      "preferredSize" : "1"
    },
    "size3AliasConfig" : {
      "id" : 10002,
      "key" : "Value",
      "description" : "Value",
      "icon" : "gmfont-sizes-icon-size3",
      "preferredSize" : "1"
    },
    "canceled" : false,
    "returned" : false,
    "redelivered" : false
  }, {
    "id" : 10041,
    "creationDate" : "2023-10-19T13:27:52+0000",
    "key" : "3fbbe756-6907-4bed-aS2",
    "route" : {
      "id" : 10027,
      "creationDate" : "2023-10-19T13:27:52+0000",
      "organization" : {
        "id" : 10064,
        "key" : "3fbbe756-6907-4bed-aO",
        "preferedLocale" : {
          "id" : 10000
        },
        "timeZone" : {
          "id" : 10096,
          "description" : "GMT+0",
          "rawOffsetMinutes" : 0,
          "timezoneName" : "GMT+0"
        },
        "unitSystem" : "METRIC"
      },
      "key" : "3fbbe756-6907-4bed-a",
      "date" : "2023-10-19",
      "description" : "Sample Route Doc",
      "origin" : {
        "id" : 10035,
        "creationDate" : "2023-10-19T13:27:51+0000",
        "lastModificationDate" : "2023-10-19T13:27:52+0000",
        "organization" : {
          "id" : 10064,
          "creationDate" : "2023-10-19T13:27:47+0000",
          "key" : "3fbbe756-6907-4bed-aO",
          "description" : "Organization Rest Docs Desc",
          "city" : "São Paulo",
          "state" : "São Paulo",
          "timeZone" : {
            "id" : 10096,
            "description" : "GMT+0",
            "rawOffsetMinutes" : 0,
            "timezoneName" : "GMT+0"
          },
          "unitSystem" : "METRIC"
        },
        "key" : "3fbbe756-6907-4bed-aOD",
        "description" : "Location - Description Sample",
        "state" : "Ceará",
        "country" : "BR",
        "longitude" : -38.46933,
        "geocodingQuality" : "MANUAL",
        "latitude" : -3.734536,
        "phone1" : "+55 (85) 9 9988-7766",
        "phone1Type" : "3",
        "email" : "example.greenmile@gogreen.com",
        "deliveryInstructions" : "Sample Delivery Instructions.",
        "deliveryRadius" : 20,
        "deliveryDays" : "0",
        "geocodingDate" : "2023-10-19T13:27:52+0000",
        "geocodingLastCheck" : "2023-10-19T13:27:52+0000",
        "enabled" : true,
        "hasGeofence" : false,
        "creditLimit" : 1000,
        "legalName" : "Location's Legal Name",
        "alternativeKey" : "3fbbe756-6907-4bed-aOD3fbbe756-6907-4bed-aO"
      },
      "origLatitude" : -3.734536,
      "origLongitude" : -38.46933,
      "destination" : {
        "id" : 10036,
        "creationDate" : "2023-10-19T13:27:52+0000",
        "organization" : {
          "id" : 10064,
          "creationDate" : "2023-10-19T13:27:47+0000",
          "key" : "3fbbe756-6907-4bed-aO",
          "description" : "Organization Rest Docs Desc",
          "city" : "São Paulo",
          "state" : "São Paulo",
          "timeZone" : {
            "id" : 10096,
            "description" : "GMT+0",
            "rawOffsetMinutes" : 0,
            "timezoneName" : "GMT+0"
          },
          "unitSystem" : "METRIC"
        },
        "key" : "3fbbe756-6907-4bed-aDD",
        "description" : "Location - Description Sample",
        "state" : "Ceará",
        "country" : "BR",
        "longitude" : -38.46933,
        "latitude" : -3.734536,
        "phone1" : "+55 (85) 9 9988-7766",
        "phone1Type" : "3",
        "email" : "example.greenmile@gogreen.com",
        "deliveryInstructions" : "Sample Delivery Instructions.",
        "deliveryRadius" : 20,
        "deliveryDays" : "0",
        "enabled" : true,
        "hasGeofence" : false,
        "creditLimit" : 1000,
        "legalName" : "Location's Legal Name",
        "alternativeKey" : "3fbbe756-6907-4bed-aDD3fbbe756-6907-4bed-aO"
      },
      "destLatitude" : -3.734536,
      "destLongitude" : -38.46933,
      "firstStopIsOrigin" : false,
      "lastStopIsDestination" : false,
      "extraLineItems" : [ {
        "id" : 10000,
        "creationDate" : "2023-10-19T13:27:53+0000",
        "sku" : {
          "id" : 10020,
          "creationDate" : "2023-10-19T13:27:49+0000",
          "organization" : {
            "id" : 10064,
            "creationDate" : "2023-10-19T13:27:47+0000",
            "key" : "3fbbe756-6907-4bed-aO",
            "description" : "Organization Rest Docs Desc",
            "city" : "São Paulo",
            "state" : "São Paulo",
            "preferedLocale" : {
              "id" : 10000,
              "key" : "I18NLocale_en",
              "language" : "en",
              "description" : "English",
              "dateFormat" : "MM/dd/yyyy",
              "timeFormat" : "hh:mm a",
              "currency" : "US$",
              "decimalSymbol" : ".",
              "digitalGrouping" : ","
            },
            "timeZone" : {
              "id" : 10096,
              "description" : "GMT+0",
              "rawOffsetMinutes" : 0,
              "timezoneName" : "GMT+0"
            },
            "listenerOrganizations" : [ ],
            "unitSystem" : "METRIC"
          },
          "key" : "3fbbe756-6907-4bed-aS1SKU",
          "description" : "Sample SKU",
          "enabled" : true,
          "brand" : "Docik",
          "skuSizeConversions" : [ ],
          "udfs" : [ ],
          "skuMeasurementUnits" : [ ],
          "alternativeKey" : "3fbbe756-6907-4bed-aS1SKU3fbbe756-6907-4bed-aO"
        },
        "plannedSize1" : 10.0,
        "availableSize1" : 10.0
      } ],
      "baseLineArrival" : "2023-10-19T13:27:52+0000",
      "baseLineDeparture" : "2023-10-19T13:27:52+0000",
      "plannedArrival" : "2023-10-19T13:27:52+0000",
      "plannedDeparture" : "2023-10-19T13:27:52+0000",
      "projectedArrival" : "2023-10-19T13:27:52+0000",
      "projectedDeparture" : "2023-10-19T13:27:52+0000",
      "baseLineDistance" : 120.5,
      "plannedDistance" : 120.5,
      "projectedDistance" : 120.5,
      "baseLineComplete" : "2023-10-19T13:27:52+0000",
      "plannedComplete" : "2023-10-19T13:27:52+0000",
      "projectedComplete" : "2023-10-19T13:27:52+0000",
      "baseLineCost" : 0,
      "plannedCost" : 0,
      "baseLineStart" : "2023-10-19T13:27:52+0000",
      "plannedStart" : "2023-10-19T13:27:52+0000",
      "projectedStart" : "2023-10-19T13:27:52+0000",
      "hasHelper" : false,
      "principalEquipment" : "3fbbe756-6907-4bed-aE",
      "driversName" : "[3fbbe756-6907-4bed-aD] 3fbbe756-6907-4bed-aD",
      "driverAssignments" : [ {
        "id" : 10000,
        "creationDate" : "2023-10-19T13:27:53+0000",
        "driver" : {
          "id" : 10080,
          "login" : "3fbbe756-6907-4bed-aD",
          "preferedLocale" : {
            "id" : 10000
          },
          "organization" : {
            "id" : 10064,
            "key" : "3fbbe756-6907-4bed-aO"
          },
          "key" : "3fbbe756-6907-4bed-aD",
          "name" : "3fbbe756-6907-4bed-aD",
          "externalUser" : false,
          "firstName" : "3fbbe756-6907-4bed-aD",
          "lastName" : ""
        }
      } ],
      "equipmentAssignments" : [ {
        "id" : 10000,
        "creationDate" : "2023-10-19T13:27:53+0000",
        "equipment" : {
          "id" : 10020,
          "creationDate" : "2023-10-19T13:27:49+0000",
          "lastModificationDate" : "2023-10-19T13:27:52+0000",
          "organization" : {
            "id" : 10064,
            "creationDate" : "2023-10-19T13:27:47+0000",
            "key" : "3fbbe756-6907-4bed-aO",
            "description" : "Organization Rest Docs Desc",
            "city" : "São Paulo",
            "state" : "São Paulo",
            "preferedLocale" : {
              "id" : 10000,
              "key" : "I18NLocale_en",
              "language" : "en",
              "description" : "English",
              "dateFormat" : "MM/dd/yyyy",
              "timeFormat" : "hh:mm a",
              "currency" : "US$",
              "decimalSymbol" : ".",
              "digitalGrouping" : ","
            },
            "timeZone" : {
              "id" : 10096,
              "description" : "GMT+0",
              "rawOffsetMinutes" : 0,
              "timezoneName" : "GMT+0"
            },
            "listenerOrganizations" : [ ],
            "unitSystem" : "METRIC"
          },
          "key" : "3fbbe756-6907-4bed-aE",
          "equipmentType" : {
            "id" : 10020,
            "organization" : {
              "id" : 10064,
              "creationDate" : "2023-10-19T13:27:47+0000",
              "key" : "3fbbe756-6907-4bed-aO",
              "description" : "Organization Rest Docs Desc",
              "city" : "São Paulo",
              "state" : "São Paulo",
              "preferedLocale" : {
                "id" : 10000,
                "key" : "I18NLocale_en",
                "language" : "en",
                "description" : "English",
                "dateFormat" : "MM/dd/yyyy",
                "timeFormat" : "hh:mm a",
                "currency" : "US$",
                "decimalSymbol" : ".",
                "digitalGrouping" : ","
              },
              "timeZone" : {
                "id" : 10096,
                "description" : "GMT+0",
                "rawOffsetMinutes" : 0,
                "timezoneName" : "GMT+0"
              },
              "listenerOrganizations" : [ ],
              "unitSystem" : "METRIC"
            },
            "key" : "3fbbe756-6907-4bed-aEET"
          },
          "udfs" : [ ],
          "description" : "Sample Equipment",
          "enabled" : true,
          "tags" : [ ]
        },
        "principal" : true
      } ],
      "tagAssignments" : [ {
        "id" : 10000,
        "creationDate" : "2023-10-19T13:27:52+0000",
        "tag" : {
          "id" : 10000,
          "organization" : {
            "id" : 10064,
            "key" : "3fbbe756-6907-4bed-aO",
            "description" : "Organization Rest Docs Desc",
            "city" : "São Paulo",
            "state" : "São Paulo",
            "preferedLocale" : {
              "id" : 10000
            },
            "timeZone" : {
              "id" : 10096
            },
            "unitSystem" : "METRIC"
          },
          "description" : "3fbbe756-6907-4bed-a",
          "enabled" : true,
          "tagType" : "ROUTE"
        }
      } ],
      "additionalMaterials" : [ {
        "id" : 10000,
        "sku" : {
          "id" : 10023,
          "creationDate" : "2023-10-19T13:27:52+0000",
          "organization" : {
            "id" : 10064,
            "key" : "3fbbe756-6907-4bed-aO"
          },
          "key" : "3fbbe756-6907-4bed-aSKU",
          "description" : "Pallet",
          "enabled" : true,
          "alternativeKey" : "3fbbe756-6907-4bed-aSKU3fbbe756-6907-4bed-aO"
        },
        "quantity" : 5
      } ],
      "consignedSkus" : [ {
        "id" : 10000,
        "location" : {
          "id" : 10032,
          "creationDate" : "2023-10-19T13:27:49+0000",
          "organization" : {
            "id" : 10064,
            "creationDate" : "2023-10-19T13:27:47+0000",
            "key" : "3fbbe756-6907-4bed-aO",
            "description" : "Organization Rest Docs Desc",
            "city" : "São Paulo",
            "state" : "São Paulo",
            "preferedLocale" : {
              "id" : 10000,
              "key" : "I18NLocale_en",
              "language" : "en",
              "description" : "English",
              "dateFormat" : "MM/dd/yyyy",
              "timeFormat" : "hh:mm a",
              "currency" : "US$",
              "decimalSymbol" : ".",
              "digitalGrouping" : ","
            },
            "timeZone" : {
              "id" : 10096,
              "description" : "GMT+0",
              "rawOffsetMinutes" : 0,
              "timezoneName" : "GMT+0"
            },
            "listenerOrganizations" : [ ],
            "unitSystem" : "METRIC"
          },
          "key" : "3fbbe756-6907-4bed-aS1Loc1",
          "locationType" : {
            "id" : 10046,
            "creationDate" : "2023-10-19T13:27:49+0000",
            "organization" : {
              "id" : 10064,
              "creationDate" : "2023-10-19T13:27:47+0000",
              "key" : "3fbbe756-6907-4bed-aO",
              "description" : "Organization Rest Docs Desc",
              "city" : "São Paulo",
              "state" : "São Paulo",
              "preferedLocale" : {
                "id" : 10000,
                "key" : "I18NLocale_en",
                "language" : "en",
                "description" : "English",
                "dateFormat" : "MM/dd/yyyy",
                "timeFormat" : "hh:mm a",
                "currency" : "US$",
                "decimalSymbol" : ".",
                "digitalGrouping" : ","
              },
              "timeZone" : {
                "id" : 10096,
                "description" : "GMT+0",
                "rawOffsetMinutes" : 0,
                "timezoneName" : "GMT+0"
              },
              "listenerOrganizations" : [ ],
              "unitSystem" : "METRIC"
            },
            "key" : "3fbbe756-6907-4bed-aLT",
            "description" : "Sample LocationType",
            "showOnMobileCreate" : true,
            "enabled" : true,
            "alternativeKey" : "3fbbe756-6907-4bed-aLT3fbbe756-6907-4bed-aO"
          },
          "locationOverrideTimeWindows" : [ ],
          "udfs" : [ ],
          "description" : "Location - Description Sample",
          "state" : "Ceará",
          "country" : "BR",
          "longitude" : -38.46933,
          "latitude" : -3.734536,
          "phone1" : "+55 (85) 9 9988-7766",
          "phone1Type" : "3",
          "email" : "example.greenmile@gogreen.com",
          "deliveryInstructions" : "Sample Delivery Instructions.",
          "deliveryRadius" : 20,
          "deliveryDays" : "0",
          "consignees" : [ ],
          "allowedUsers" : [ ],
          "enabled" : true,
          "hasGeofence" : false,
          "creditLimit" : 1000,
          "legalName" : "Location's Legal Name",
          "locationPaymentMethods" : [ ],
          "alternativeKey" : "3fbbe756-6907-4bed-aS1Loc13fbbe756-6907-4bed-aLT3fbbe756-6907-4bed-aO3fbbe756-6907-4bed-aO"
        },
        "sku" : {
          "id" : 10020,
          "creationDate" : "2023-10-19T13:27:49+0000",
          "organization" : {
            "id" : 10064,
            "creationDate" : "2023-10-19T13:27:47+0000",
            "key" : "3fbbe756-6907-4bed-aO",
            "description" : "Organization Rest Docs Desc",
            "city" : "São Paulo",
            "state" : "São Paulo",
            "preferedLocale" : {
              "id" : 10000,
              "key" : "I18NLocale_en",
              "language" : "en",
              "description" : "English",
              "dateFormat" : "MM/dd/yyyy",
              "timeFormat" : "hh:mm a",
              "currency" : "US$",
              "decimalSymbol" : ".",
              "digitalGrouping" : ","
            },
            "timeZone" : {
              "id" : 10096,
              "description" : "GMT+0",
              "rawOffsetMinutes" : 0,
              "timezoneName" : "GMT+0"
            },
            "listenerOrganizations" : [ ],
            "unitSystem" : "METRIC"
          },
          "key" : "3fbbe756-6907-4bed-aS1SKU",
          "description" : "Sample SKU",
          "enabled" : true,
          "brand" : "Docik",
          "skuSizeConversions" : [ ],
          "udfs" : [ ],
          "skuMeasurementUnits" : [ ],
          "alternativeKey" : "3fbbe756-6907-4bed-aS1SKU3fbbe756-6907-4bed-aO"
        },
        "dateConsigned" : "2023-10-19T13:27:51+0000",
        "amount" : 10,
        "amountReceived" : 1,
        "newRouteConsignedSku" : true,
        "consigned" : false
      } ],
      "holderMaterials" : [ {
        "id" : 10000,
        "sku" : {
          "id" : 10020,
          "creationDate" : "2023-10-19T13:27:49+0000",
          "organization" : {
            "id" : 10064,
            "creationDate" : "2023-10-19T13:27:47+0000",
            "key" : "3fbbe756-6907-4bed-aO",
            "description" : "Organization Rest Docs Desc",
            "city" : "São Paulo",
            "state" : "São Paulo",
            "preferedLocale" : {
              "id" : 10000,
              "key" : "I18NLocale_en",
              "language" : "en",
              "description" : "English",
              "dateFormat" : "MM/dd/yyyy",
              "timeFormat" : "hh:mm a",
              "currency" : "US$",
              "decimalSymbol" : ".",
              "digitalGrouping" : ","
            },
            "timeZone" : {
              "id" : 10096,
              "description" : "GMT+0",
              "rawOffsetMinutes" : 0,
              "timezoneName" : "GMT+0"
            },
            "listenerOrganizations" : [ ],
            "unitSystem" : "METRIC"
          },
          "key" : "3fbbe756-6907-4bed-aS1SKU",
          "description" : "Sample SKU",
          "enabled" : true,
          "brand" : "Docik",
          "skuSizeConversions" : [ ],
          "udfs" : [ ],
          "skuMeasurementUnits" : [ ],
          "alternativeKey" : "3fbbe756-6907-4bed-aS1SKU3fbbe756-6907-4bed-aO"
        },
        "transport" : {
          "id" : 10000,
          "creationDate" : "2023-10-19T13:27:52+0000",
          "organization" : {
            "id" : 10064,
            "key" : "3fbbe756-6907-4bed-aO"
          },
          "key" : "3fbbe756-6907-4bed-aTH",
          "date" : "2023-10-19",
          "status" : "PENDING",
          "alternativeKey" : "3fbbe756-6907-4bed-aTH3fbbe756-6907-4bed-aO"
        },
        "size1Quantity" : 1.0
      } ],
      "manifests" : [ {
        "id" : 10000,
        "sku" : {
          "id" : 10023,
          "creationDate" : "2023-10-19T13:27:52+0000",
          "organization" : {
            "id" : 10064,
            "key" : "3fbbe756-6907-4bed-aO"
          },
          "key" : "3fbbe756-6907-4bed-aSKU",
          "description" : "Pallet",
          "enabled" : true,
          "alternativeKey" : "3fbbe756-6907-4bed-aSKU3fbbe756-6907-4bed-aO"
        },
        "transport" : {
          "id" : 10000,
          "creationDate" : "2023-10-19T13:27:52+0000",
          "organization" : {
            "id" : 10064,
            "key" : "3fbbe756-6907-4bed-aO"
          },
          "key" : "3fbbe756-6907-4bed-aTH",
          "date" : "2023-10-19",
          "status" : "PENDING",
          "alternativeKey" : "3fbbe756-6907-4bed-aTH3fbbe756-6907-4bed-aO"
        },
        "size1" : 10.0
      } ],
      "totalStops" : 3,
      "canceledStops" : 0,
      "undeliveredStops" : 0,
      "redeliveredStops" : 0,
      "actualDepartures" : 0,
      "status" : "NOT_STARTED",
      "plannedTravelTimeMinutes" : 0,
      "baselineTravelTimeMinutes" : 0,
      "plannedServiceTime" : 0,
      "baselineServiceTime" : 0,
      "hasPicture" : false,
      "plannedSize1" : 53.0,
      "plannedSize2" : 10.0,
      "plannedSize3" : 7.0,
      "plannedPickupSize1" : 0.0,
      "plannedPickupSize2" : 0.0,
      "plannedPickupSize3" : 0.0,
      "hasGps" : false,
      "helperAssignments" : [ {
        "id" : 10000,
        "creationDate" : "2023-10-19T13:27:53+0000",
        "helper" : {
          "id" : 10081,
          "login" : "3fbbe756-6907-4bed-aDH",
          "preferedLocale" : {
            "id" : 10000
          },
          "organization" : {
            "id" : 10064,
            "key" : "3fbbe756-6907-4bed-aO"
          },
          "key" : "3fbbe756-6907-4bed-aDH",
          "name" : "3fbbe756-6907-4bed-aDH",
          "externalUser" : false,
          "firstName" : "3fbbe756-6907-4bed-aDH",
          "lastName" : ""
        }
      } ],
      "size1AliasConfig" : {
        "id" : 10000,
        "key" : "Weight",
        "description" : "Weight",
        "icon" : "gmfont-sizes-icon-size1",
        "preferredSize" : "1"
      },
      "size2AliasConfig" : {
        "id" : 10001,
        "key" : "Volume",
        "description" : "Volume",
        "icon" : "gmfont-sizes-icon-size2",
        "preferredSize" : "1"
      },
      "size3AliasConfig" : {
        "id" : 10002,
        "key" : "Value",
        "description" : "Value",
        "icon" : "gmfont-sizes-icon-size3",
        "preferredSize" : "1"
      },
      "onRoute" : false
    },
    "orders" : [ {
      "id" : 10041,
      "creationDate" : "2023-10-19T13:27:52+0000",
      "number" : "OrderDoc",
      "lineItems" : [ {
        "id" : 10021,
        "creationDate" : "2023-10-19T13:27:52+0000",
        "lineItemID" : "LineItemDoc",
        "sku" : {
          "id" : 10021,
          "creationDate" : "2023-10-19T13:27:50+0000",
          "organization" : {
            "id" : 10064,
            "creationDate" : "2023-10-19T13:27:47+0000",
            "key" : "3fbbe756-6907-4bed-aO",
            "description" : "Organization Rest Docs Desc",
            "city" : "São Paulo",
            "state" : "São Paulo",
            "preferedLocale" : {
              "id" : 10000,
              "key" : "I18NLocale_en",
              "language" : "en",
              "description" : "English",
              "dateFormat" : "MM/dd/yyyy",
              "timeFormat" : "hh:mm a",
              "currency" : "US$",
              "decimalSymbol" : ".",
              "digitalGrouping" : ","
            },
            "timeZone" : {
              "id" : 10096,
              "description" : "GMT+0",
              "rawOffsetMinutes" : 0,
              "timezoneName" : "GMT+0"
            },
            "listenerOrganizations" : [ ],
            "unitSystem" : "METRIC"
          },
          "key" : "3fbbe756-6907-4bed-aS2SKU",
          "description" : "Sample SKU",
          "enabled" : true,
          "brand" : "Docik",
          "skuSizeConversions" : [ ],
          "udfs" : [ ],
          "skuMeasurementUnits" : [ ],
          "alternativeKey" : "3fbbe756-6907-4bed-aS2SKU3fbbe756-6907-4bed-aO"
        },
        "plannedSize1" : 15.0,
        "plannedSize2" : 1.0,
        "plannedSize3" : 3.0,
        "hasPicture" : false,
        "size1AliasConfig" : {
          "id" : 10000,
          "key" : "Weight",
          "description" : "Weight",
          "icon" : "gmfont-sizes-icon-size1",
          "preferredSize" : "1"
        },
        "size2AliasConfig" : {
          "id" : 10001,
          "key" : "Volume",
          "description" : "Volume",
          "icon" : "gmfont-sizes-icon-size2",
          "preferredSize" : "1"
        },
        "size3AliasConfig" : {
          "id" : 10002,
          "key" : "Value",
          "description" : "Value",
          "icon" : "gmfont-sizes-icon-size3",
          "preferredSize" : "1"
        },
        "totalPrice" : 1466,
        "bonusKey" : "BONUSKEY-3fbbe756-6907-4bed-aS2"
      } ],
      "plannedSize1" : 15.0,
      "plannedSize2" : 1.0,
      "plannedSize3" : 3.0,
      "baselineSize1" : 16.0,
      "baselineSize2" : 0.0,
      "baselineSize3" : 0.0,
      "plannedPickupSize1" : 0.0,
      "plannedPickupSize2" : 0.0,
      "plannedPickupSize3" : 0.0,
      "hasPicture" : false,
      "size1AliasConfig" : {
        "id" : 10000,
        "key" : "Weight",
        "description" : "Weight",
        "icon" : "gmfont-sizes-icon-size1",
        "preferredSize" : "1"
      },
      "size2AliasConfig" : {
        "id" : 10001,
        "key" : "Volume",
        "description" : "Volume",
        "icon" : "gmfont-sizes-icon-size2",
        "preferredSize" : "1"
      },
      "size3AliasConfig" : {
        "id" : 10002,
        "key" : "Value",
        "description" : "Value",
        "icon" : "gmfont-sizes-icon-size3",
        "preferredSize" : "1"
      },
      "orderClass" : {
        "id" : 10001,
        "organization" : {
          "id" : 10064,
          "creationDate" : "2023-10-19T13:27:47+0000",
          "key" : "3fbbe756-6907-4bed-aO",
          "description" : "Organization Rest Docs Desc",
          "city" : "São Paulo",
          "state" : "São Paulo",
          "preferedLocale" : {
            "id" : 10000,
            "key" : "I18NLocale_en",
            "language" : "en",
            "description" : "English",
            "dateFormat" : "MM/dd/yyyy",
            "timeFormat" : "hh:mm a",
            "currency" : "US$",
            "decimalSymbol" : ".",
            "digitalGrouping" : ","
          },
          "timeZone" : {
            "id" : 10096,
            "description" : "GMT+0",
            "rawOffsetMinutes" : 0,
            "timezoneName" : "GMT+0"
          },
          "listenerOrganizations" : [ ],
          "unitSystem" : "METRIC"
        },
        "key" : "OrderClass-3fbbe756-6907-4bed-aS2",
        "description" : "Sample OrderClass",
        "enabled" : true,
        "pickup" : false,
        "allowNewOrder" : false,
        "allDamaged" : false,
        "allowedLocationTypes" : [ ],
        "allowedSkuTypes" : [ ],
        "useConsignedSku" : false,
        "allowedOrderSizes" : [ ]
      }
    } ],
    "location" : {
      "id" : 10033,
      "creationDate" : "2023-10-19T13:27:50+0000",
      "organization" : {
        "id" : 10064,
        "creationDate" : "2023-10-19T13:27:47+0000",
        "key" : "3fbbe756-6907-4bed-aO",
        "description" : "Organization Rest Docs Desc",
        "city" : "São Paulo",
        "state" : "São Paulo",
        "timeZone" : {
          "id" : 10096,
          "description" : "GMT+0",
          "rawOffsetMinutes" : 0,
          "timezoneName" : "GMT+0"
        },
        "unitSystem" : "METRIC"
      },
      "key" : "3fbbe756-6907-4bed-aS2Loc2",
      "description" : "Location - Description Sample",
      "state" : "Ceará",
      "country" : "BR",
      "longitude" : -38.46933,
      "latitude" : -3.734536,
      "phone1" : "+55 (85) 9 9988-7766",
      "phone1Type" : "3",
      "email" : "example.greenmile@gogreen.com",
      "deliveryInstructions" : "Sample Delivery Instructions.",
      "deliveryRadius" : 20,
      "deliveryDays" : "0",
      "enabled" : true,
      "hasGeofence" : false,
      "creditLimit" : 1000,
      "legalName" : "Location's Legal Name",
      "alternativeKey" : "3fbbe756-6907-4bed-aS2Loc23fbbe756-6907-4bed-aO"
    },
    "baseLineSequenceNum" : 2,
    "plannedSequenceNum" : 2,
    "stopType" : {
      "id" : 10041,
      "creationDate" : "2023-10-19T13:27:50+0000",
      "organization" : {
        "id" : 10064,
        "creationDate" : "2023-10-19T13:27:47+0000",
        "key" : "3fbbe756-6907-4bed-aO",
        "description" : "Organization Rest Docs Desc",
        "city" : "São Paulo",
        "state" : "São Paulo",
        "preferedLocale" : {
          "id" : 10000,
          "key" : "I18NLocale_en",
          "language" : "en",
          "description" : "English",
          "dateFormat" : "MM/dd/yyyy",
          "timeFormat" : "hh:mm a",
          "currency" : "US$",
          "decimalSymbol" : ".",
          "digitalGrouping" : ","
        },
        "timeZone" : {
          "id" : 10096,
          "description" : "GMT+0",
          "rawOffsetMinutes" : 0,
          "timezoneName" : "GMT+0"
        },
        "listenerOrganizations" : [ ],
        "unitSystem" : "METRIC"
      },
      "key" : "3fbbe756-6907-4bed-aS2ST",
      "description" : "Sample StopType",
      "type" : "STOP",
      "locationRequired" : false
    },
    "baseLineArrival" : "2023-10-19T13:27:50+0000",
    "plannedArrival" : "2023-10-19T13:27:50+0000",
    "projectedArrival" : "2023-10-19T13:27:50+0000",
    "baseLineService" : "2023-10-19T13:27:50+0000",
    "plannedService" : "2023-10-19T13:27:50+0000",
    "projectedService" : "2023-10-19T13:27:50+0000",
    "baseLineDeparture" : "2023-10-19T13:27:50+0000",
    "plannedDeparture" : "2023-10-19T13:27:50+0000",
    "projectedDeparture" : "2023-10-19T13:27:50+0000",
    "baseLineDistance" : 0.0,
    "plannedDistance" : 0.0,
    "projectedDistance" : 0.0,
    "plannedSize1" : 15.0,
    "plannedSize2" : 1.0,
    "plannedSize3" : 3.0,
    "plannedPickupSize1" : 0.0,
    "plannedPickupSize2" : 0.0,
    "plannedPickupSize3" : 0.0,
    "bulkArriveCanceled" : false,
    "plannedServiceTime" : 0,
    "baselineServiceTime" : 0,
    "longitude" : -38.46933,
    "latitude" : -3.734536,
    "ordersInfo" : "[OrderDoc]",
    "size1AliasConfig" : {
      "id" : 10000,
      "key" : "Weight",
      "description" : "Weight",
      "icon" : "gmfont-sizes-icon-size1",
      "preferredSize" : "1"
    },
    "size2AliasConfig" : {
      "id" : 10001,
      "key" : "Volume",
      "description" : "Volume",
      "icon" : "gmfont-sizes-icon-size2",
      "preferredSize" : "1"
    },
    "size3AliasConfig" : {
      "id" : 10002,
      "key" : "Value",
      "description" : "Value",
      "icon" : "gmfont-sizes-icon-size3",
      "preferredSize" : "1"
    },
    "canceled" : false,
    "returned" : false,
    "redelivered" : false
  }, {
    "id" : 10042,
    "creationDate" : "2023-10-19T13:27:52+0000",
    "key" : "3fbbe756-6907-4bed-aS3",
    "route" : {
      "id" : 10027,
      "creationDate" : "2023-10-19T13:27:52+0000",
      "organization" : {
        "id" : 10064,
        "key" : "3fbbe756-6907-4bed-aO",
        "preferedLocale" : {
          "id" : 10000
        },
        "timeZone" : {
          "id" : 10096,
          "description" : "GMT+0",
          "rawOffsetMinutes" : 0,
          "timezoneName" : "GMT+0"
        },
        "unitSystem" : "METRIC"
      },
      "key" : "3fbbe756-6907-4bed-a",
      "date" : "2023-10-19",
      "description" : "Sample Route Doc",
      "origin" : {
        "id" : 10035,
        "creationDate" : "2023-10-19T13:27:51+0000",
        "lastModificationDate" : "2023-10-19T13:27:52+0000",
        "organization" : {
          "id" : 10064,
          "creationDate" : "2023-10-19T13:27:47+0000",
          "key" : "3fbbe756-6907-4bed-aO",
          "description" : "Organization Rest Docs Desc",
          "city" : "São Paulo",
          "state" : "São Paulo",
          "timeZone" : {
            "id" : 10096,
            "description" : "GMT+0",
            "rawOffsetMinutes" : 0,
            "timezoneName" : "GMT+0"
          },
          "unitSystem" : "METRIC"
        },
        "key" : "3fbbe756-6907-4bed-aOD",
        "description" : "Location - Description Sample",
        "state" : "Ceará",
        "country" : "BR",
        "longitude" : -38.46933,
        "geocodingQuality" : "MANUAL",
        "latitude" : -3.734536,
        "phone1" : "+55 (85) 9 9988-7766",
        "phone1Type" : "3",
        "email" : "example.greenmile@gogreen.com",
        "deliveryInstructions" : "Sample Delivery Instructions.",
        "deliveryRadius" : 20,
        "deliveryDays" : "0",
        "geocodingDate" : "2023-10-19T13:27:52+0000",
        "geocodingLastCheck" : "2023-10-19T13:27:52+0000",
        "enabled" : true,
        "hasGeofence" : false,
        "creditLimit" : 1000,
        "legalName" : "Location's Legal Name",
        "alternativeKey" : "3fbbe756-6907-4bed-aOD3fbbe756-6907-4bed-aO"
      },
      "origLatitude" : -3.734536,
      "origLongitude" : -38.46933,
      "destination" : {
        "id" : 10036,
        "creationDate" : "2023-10-19T13:27:52+0000",
        "organization" : {
          "id" : 10064,
          "creationDate" : "2023-10-19T13:27:47+0000",
          "key" : "3fbbe756-6907-4bed-aO",
          "description" : "Organization Rest Docs Desc",
          "city" : "São Paulo",
          "state" : "São Paulo",
          "timeZone" : {
            "id" : 10096,
            "description" : "GMT+0",
            "rawOffsetMinutes" : 0,
            "timezoneName" : "GMT+0"
          },
          "unitSystem" : "METRIC"
        },
        "key" : "3fbbe756-6907-4bed-aDD",
        "description" : "Location - Description Sample",
        "state" : "Ceará",
        "country" : "BR",
        "longitude" : -38.46933,
        "latitude" : -3.734536,
        "phone1" : "+55 (85) 9 9988-7766",
        "phone1Type" : "3",
        "email" : "example.greenmile@gogreen.com",
        "deliveryInstructions" : "Sample Delivery Instructions.",
        "deliveryRadius" : 20,
        "deliveryDays" : "0",
        "enabled" : true,
        "hasGeofence" : false,
        "creditLimit" : 1000,
        "legalName" : "Location's Legal Name",
        "alternativeKey" : "3fbbe756-6907-4bed-aDD3fbbe756-6907-4bed-aO"
      },
      "destLatitude" : -3.734536,
      "destLongitude" : -38.46933,
      "firstStopIsOrigin" : false,
      "lastStopIsDestination" : false,
      "extraLineItems" : [ {
        "id" : 10000,
        "creationDate" : "2023-10-19T13:27:53+0000",
        "sku" : {
          "id" : 10020,
          "creationDate" : "2023-10-19T13:27:49+0000",
          "organization" : {
            "id" : 10064,
            "creationDate" : "2023-10-19T13:27:47+0000",
            "key" : "3fbbe756-6907-4bed-aO",
            "description" : "Organization Rest Docs Desc",
            "city" : "São Paulo",
            "state" : "São Paulo",
            "preferedLocale" : {
              "id" : 10000,
              "key" : "I18NLocale_en",
              "language" : "en",
              "description" : "English",
              "dateFormat" : "MM/dd/yyyy",
              "timeFormat" : "hh:mm a",
              "currency" : "US$",
              "decimalSymbol" : ".",
              "digitalGrouping" : ","
            },
            "timeZone" : {
              "id" : 10096,
              "description" : "GMT+0",
              "rawOffsetMinutes" : 0,
              "timezoneName" : "GMT+0"
            },
            "listenerOrganizations" : [ ],
            "unitSystem" : "METRIC"
          },
          "key" : "3fbbe756-6907-4bed-aS1SKU",
          "description" : "Sample SKU",
          "enabled" : true,
          "brand" : "Docik",
          "skuSizeConversions" : [ ],
          "udfs" : [ ],
          "skuMeasurementUnits" : [ ],
          "alternativeKey" : "3fbbe756-6907-4bed-aS1SKU3fbbe756-6907-4bed-aO"
        },
        "plannedSize1" : 10.0,
        "availableSize1" : 10.0
      } ],
      "baseLineArrival" : "2023-10-19T13:27:52+0000",
      "baseLineDeparture" : "2023-10-19T13:27:52+0000",
      "plannedArrival" : "2023-10-19T13:27:52+0000",
      "plannedDeparture" : "2023-10-19T13:27:52+0000",
      "projectedArrival" : "2023-10-19T13:27:52+0000",
      "projectedDeparture" : "2023-10-19T13:27:52+0000",
      "baseLineDistance" : 120.5,
      "plannedDistance" : 120.5,
      "projectedDistance" : 120.5,
      "baseLineComplete" : "2023-10-19T13:27:52+0000",
      "plannedComplete" : "2023-10-19T13:27:52+0000",
      "projectedComplete" : "2023-10-19T13:27:52+0000",
      "baseLineCost" : 0,
      "plannedCost" : 0,
      "baseLineStart" : "2023-10-19T13:27:52+0000",
      "plannedStart" : "2023-10-19T13:27:52+0000",
      "projectedStart" : "2023-10-19T13:27:52+0000",
      "hasHelper" : false,
      "principalEquipment" : "3fbbe756-6907-4bed-aE",
      "driversName" : "[3fbbe756-6907-4bed-aD] 3fbbe756-6907-4bed-aD",
      "driverAssignments" : [ {
        "id" : 10000,
        "creationDate" : "2023-10-19T13:27:53+0000",
        "driver" : {
          "id" : 10080,
          "login" : "3fbbe756-6907-4bed-aD",
          "preferedLocale" : {
            "id" : 10000
          },
          "organization" : {
            "id" : 10064,
            "key" : "3fbbe756-6907-4bed-aO"
          },
          "key" : "3fbbe756-6907-4bed-aD",
          "name" : "3fbbe756-6907-4bed-aD",
          "externalUser" : false,
          "firstName" : "3fbbe756-6907-4bed-aD",
          "lastName" : ""
        }
      } ],
      "equipmentAssignments" : [ {
        "id" : 10000,
        "creationDate" : "2023-10-19T13:27:53+0000",
        "equipment" : {
          "id" : 10020,
          "creationDate" : "2023-10-19T13:27:49+0000",
          "lastModificationDate" : "2023-10-19T13:27:52+0000",
          "organization" : {
            "id" : 10064,
            "creationDate" : "2023-10-19T13:27:47+0000",
            "key" : "3fbbe756-6907-4bed-aO",
            "description" : "Organization Rest Docs Desc",
            "city" : "São Paulo",
            "state" : "São Paulo",
            "preferedLocale" : {
              "id" : 10000,
              "key" : "I18NLocale_en",
              "language" : "en",
              "description" : "English",
              "dateFormat" : "MM/dd/yyyy",
              "timeFormat" : "hh:mm a",
              "currency" : "US$",
              "decimalSymbol" : ".",
              "digitalGrouping" : ","
            },
            "timeZone" : {
              "id" : 10096,
              "description" : "GMT+0",
              "rawOffsetMinutes" : 0,
              "timezoneName" : "GMT+0"
            },
            "listenerOrganizations" : [ ],
            "unitSystem" : "METRIC"
          },
          "key" : "3fbbe756-6907-4bed-aE",
          "equipmentType" : {
            "id" : 10020,
            "organization" : {
              "id" : 10064,
              "creationDate" : "2023-10-19T13:27:47+0000",
              "key" : "3fbbe756-6907-4bed-aO",
              "description" : "Organization Rest Docs Desc",
              "city" : "São Paulo",
              "state" : "São Paulo",
              "preferedLocale" : {
                "id" : 10000,
                "key" : "I18NLocale_en",
                "language" : "en",
                "description" : "English",
                "dateFormat" : "MM/dd/yyyy",
                "timeFormat" : "hh:mm a",
                "currency" : "US$",
                "decimalSymbol" : ".",
                "digitalGrouping" : ","
              },
              "timeZone" : {
                "id" : 10096,
                "description" : "GMT+0",
                "rawOffsetMinutes" : 0,
                "timezoneName" : "GMT+0"
              },
              "listenerOrganizations" : [ ],
              "unitSystem" : "METRIC"
            },
            "key" : "3fbbe756-6907-4bed-aEET"
          },
          "udfs" : [ ],
          "description" : "Sample Equipment",
          "enabled" : true,
          "tags" : [ ]
        },
        "principal" : true
      } ],
      "tagAssignments" : [ {
        "id" : 10000,
        "creationDate" : "2023-10-19T13:27:52+0000",
        "tag" : {
          "id" : 10000,
          "organization" : {
            "id" : 10064,
            "key" : "3fbbe756-6907-4bed-aO",
            "description" : "Organization Rest Docs Desc",
            "city" : "São Paulo",
            "state" : "São Paulo",
            "preferedLocale" : {
              "id" : 10000
            },
            "timeZone" : {
              "id" : 10096
            },
            "unitSystem" : "METRIC"
          },
          "description" : "3fbbe756-6907-4bed-a",
          "enabled" : true,
          "tagType" : "ROUTE"
        }
      } ],
      "additionalMaterials" : [ {
        "id" : 10000,
        "sku" : {
          "id" : 10023,
          "creationDate" : "2023-10-19T13:27:52+0000",
          "organization" : {
            "id" : 10064,
            "key" : "3fbbe756-6907-4bed-aO"
          },
          "key" : "3fbbe756-6907-4bed-aSKU",
          "description" : "Pallet",
          "enabled" : true,
          "alternativeKey" : "3fbbe756-6907-4bed-aSKU3fbbe756-6907-4bed-aO"
        },
        "quantity" : 5
      } ],
      "consignedSkus" : [ {
        "id" : 10000,
        "location" : {
          "id" : 10032,
          "creationDate" : "2023-10-19T13:27:49+0000",
          "organization" : {
            "id" : 10064,
            "creationDate" : "2023-10-19T13:27:47+0000",
            "key" : "3fbbe756-6907-4bed-aO",
            "description" : "Organization Rest Docs Desc",
            "city" : "São Paulo",
            "state" : "São Paulo",
            "preferedLocale" : {
              "id" : 10000,
              "key" : "I18NLocale_en",
              "language" : "en",
              "description" : "English",
              "dateFormat" : "MM/dd/yyyy",
              "timeFormat" : "hh:mm a",
              "currency" : "US$",
              "decimalSymbol" : ".",
              "digitalGrouping" : ","
            },
            "timeZone" : {
              "id" : 10096,
              "description" : "GMT+0",
              "rawOffsetMinutes" : 0,
              "timezoneName" : "GMT+0"
            },
            "listenerOrganizations" : [ ],
            "unitSystem" : "METRIC"
          },
          "key" : "3fbbe756-6907-4bed-aS1Loc1",
          "locationType" : {
            "id" : 10046,
            "creationDate" : "2023-10-19T13:27:49+0000",
            "organization" : {
              "id" : 10064,
              "creationDate" : "2023-10-19T13:27:47+0000",
              "key" : "3fbbe756-6907-4bed-aO",
              "description" : "Organization Rest Docs Desc",
              "city" : "São Paulo",
              "state" : "São Paulo",
              "preferedLocale" : {
                "id" : 10000,
                "key" : "I18NLocale_en",
                "language" : "en",
                "description" : "English",
                "dateFormat" : "MM/dd/yyyy",
                "timeFormat" : "hh:mm a",
                "currency" : "US$",
                "decimalSymbol" : ".",
                "digitalGrouping" : ","
              },
              "timeZone" : {
                "id" : 10096,
                "description" : "GMT+0",
                "rawOffsetMinutes" : 0,
                "timezoneName" : "GMT+0"
              },
              "listenerOrganizations" : [ ],
              "unitSystem" : "METRIC"
            },
            "key" : "3fbbe756-6907-4bed-aLT",
            "description" : "Sample LocationType",
            "showOnMobileCreate" : true,
            "enabled" : true,
            "alternativeKey" : "3fbbe756-6907-4bed-aLT3fbbe756-6907-4bed-aO"
          },
          "locationOverrideTimeWindows" : [ ],
          "udfs" : [ ],
          "description" : "Location - Description Sample",
          "state" : "Ceará",
          "country" : "BR",
          "longitude" : -38.46933,
          "latitude" : -3.734536,
          "phone1" : "+55 (85) 9 9988-7766",
          "phone1Type" : "3",
          "email" : "example.greenmile@gogreen.com",
          "deliveryInstructions" : "Sample Delivery Instructions.",
          "deliveryRadius" : 20,
          "deliveryDays" : "0",
          "consignees" : [ ],
          "allowedUsers" : [ ],
          "enabled" : true,
          "hasGeofence" : false,
          "creditLimit" : 1000,
          "legalName" : "Location's Legal Name",
          "locationPaymentMethods" : [ ],
          "alternativeKey" : "3fbbe756-6907-4bed-aS1Loc13fbbe756-6907-4bed-aLT3fbbe756-6907-4bed-aO3fbbe756-6907-4bed-aO"
        },
        "sku" : {
          "id" : 10020,
          "creationDate" : "2023-10-19T13:27:49+0000",
          "organization" : {
            "id" : 10064,
            "creationDate" : "2023-10-19T13:27:47+0000",
            "key" : "3fbbe756-6907-4bed-aO",
            "description" : "Organization Rest Docs Desc",
            "city" : "São Paulo",
            "state" : "São Paulo",
            "preferedLocale" : {
              "id" : 10000,
              "key" : "I18NLocale_en",
              "language" : "en",
              "description" : "English",
              "dateFormat" : "MM/dd/yyyy",
              "timeFormat" : "hh:mm a",
              "currency" : "US$",
              "decimalSymbol" : ".",
              "digitalGrouping" : ","
            },
            "timeZone" : {
              "id" : 10096,
              "description" : "GMT+0",
              "rawOffsetMinutes" : 0,
              "timezoneName" : "GMT+0"
            },
            "listenerOrganizations" : [ ],
            "unitSystem" : "METRIC"
          },
          "key" : "3fbbe756-6907-4bed-aS1SKU",
          "description" : "Sample SKU",
          "enabled" : true,
          "brand" : "Docik",
          "skuSizeConversions" : [ ],
          "udfs" : [ ],
          "skuMeasurementUnits" : [ ],
          "alternativeKey" : "3fbbe756-6907-4bed-aS1SKU3fbbe756-6907-4bed-aO"
        },
        "dateConsigned" : "2023-10-19T13:27:51+0000",
        "amount" : 10,
        "amountReceived" : 1,
        "newRouteConsignedSku" : true,
        "consigned" : false
      } ],
      "holderMaterials" : [ {
        "id" : 10000,
        "sku" : {
          "id" : 10020,
          "creationDate" : "2023-10-19T13:27:49+0000",
          "organization" : {
            "id" : 10064,
            "creationDate" : "2023-10-19T13:27:47+0000",
            "key" : "3fbbe756-6907-4bed-aO",
            "description" : "Organization Rest Docs Desc",
            "city" : "São Paulo",
            "state" : "São Paulo",
            "preferedLocale" : {
              "id" : 10000,
              "key" : "I18NLocale_en",
              "language" : "en",
              "description" : "English",
              "dateFormat" : "MM/dd/yyyy",
              "timeFormat" : "hh:mm a",
              "currency" : "US$",
              "decimalSymbol" : ".",
              "digitalGrouping" : ","
            },
            "timeZone" : {
              "id" : 10096,
              "description" : "GMT+0",
              "rawOffsetMinutes" : 0,
              "timezoneName" : "GMT+0"
            },
            "listenerOrganizations" : [ ],
            "unitSystem" : "METRIC"
          },
          "key" : "3fbbe756-6907-4bed-aS1SKU",
          "description" : "Sample SKU",
          "enabled" : true,
          "brand" : "Docik",
          "skuSizeConversions" : [ ],
          "udfs" : [ ],
          "skuMeasurementUnits" : [ ],
          "alternativeKey" : "3fbbe756-6907-4bed-aS1SKU3fbbe756-6907-4bed-aO"
        },
        "transport" : {
          "id" : 10000,
          "creationDate" : "2023-10-19T13:27:52+0000",
          "organization" : {
            "id" : 10064,
            "key" : "3fbbe756-6907-4bed-aO"
          },
          "key" : "3fbbe756-6907-4bed-aTH",
          "date" : "2023-10-19",
          "status" : "PENDING",
          "alternativeKey" : "3fbbe756-6907-4bed-aTH3fbbe756-6907-4bed-aO"
        },
        "size1Quantity" : 1.0
      } ],
      "manifests" : [ {
        "id" : 10000,
        "sku" : {
          "id" : 10023,
          "creationDate" : "2023-10-19T13:27:52+0000",
          "organization" : {
            "id" : 10064,
            "key" : "3fbbe756-6907-4bed-aO"
          },
          "key" : "3fbbe756-6907-4bed-aSKU",
          "description" : "Pallet",
          "enabled" : true,
          "alternativeKey" : "3fbbe756-6907-4bed-aSKU3fbbe756-6907-4bed-aO"
        },
        "transport" : {
          "id" : 10000,
          "creationDate" : "2023-10-19T13:27:52+0000",
          "organization" : {
            "id" : 10064,
            "key" : "3fbbe756-6907-4bed-aO"
          },
          "key" : "3fbbe756-6907-4bed-aTH",
          "date" : "2023-10-19",
          "status" : "PENDING",
          "alternativeKey" : "3fbbe756-6907-4bed-aTH3fbbe756-6907-4bed-aO"
        },
        "size1" : 10.0
      } ],
      "totalStops" : 3,
      "canceledStops" : 0,
      "undeliveredStops" : 0,
      "redeliveredStops" : 0,
      "actualDepartures" : 0,
      "status" : "NOT_STARTED",
      "plannedTravelTimeMinutes" : 0,
      "baselineTravelTimeMinutes" : 0,
      "plannedServiceTime" : 0,
      "baselineServiceTime" : 0,
      "hasPicture" : false,
      "plannedSize1" : 53.0,
      "plannedSize2" : 10.0,
      "plannedSize3" : 7.0,
      "plannedPickupSize1" : 0.0,
      "plannedPickupSize2" : 0.0,
      "plannedPickupSize3" : 0.0,
      "hasGps" : false,
      "helperAssignments" : [ {
        "id" : 10000,
        "creationDate" : "2023-10-19T13:27:53+0000",
        "helper" : {
          "id" : 10081,
          "login" : "3fbbe756-6907-4bed-aDH",
          "preferedLocale" : {
            "id" : 10000
          },
          "organization" : {
            "id" : 10064,
            "key" : "3fbbe756-6907-4bed-aO"
          },
          "key" : "3fbbe756-6907-4bed-aDH",
          "name" : "3fbbe756-6907-4bed-aDH",
          "externalUser" : false,
          "firstName" : "3fbbe756-6907-4bed-aDH",
          "lastName" : ""
        }
      } ],
      "size1AliasConfig" : {
        "id" : 10000,
        "key" : "Weight",
        "description" : "Weight",
        "icon" : "gmfont-sizes-icon-size1",
        "preferredSize" : "1"
      },
      "size2AliasConfig" : {
        "id" : 10001,
        "key" : "Volume",
        "description" : "Volume",
        "icon" : "gmfont-sizes-icon-size2",
        "preferredSize" : "1"
      },
      "size3AliasConfig" : {
        "id" : 10002,
        "key" : "Value",
        "description" : "Value",
        "icon" : "gmfont-sizes-icon-size3",
        "preferredSize" : "1"
      },
      "onRoute" : false
    },
    "orders" : [ {
      "id" : 10042,
      "creationDate" : "2023-10-19T13:27:52+0000",
      "number" : "OrderDoc",
      "lineItems" : [ {
        "id" : 10022,
        "creationDate" : "2023-10-19T13:27:52+0000",
        "lineItemID" : "LineItemDoc",
        "sku" : {
          "id" : 10022,
          "creationDate" : "2023-10-19T13:27:50+0000",
          "organization" : {
            "id" : 10064,
            "creationDate" : "2023-10-19T13:27:47+0000",
            "key" : "3fbbe756-6907-4bed-aO",
            "description" : "Organization Rest Docs Desc",
            "city" : "São Paulo",
            "state" : "São Paulo",
            "preferedLocale" : {
              "id" : 10000,
              "key" : "I18NLocale_en",
              "language" : "en",
              "description" : "English",
              "dateFormat" : "MM/dd/yyyy",
              "timeFormat" : "hh:mm a",
              "currency" : "US$",
              "decimalSymbol" : ".",
              "digitalGrouping" : ","
            },
            "timeZone" : {
              "id" : 10096,
              "description" : "GMT+0",
              "rawOffsetMinutes" : 0,
              "timezoneName" : "GMT+0"
            },
            "listenerOrganizations" : [ ],
            "unitSystem" : "METRIC"
          },
          "key" : "3fbbe756-6907-4bed-aS3SKU",
          "description" : "Sample SKU",
          "enabled" : true,
          "brand" : "Docik",
          "skuSizeConversions" : [ ],
          "udfs" : [ ],
          "skuMeasurementUnits" : [ ],
          "alternativeKey" : "3fbbe756-6907-4bed-aS3SKU3fbbe756-6907-4bed-aO"
        },
        "plannedSize1" : 28.0,
        "plannedSize2" : 7.0,
        "plannedSize3" : 2.0,
        "hasPicture" : false,
        "size1AliasConfig" : {
          "id" : 10000,
          "key" : "Weight",
          "description" : "Weight",
          "icon" : "gmfont-sizes-icon-size1",
          "preferredSize" : "1"
        },
        "size2AliasConfig" : {
          "id" : 10001,
          "key" : "Volume",
          "description" : "Volume",
          "icon" : "gmfont-sizes-icon-size2",
          "preferredSize" : "1"
        },
        "size3AliasConfig" : {
          "id" : 10002,
          "key" : "Value",
          "description" : "Value",
          "icon" : "gmfont-sizes-icon-size3",
          "preferredSize" : "1"
        },
        "totalPrice" : 229,
        "bonusKey" : "BONUSKEY-3fbbe756-6907-4bed-aS3"
      } ],
      "plannedSize1" : 28.0,
      "plannedSize2" : 7.0,
      "plannedSize3" : 2.0,
      "baselineSize1" : 7.0,
      "baselineSize2" : 0.0,
      "baselineSize3" : 0.0,
      "plannedPickupSize1" : 0.0,
      "plannedPickupSize2" : 0.0,
      "plannedPickupSize3" : 0.0,
      "hasPicture" : false,
      "size1AliasConfig" : {
        "id" : 10000,
        "key" : "Weight",
        "description" : "Weight",
        "icon" : "gmfont-sizes-icon-size1",
        "preferredSize" : "1"
      },
      "size2AliasConfig" : {
        "id" : 10001,
        "key" : "Volume",
        "description" : "Volume",
        "icon" : "gmfont-sizes-icon-size2",
        "preferredSize" : "1"
      },
      "size3AliasConfig" : {
        "id" : 10002,
        "key" : "Value",
        "description" : "Value",
        "icon" : "gmfont-sizes-icon-size3",
        "preferredSize" : "1"
      },
      "orderClass" : {
        "id" : 10002,
        "organization" : {
          "id" : 10064,
          "creationDate" : "2023-10-19T13:27:47+0000",
          "key" : "3fbbe756-6907-4bed-aO",
          "description" : "Organization Rest Docs Desc",
          "city" : "São Paulo",
          "state" : "São Paulo",
          "preferedLocale" : {
            "id" : 10000,
            "key" : "I18NLocale_en",
            "language" : "en",
            "description" : "English",
            "dateFormat" : "MM/dd/yyyy",
            "timeFormat" : "hh:mm a",
            "currency" : "US$",
            "decimalSymbol" : ".",
            "digitalGrouping" : ","
          },
          "timeZone" : {
            "id" : 10096,
            "description" : "GMT+0",
            "rawOffsetMinutes" : 0,
            "timezoneName" : "GMT+0"
          },
          "listenerOrganizations" : [ ],
          "unitSystem" : "METRIC"
        },
        "key" : "OrderClass-3fbbe756-6907-4bed-aS3",
        "description" : "Sample OrderClass",
        "enabled" : true,
        "pickup" : false,
        "allowNewOrder" : false,
        "allDamaged" : false,
        "allowedLocationTypes" : [ ],
        "allowedSkuTypes" : [ ],
        "useConsignedSku" : false,
        "allowedOrderSizes" : [ ]
      }
    } ],
    "location" : {
      "id" : 10034,
      "creationDate" : "2023-10-19T13:27:51+0000",
      "organization" : {
        "id" : 10064,
        "creationDate" : "2023-10-19T13:27:47+0000",
        "key" : "3fbbe756-6907-4bed-aO",
        "description" : "Organization Rest Docs Desc",
        "city" : "São Paulo",
        "state" : "São Paulo",
        "timeZone" : {
          "id" : 10096,
          "description" : "GMT+0",
          "rawOffsetMinutes" : 0,
          "timezoneName" : "GMT+0"
        },
        "unitSystem" : "METRIC"
      },
      "key" : "3fbbe756-6907-4bed-aS3Loc3",
      "description" : "Location - Description Sample",
      "state" : "Ceará",
      "country" : "BR",
      "longitude" : -38.46933,
      "latitude" : -3.734536,
      "phone1" : "+55 (85) 9 9988-7766",
      "phone1Type" : "3",
      "email" : "example.greenmile@gogreen.com",
      "deliveryInstructions" : "Sample Delivery Instructions.",
      "deliveryRadius" : 20,
      "deliveryDays" : "0",
      "enabled" : true,
      "hasGeofence" : false,
      "creditLimit" : 1000,
      "legalName" : "Location's Legal Name",
      "alternativeKey" : "3fbbe756-6907-4bed-aS3Loc33fbbe756-6907-4bed-aO"
    },
    "baseLineSequenceNum" : 3,
    "plannedSequenceNum" : 3,
    "stopType" : {
      "id" : 10042,
      "creationDate" : "2023-10-19T13:27:50+0000",
      "organization" : {
        "id" : 10064,
        "creationDate" : "2023-10-19T13:27:47+0000",
        "key" : "3fbbe756-6907-4bed-aO",
        "description" : "Organization Rest Docs Desc",
        "city" : "São Paulo",
        "state" : "São Paulo",
        "preferedLocale" : {
          "id" : 10000,
          "key" : "I18NLocale_en",
          "language" : "en",
          "description" : "English",
          "dateFormat" : "MM/dd/yyyy",
          "timeFormat" : "hh:mm a",
          "currency" : "US$",
          "decimalSymbol" : ".",
          "digitalGrouping" : ","
        },
        "timeZone" : {
          "id" : 10096,
          "description" : "GMT+0",
          "rawOffsetMinutes" : 0,
          "timezoneName" : "GMT+0"
        },
        "listenerOrganizations" : [ ],
        "unitSystem" : "METRIC"
      },
      "key" : "3fbbe756-6907-4bed-aS3ST",
      "description" : "Sample StopType",
      "type" : "STOP",
      "locationRequired" : false
    },
    "baseLineArrival" : "2023-10-19T13:27:51+0000",
    "plannedArrival" : "2023-10-19T13:27:51+0000",
    "projectedArrival" : "2023-10-19T13:27:51+0000",
    "baseLineService" : "2023-10-19T13:27:51+0000",
    "plannedService" : "2023-10-19T13:27:51+0000",
    "projectedService" : "2023-10-19T13:27:51+0000",
    "baseLineDeparture" : "2023-10-19T13:27:51+0000",
    "plannedDeparture" : "2023-10-19T13:27:51+0000",
    "projectedDeparture" : "2023-10-19T13:27:51+0000",
    "baseLineDistance" : 0.0,
    "plannedDistance" : 0.0,
    "projectedDistance" : 0.0,
    "plannedSize1" : 28.0,
    "plannedSize2" : 7.0,
    "plannedSize3" : 2.0,
    "plannedPickupSize1" : 0.0,
    "plannedPickupSize2" : 0.0,
    "plannedPickupSize3" : 0.0,
    "bulkArriveCanceled" : false,
    "plannedServiceTime" : 0,
    "baselineServiceTime" : 0,
    "longitude" : -38.46933,
    "latitude" : -3.734536,
    "ordersInfo" : "[OrderDoc]",
    "size1AliasConfig" : {
      "id" : 10000,
      "key" : "Weight",
      "description" : "Weight",
      "icon" : "gmfont-sizes-icon-size1",
      "preferredSize" : "1"
    },
    "size2AliasConfig" : {
      "id" : 10001,
      "key" : "Volume",
      "description" : "Volume",
      "icon" : "gmfont-sizes-icon-size2",
      "preferredSize" : "1"
    },
    "size3AliasConfig" : {
      "id" : 10002,
      "key" : "Value",
      "description" : "Value",
      "icon" : "gmfont-sizes-icon-size3",
      "preferredSize" : "1"
    },
    "canceled" : false,
    "returned" : false,
    "redelivered" : false
  } ],
  "extraLineItems" : [ {
    "id" : 10000,
    "creationDate" : "2023-10-19T13:27:53+0000",
    "sku" : {
      "id" : 10020,
      "creationDate" : "2023-10-19T13:27:49+0000",
      "organization" : {
        "id" : 10064,
        "creationDate" : "2023-10-19T13:27:47+0000",
        "key" : "3fbbe756-6907-4bed-aO",
        "description" : "Organization Rest Docs Desc",
        "city" : "São Paulo",
        "state" : "São Paulo",
        "preferedLocale" : {
          "id" : 10000,
          "key" : "I18NLocale_en",
          "language" : "en",
          "description" : "English",
          "dateFormat" : "MM/dd/yyyy",
          "timeFormat" : "hh:mm a",
          "currency" : "US$",
          "decimalSymbol" : ".",
          "digitalGrouping" : ","
        },
        "timeZone" : {
          "id" : 10096,
          "description" : "GMT+0",
          "rawOffsetMinutes" : 0,
          "timezoneName" : "GMT+0"
        },
        "listenerOrganizations" : [ ],
        "unitSystem" : "METRIC"
      },
      "key" : "3fbbe756-6907-4bed-aS1SKU",
      "description" : "Sample SKU",
      "enabled" : true,
      "brand" : "Docik",
      "skuSizeConversions" : [ ],
      "udfs" : [ ],
      "skuMeasurementUnits" : [ ],
      "alternativeKey" : "3fbbe756-6907-4bed-aS1SKU3fbbe756-6907-4bed-aO"
    },
    "plannedSize1" : 10.0,
    "availableSize1" : 10.0
  } ],
  "baseLineArrival" : "2023-10-19T13:27:52+0000",
  "baseLineDeparture" : "2023-10-19T13:27:52+0000",
  "plannedArrival" : "2023-10-19T13:27:52+0000",
  "plannedDeparture" : "2023-10-19T13:27:52+0000",
  "projectedArrival" : "2023-10-19T13:27:52+0000",
  "projectedDeparture" : "2023-10-19T13:27:52+0000",
  "baseLineDistance" : 120.5,
  "plannedDistance" : 120.5,
  "projectedDistance" : 120.5,
  "baseLineComplete" : "2023-10-19T13:27:52+0000",
  "plannedComplete" : "2023-10-19T13:27:52+0000",
  "projectedComplete" : "2023-10-19T13:27:52+0000",
  "baseLineCost" : 0,
  "plannedCost" : 0,
  "baseLineStart" : "2023-10-19T13:27:52+0000",
  "plannedStart" : "2023-10-19T13:27:52+0000",
  "projectedStart" : "2023-10-19T13:27:52+0000",
  "hasHelper" : false,
  "principalEquipment" : "3fbbe756-6907-4bed-aE",
  "driversName" : "[3fbbe756-6907-4bed-aD] 3fbbe756-6907-4bed-aD",
  "driverAssignments" : [ {
    "id" : 10000,
    "creationDate" : "2023-10-19T13:27:53+0000",
    "driver" : {
      "id" : 10080,
      "login" : "3fbbe756-6907-4bed-aD",
      "preferedLocale" : {
        "id" : 10000
      },
      "organization" : {
        "id" : 10064,
        "key" : "3fbbe756-6907-4bed-aO"
      },
      "key" : "3fbbe756-6907-4bed-aD",
      "name" : "3fbbe756-6907-4bed-aD",
      "externalUser" : false,
      "firstName" : "3fbbe756-6907-4bed-aD",
      "lastName" : ""
    }
  } ],
  "equipmentAssignments" : [ {
    "id" : 10000,
    "creationDate" : "2023-10-19T13:27:53+0000",
    "equipment" : {
      "id" : 10020,
      "creationDate" : "2023-10-19T13:27:49+0000",
      "lastModificationDate" : "2023-10-19T13:27:52+0000",
      "organization" : {
        "id" : 10064,
        "creationDate" : "2023-10-19T13:27:47+0000",
        "key" : "3fbbe756-6907-4bed-aO",
        "description" : "Organization Rest Docs Desc",
        "city" : "São Paulo",
        "state" : "São Paulo",
        "preferedLocale" : {
          "id" : 10000,
          "key" : "I18NLocale_en",
          "language" : "en",
          "description" : "English",
          "dateFormat" : "MM/dd/yyyy",
          "timeFormat" : "hh:mm a",
          "currency" : "US$",
          "decimalSymbol" : ".",
          "digitalGrouping" : ","
        },
        "timeZone" : {
          "id" : 10096,
          "description" : "GMT+0",
          "rawOffsetMinutes" : 0,
          "timezoneName" : "GMT+0"
        },
        "listenerOrganizations" : [ ],
        "unitSystem" : "METRIC"
      },
      "key" : "3fbbe756-6907-4bed-aE",
      "equipmentType" : {
        "id" : 10020,
        "organization" : {
          "id" : 10064,
          "creationDate" : "2023-10-19T13:27:47+0000",
          "key" : "3fbbe756-6907-4bed-aO",
          "description" : "Organization Rest Docs Desc",
          "city" : "São Paulo",
          "state" : "São Paulo",
          "preferedLocale" : {
            "id" : 10000,
            "key" : "I18NLocale_en",
            "language" : "en",
            "description" : "English",
            "dateFormat" : "MM/dd/yyyy",
            "timeFormat" : "hh:mm a",
            "currency" : "US$",
            "decimalSymbol" : ".",
            "digitalGrouping" : ","
          },
          "timeZone" : {
            "id" : 10096,
            "description" : "GMT+0",
            "rawOffsetMinutes" : 0,
            "timezoneName" : "GMT+0"
          },
          "listenerOrganizations" : [ ],
          "unitSystem" : "METRIC"
        },
        "key" : "3fbbe756-6907-4bed-aEET"
      },
      "udfs" : [ ],
      "description" : "Sample Equipment",
      "enabled" : true,
      "tags" : [ ]
    },
    "principal" : true
  } ],
  "tagAssignments" : [ {
    "id" : 10000,
    "creationDate" : "2023-10-19T13:27:52+0000",
    "tag" : {
      "id" : 10000,
      "organization" : {
        "id" : 10064,
        "key" : "3fbbe756-6907-4bed-aO",
        "description" : "Organization Rest Docs Desc",
        "city" : "São Paulo",
        "state" : "São Paulo",
        "preferedLocale" : {
          "id" : 10000
        },
        "timeZone" : {
          "id" : 10096
        },
        "unitSystem" : "METRIC"
      },
      "description" : "3fbbe756-6907-4bed-a",
      "enabled" : true,
      "tagType" : "ROUTE"
    }
  } ],
  "locationPendingPayments" : [ {
    "id" : 10000,
    "creationDate" : "2023-10-19T13:27:53+0000",
    "location" : {
      "id" : 10032,
      "creationDate" : "2023-10-19T13:27:49+0000",
      "organization" : {
        "id" : 10064,
        "creationDate" : "2023-10-19T13:27:47+0000",
        "key" : "3fbbe756-6907-4bed-aO",
        "description" : "Organization Rest Docs Desc",
        "city" : "São Paulo",
        "state" : "São Paulo",
        "preferedLocale" : {
          "id" : 10000,
          "key" : "I18NLocale_en",
          "language" : "en",
          "description" : "English",
          "dateFormat" : "MM/dd/yyyy",
          "timeFormat" : "hh:mm a",
          "currency" : "US$",
          "decimalSymbol" : ".",
          "digitalGrouping" : ","
        },
        "timeZone" : {
          "id" : 10096,
          "description" : "GMT+0",
          "rawOffsetMinutes" : 0,
          "timezoneName" : "GMT+0"
        },
        "listenerOrganizations" : [ ],
        "unitSystem" : "METRIC"
      },
      "key" : "3fbbe756-6907-4bed-aS1Loc1",
      "locationType" : {
        "id" : 10046,
        "creationDate" : "2023-10-19T13:27:49+0000",
        "organization" : {
          "id" : 10064,
          "creationDate" : "2023-10-19T13:27:47+0000",
          "key" : "3fbbe756-6907-4bed-aO",
          "description" : "Organization Rest Docs Desc",
          "city" : "São Paulo",
          "state" : "São Paulo",
          "preferedLocale" : {
            "id" : 10000,
            "key" : "I18NLocale_en",
            "language" : "en",
            "description" : "English",
            "dateFormat" : "MM/dd/yyyy",
            "timeFormat" : "hh:mm a",
            "currency" : "US$",
            "decimalSymbol" : ".",
            "digitalGrouping" : ","
          },
          "timeZone" : {
            "id" : 10096,
            "description" : "GMT+0",
            "rawOffsetMinutes" : 0,
            "timezoneName" : "GMT+0"
          },
          "listenerOrganizations" : [ ],
          "unitSystem" : "METRIC"
        },
        "key" : "3fbbe756-6907-4bed-aLT",
        "description" : "Sample LocationType",
        "showOnMobileCreate" : true,
        "enabled" : true,
        "alternativeKey" : "3fbbe756-6907-4bed-aLT3fbbe756-6907-4bed-aO"
      },
      "locationOverrideTimeWindows" : [ ],
      "udfs" : [ ],
      "description" : "Location - Description Sample",
      "state" : "Ceará",
      "country" : "BR",
      "longitude" : -38.46933,
      "latitude" : -3.734536,
      "phone1" : "+55 (85) 9 9988-7766",
      "phone1Type" : "3",
      "email" : "example.greenmile@gogreen.com",
      "deliveryInstructions" : "Sample Delivery Instructions.",
      "deliveryRadius" : 20,
      "deliveryDays" : "0",
      "consignees" : [ ],
      "allowedUsers" : [ ],
      "enabled" : true,
      "hasGeofence" : false,
      "creditLimit" : 1000,
      "legalName" : "Location's Legal Name",
      "locationPaymentMethods" : [ ],
      "alternativeKey" : "3fbbe756-6907-4bed-aS1Loc13fbbe756-6907-4bed-aLT3fbbe756-6907-4bed-aO3fbbe756-6907-4bed-aO"
    },
    "amount" : 200,
    "amountPayed" : 50,
    "saleDate" : "2023-10-19T13:27:51+0000",
    "dueDate" : "2023-10-19T13:27:51+0000",
    "documentKey" : "PENDINGPAYMENT01",
    "paymentDocument" : "DOC PAYMENT 001"
  } ],
  "additionalMaterials" : [ {
    "id" : 10000,
    "sku" : {
      "id" : 10023,
      "creationDate" : "2023-10-19T13:27:52+0000",
      "organization" : {
        "id" : 10064,
        "key" : "3fbbe756-6907-4bed-aO"
      },
      "key" : "3fbbe756-6907-4bed-aSKU",
      "description" : "Pallet",
      "enabled" : true,
      "alternativeKey" : "3fbbe756-6907-4bed-aSKU3fbbe756-6907-4bed-aO"
    },
    "quantity" : 5
  } ],
  "consignedSkus" : [ {
    "id" : 10000,
    "location" : {
      "id" : 10032,
      "creationDate" : "2023-10-19T13:27:49+0000",
      "organization" : {
        "id" : 10064,
        "creationDate" : "2023-10-19T13:27:47+0000",
        "key" : "3fbbe756-6907-4bed-aO",
        "description" : "Organization Rest Docs Desc",
        "city" : "São Paulo",
        "state" : "São Paulo",
        "preferedLocale" : {
          "id" : 10000,
          "key" : "I18NLocale_en",
          "language" : "en",
          "description" : "English",
          "dateFormat" : "MM/dd/yyyy",
          "timeFormat" : "hh:mm a",
          "currency" : "US$",
          "decimalSymbol" : ".",
          "digitalGrouping" : ","
        },
        "timeZone" : {
          "id" : 10096,
          "description" : "GMT+0",
          "rawOffsetMinutes" : 0,
          "timezoneName" : "GMT+0"
        },
        "listenerOrganizations" : [ ],
        "unitSystem" : "METRIC"
      },
      "key" : "3fbbe756-6907-4bed-aS1Loc1",
      "locationType" : {
        "id" : 10046,
        "creationDate" : "2023-10-19T13:27:49+0000",
        "organization" : {
          "id" : 10064,
          "creationDate" : "2023-10-19T13:27:47+0000",
          "key" : "3fbbe756-6907-4bed-aO",
          "description" : "Organization Rest Docs Desc",
          "city" : "São Paulo",
          "state" : "São Paulo",
          "preferedLocale" : {
            "id" : 10000,
            "key" : "I18NLocale_en",
            "language" : "en",
            "description" : "English",
            "dateFormat" : "MM/dd/yyyy",
            "timeFormat" : "hh:mm a",
            "currency" : "US$",
            "decimalSymbol" : ".",
            "digitalGrouping" : ","
          },
          "timeZone" : {
            "id" : 10096,
            "description" : "GMT+0",
            "rawOffsetMinutes" : 0,
            "timezoneName" : "GMT+0"
          },
          "listenerOrganizations" : [ ],
          "unitSystem" : "METRIC"
        },
        "key" : "3fbbe756-6907-4bed-aLT",
        "description" : "Sample LocationType",
        "showOnMobileCreate" : true,
        "enabled" : true,
        "alternativeKey" : "3fbbe756-6907-4bed-aLT3fbbe756-6907-4bed-aO"
      },
      "locationOverrideTimeWindows" : [ ],
      "udfs" : [ ],
      "description" : "Location - Description Sample",
      "state" : "Ceará",
      "country" : "BR",
      "longitude" : -38.46933,
      "latitude" : -3.734536,
      "phone1" : "+55 (85) 9 9988-7766",
      "phone1Type" : "3",
      "email" : "example.greenmile@gogreen.com",
      "deliveryInstructions" : "Sample Delivery Instructions.",
      "deliveryRadius" : 20,
      "deliveryDays" : "0",
      "consignees" : [ ],
      "allowedUsers" : [ ],
      "enabled" : true,
      "hasGeofence" : false,
      "creditLimit" : 1000,
      "legalName" : "Location's Legal Name",
      "locationPaymentMethods" : [ ],
      "alternativeKey" : "3fbbe756-6907-4bed-aS1Loc13fbbe756-6907-4bed-aLT3fbbe756-6907-4bed-aO3fbbe756-6907-4bed-aO"
    },
    "sku" : {
      "id" : 10020,
      "creationDate" : "2023-10-19T13:27:49+0000",
      "organization" : {
        "id" : 10064,
        "creationDate" : "2023-10-19T13:27:47+0000",
        "key" : "3fbbe756-6907-4bed-aO",
        "description" : "Organization Rest Docs Desc",
        "city" : "São Paulo",
        "state" : "São Paulo",
        "preferedLocale" : {
          "id" : 10000,
          "key" : "I18NLocale_en",
          "language" : "en",
          "description" : "English",
          "dateFormat" : "MM/dd/yyyy",
          "timeFormat" : "hh:mm a",
          "currency" : "US$",
          "decimalSymbol" : ".",
          "digitalGrouping" : ","
        },
        "timeZone" : {
          "id" : 10096,
          "description" : "GMT+0",
          "rawOffsetMinutes" : 0,
          "timezoneName" : "GMT+0"
        },
        "listenerOrganizations" : [ ],
        "unitSystem" : "METRIC"
      },
      "key" : "3fbbe756-6907-4bed-aS1SKU",
      "description" : "Sample SKU",
      "enabled" : true,
      "brand" : "Docik",
      "skuSizeConversions" : [ ],
      "udfs" : [ ],
      "skuMeasurementUnits" : [ ],
      "alternativeKey" : "3fbbe756-6907-4bed-aS1SKU3fbbe756-6907-4bed-aO"
    },
    "dateConsigned" : "2023-10-19T13:27:51+0000",
    "amount" : 10,
    "amountReceived" : 1,
    "newRouteConsignedSku" : true,
    "consigned" : false
  } ],
  "holderMaterials" : [ {
    "id" : 10000,
    "sku" : {
      "id" : 10020,
      "creationDate" : "2023-10-19T13:27:49+0000",
      "organization" : {
        "id" : 10064,
        "creationDate" : "2023-10-19T13:27:47+0000",
        "key" : "3fbbe756-6907-4bed-aO",
        "description" : "Organization Rest Docs Desc",
        "city" : "São Paulo",
        "state" : "São Paulo",
        "preferedLocale" : {
          "id" : 10000,
          "key" : "I18NLocale_en",
          "language" : "en",
          "description" : "English",
          "dateFormat" : "MM/dd/yyyy",
          "timeFormat" : "hh:mm a",
          "currency" : "US$",
          "decimalSymbol" : ".",
          "digitalGrouping" : ","
        },
        "timeZone" : {
          "id" : 10096,
          "description" : "GMT+0",
          "rawOffsetMinutes" : 0,
          "timezoneName" : "GMT+0"
        },
        "listenerOrganizations" : [ ],
        "unitSystem" : "METRIC"
      },
      "key" : "3fbbe756-6907-4bed-aS1SKU",
      "description" : "Sample SKU",
      "enabled" : true,
      "brand" : "Docik",
      "skuSizeConversions" : [ ],
      "udfs" : [ ],
      "skuMeasurementUnits" : [ ],
      "alternativeKey" : "3fbbe756-6907-4bed-aS1SKU3fbbe756-6907-4bed-aO"
    },
    "transport" : {
      "id" : 10000,
      "creationDate" : "2023-10-19T13:27:52+0000",
      "organization" : {
        "id" : 10064,
        "key" : "3fbbe756-6907-4bed-aO"
      },
      "key" : "3fbbe756-6907-4bed-aTH",
      "date" : "2023-10-19",
      "status" : "PENDING",
      "alternativeKey" : "3fbbe756-6907-4bed-aTH3fbbe756-6907-4bed-aO"
    },
    "size1Quantity" : 1.0
  } ],
  "manifests" : [ {
    "id" : 10000,
    "sku" : {
      "id" : 10023,
      "creationDate" : "2023-10-19T13:27:52+0000",
      "organization" : {
        "id" : 10064,
        "key" : "3fbbe756-6907-4bed-aO"
      },
      "key" : "3fbbe756-6907-4bed-aSKU",
      "description" : "Pallet",
      "enabled" : true,
      "alternativeKey" : "3fbbe756-6907-4bed-aSKU3fbbe756-6907-4bed-aO"
    },
    "transport" : {
      "id" : 10000,
      "creationDate" : "2023-10-19T13:27:52+0000",
      "organization" : {
        "id" : 10064,
        "key" : "3fbbe756-6907-4bed-aO"
      },
      "key" : "3fbbe756-6907-4bed-aTH",
      "date" : "2023-10-19",
      "status" : "PENDING",
      "alternativeKey" : "3fbbe756-6907-4bed-aTH3fbbe756-6907-4bed-aO"
    },
    "size1" : 10.0
  } ],
  "totalStops" : 3,
  "canceledStops" : 0,
  "undeliveredStops" : 0,
  "redeliveredStops" : 0,
  "actualDepartures" : 0,
  "status" : "NOT_STARTED",
  "plannedTravelTimeMinutes" : 0,
  "baselineTravelTimeMinutes" : 0,
  "plannedServiceTime" : 0,
  "baselineServiceTime" : 0,
  "hasPicture" : false,
  "plannedSize1" : 53.0,
  "plannedSize2" : 10.0,
  "plannedSize3" : 7.0,
  "plannedPickupSize1" : 0.0,
  "plannedPickupSize2" : 0.0,
  "plannedPickupSize3" : 0.0,
  "hasGps" : false,
  "helperAssignments" : [ {
    "id" : 10000,
    "creationDate" : "2023-10-19T13:27:53+0000",
    "helper" : {
      "id" : 10081,
      "login" : "3fbbe756-6907-4bed-aDH",
      "preferedLocale" : {
        "id" : 10000
      },
      "organization" : {
        "id" : 10064,
        "key" : "3fbbe756-6907-4bed-aO"
      },
      "key" : "3fbbe756-6907-4bed-aDH",
      "name" : "3fbbe756-6907-4bed-aDH",
      "externalUser" : false,
      "firstName" : "3fbbe756-6907-4bed-aDH",
      "lastName" : ""
    }
  } ],
  "size1AliasConfig" : {
    "id" : 10000,
    "key" : "Weight",
    "description" : "Weight",
    "icon" : "gmfont-sizes-icon-size1",
    "preferredSize" : "1"
  },
  "size2AliasConfig" : {
    "id" : 10001,
    "key" : "Volume",
    "description" : "Volume",
    "icon" : "gmfont-sizes-icon-size2",
    "preferredSize" : "1"
  },
  "size3AliasConfig" : {
    "id" : 10002,
    "key" : "Value",
    "description" : "Value",
    "icon" : "gmfont-sizes-icon-size3",
    "preferredSize" : "1"
  },
  "onRoute" : false
}

If a dependency, like Location, already exists on the database and you just want to specify it, you should only fill it with its natural ids. In this case: (LocationType, Key).

ImportSkuMeasureUnitList

Create/Update SkuMeasureUnit List

Sending a post to /Integration/ImportSkuMeasureUnitList with the body bellow will create (if entity does not exist) or update (if entity already exists) the entities in the list of SkuMeasurementUnit.

Create new instances
JSON Example
POST /Integration/ImportSkuMeasureUnitList HTTP/1.1
Content-Type: application/json
Host: 10.76.25.108:8080
Content-Length: 2358

[ {
  "organization" : {
    "id" : 10340
  },
  "sku" : {
    "id" : 10182,
    "organization" : {
      "id" : 10340
    },
    "key" : "1cd3f4c3-5385-485a-9",
    "description" : "Sample SKU - Juice",
    "enabled" : true,
    "brand" : "Amazing",
    "skuType" : {
      "id" : 10060,
      "organization" : {
        "id" : 10340
      },
      "key" : "1cd3f4c3-5385-485a-9",
      "description" : "SkuType Description"
    },
    "baseUnit" : {
      "id" : 10080,
      "key" : "1cd3f4c3-5385-485a-9Bottle",
      "description" : "Sample SizeAlias",
      "icon" : "ICON",
      "preferredSize" : "1",
      "sizeDecimalPlaces" : 2
    },
    "secondaryUnit" : {
      "id" : 10081,
      "key" : "1cd3f4c3-5385-485a-9Box",
      "description" : "Sample SizeAlias",
      "icon" : "ICON",
      "preferredSize" : "1",
      "sizeDecimalPlaces" : 2
    },
    "tertiaryUnit" : {
      "id" : 10082,
      "key" : "1cd3f4c3-5385-485a-9Container",
      "description" : "Sample SizeAlias",
      "icon" : "ICON",
      "preferredSize" : "1",
      "sizeDecimalPlaces" : 2
    },
    "secondaryQty" : 4.0,
    "tertiaryQty" : 4.0,
    "secondaryCompound" : {
      "id" : 10180,
      "organization" : {
        "id" : 10340
      },
      "key" : "1cd3f4c3-5385-485a-9SkuSecondary",
      "description" : "Sample SKU",
      "enabled" : true,
      "brand" : "Docik",
      "alternativeKey" : "1cd3f4c3-5385-485a-9SkuSecondarynull"
    },
    "tertiaryCompound" : {
      "id" : 10181,
      "organization" : {
        "id" : 10340
      },
      "key" : "1cd3f4c3-5385-485a-9SkuTertiary",
      "description" : "Sample SKU",
      "enabled" : true,
      "brand" : "Docik",
      "alternativeKey" : "1cd3f4c3-5385-485a-9SkuTertiarynull"
    },
    "secondaryCompoundQty" : 1.0,
    "tertiaryCompoundQty" : 1.0,
    "alternativeKey" : "1cd3f4c3-5385-485a-9null"
  },
  "baseUnit" : {
    "id" : 10080,
    "key" : "1cd3f4c3-5385-485a-9Bottle",
    "description" : "Sample SizeAlias",
    "icon" : "ICON",
    "preferredSize" : "1",
    "sizeDecimalPlaces" : 2
  },
  "secondaryUnit" : {
    "id" : 10081,
    "key" : "1cd3f4c3-5385-485a-9Box",
    "description" : "Sample SizeAlias",
    "icon" : "ICON",
    "preferredSize" : "1",
    "sizeDecimalPlaces" : 2
  },
  "secondaryQty" : 30,
  "secondaryCompoundQty" : 1,
  "defaultSecondaryUnit" : true
} ]
Server Response
HTTP/1.1 200 OK
Content-Encoding: gzip
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Connection: keep-alive
X-Content-Type-Options: nosniff
Transfer-Encoding: chunked
Server-Version: 6.42-feature-925751-433219
Content-Type: application/json
Content-Length: 581

[ {
  "id" : 10000,
  "organization" : {
    "id" : 10340,
    "key" : "1cd3f4c3-5385-485a-9_O"
  },
  "sku" : {
    "id" : 10182,
    "organization" : {
      "id" : 10340,
      "key" : "1cd3f4c3-5385-485a-9_O"
    },
    "key" : "1cd3f4c3-5385-485a-9",
    "alternativeKey" : "1cd3f4c3-5385-485a-91cd3f4c3-5385-485a-9_O"
  },
  "baseUnit" : {
    "id" : 10080,
    "key" : "1cd3f4c3-5385-485a-9Bottle"
  },
  "secondaryUnit" : {
    "id" : 10081,
    "key" : "1cd3f4c3-5385-485a-9Box"
  },
  "secondaryQty" : 30,
  "secondaryCompoundQty" : 1,
  "defaultSecondaryUnit" : true
} ]

A list of entities is returned. The id is not provided in the request, but it is returned in each entity by the create operation

Update instances

A list of entities WITH id is provided.
The server will find by Id the entities and update the values. Here a list of the entities with the new values is returned.

JSON Example

Entity with the id shown in the request below was previously created with secondaryQty = 30.
Now sending an update with secondaryQty = 40.

POST /Integration/ImportSkuMeasureUnitList HTTP/1.1
Content-Type: application/json
Host: 10.76.25.108:8080
Content-Length: 2374

[ {
  "id" : 10001,
  "organization" : {
    "id" : 10341
  },
  "sku" : {
    "id" : 10185,
    "organization" : {
      "id" : 10341
    },
    "key" : "1c654267-288a-4437-8",
    "description" : "Sample SKU - Juice",
    "enabled" : true,
    "brand" : "Amazing",
    "skuType" : {
      "id" : 10061,
      "organization" : {
        "id" : 10341
      },
      "key" : "1c654267-288a-4437-8",
      "description" : "SkuType Description"
    },
    "baseUnit" : {
      "id" : 10083,
      "key" : "1c654267-288a-4437-8Bottle",
      "description" : "Sample SizeAlias",
      "icon" : "ICON",
      "preferredSize" : "1",
      "sizeDecimalPlaces" : 2
    },
    "secondaryUnit" : {
      "id" : 10084,
      "key" : "1c654267-288a-4437-8Box",
      "description" : "Sample SizeAlias",
      "icon" : "ICON",
      "preferredSize" : "1",
      "sizeDecimalPlaces" : 2
    },
    "tertiaryUnit" : {
      "id" : 10085,
      "key" : "1c654267-288a-4437-8Container",
      "description" : "Sample SizeAlias",
      "icon" : "ICON",
      "preferredSize" : "1",
      "sizeDecimalPlaces" : 2
    },
    "secondaryQty" : 4.0,
    "tertiaryQty" : 4.0,
    "secondaryCompound" : {
      "id" : 10183,
      "organization" : {
        "id" : 10341
      },
      "key" : "1c654267-288a-4437-8SkuSecondary",
      "description" : "Sample SKU",
      "enabled" : true,
      "brand" : "Docik",
      "alternativeKey" : "1c654267-288a-4437-8SkuSecondarynull"
    },
    "tertiaryCompound" : {
      "id" : 10184,
      "organization" : {
        "id" : 10341
      },
      "key" : "1c654267-288a-4437-8SkuTertiary",
      "description" : "Sample SKU",
      "enabled" : true,
      "brand" : "Docik",
      "alternativeKey" : "1c654267-288a-4437-8SkuTertiarynull"
    },
    "secondaryCompoundQty" : 1.0,
    "tertiaryCompoundQty" : 1.0,
    "alternativeKey" : "1c654267-288a-4437-8null"
  },
  "baseUnit" : {
    "id" : 10083,
    "key" : "1c654267-288a-4437-8Bottle",
    "description" : "Sample SizeAlias",
    "icon" : "ICON",
    "preferredSize" : "1",
    "sizeDecimalPlaces" : 2
  },
  "secondaryUnit" : {
    "id" : 10084,
    "key" : "1c654267-288a-4437-8Box",
    "description" : "Sample SizeAlias",
    "icon" : "ICON",
    "preferredSize" : "1",
    "sizeDecimalPlaces" : 2
  },
  "secondaryQty" : 40,
  "secondaryCompoundQty" : 1,
  "defaultSecondaryUnit" : true
} ]
Server Response
HTTP/1.1 200 OK
Content-Encoding: gzip
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Connection: keep-alive
X-Content-Type-Options: nosniff
Transfer-Encoding: chunked
Server-Version: 6.42-feature-925751-433219
Content-Type: application/json
Content-Length: 5522

[ {
  "id" : 10001,
  "organization" : {
    "id" : 10341,
    "key" : "1c654267-288a-4437-8_O"
  },
  "sku" : {
    "id" : 10185,
    "creationDate" : "2023-10-19T13:31:22+0000",
    "organization" : {
      "id" : 10341,
      "creationDate" : "2023-10-19T13:31:20+0000",
      "key" : "1c654267-288a-4437-8_O",
      "description" : "Organization Rest Docs Desc",
      "city" : "São Paulo",
      "state" : "São Paulo",
      "preferedLocale" : {
        "id" : 10000,
        "key" : "I18NLocale_en",
        "language" : "en",
        "description" : "English",
        "dateFormat" : "MM/dd/yyyy",
        "timeFormat" : "hh:mm a",
        "currency" : "US$",
        "decimalSymbol" : ".",
        "digitalGrouping" : ","
      },
      "timeZone" : {
        "id" : 10096,
        "description" : "GMT+0",
        "rawOffsetMinutes" : 0,
        "timezoneName" : "GMT+0"
      },
      "listenerOrganizations" : [ ],
      "unitSystem" : "METRIC"
    },
    "key" : "1c654267-288a-4437-8",
    "description" : "Sample SKU - Juice",
    "enabled" : true,
    "brand" : "Amazing",
    "skuType" : {
      "id" : 10061,
      "creationDate" : "2023-10-19T13:31:21+0000",
      "organization" : {
        "id" : 10341,
        "creationDate" : "2023-10-19T13:31:20+0000",
        "key" : "1c654267-288a-4437-8_O",
        "description" : "Organization Rest Docs Desc",
        "city" : "São Paulo",
        "state" : "São Paulo",
        "preferedLocale" : {
          "id" : 10000,
          "key" : "I18NLocale_en",
          "language" : "en",
          "description" : "English",
          "dateFormat" : "MM/dd/yyyy",
          "timeFormat" : "hh:mm a",
          "currency" : "US$",
          "decimalSymbol" : ".",
          "digitalGrouping" : ","
        },
        "timeZone" : {
          "id" : 10096,
          "description" : "GMT+0",
          "rawOffsetMinutes" : 0,
          "timezoneName" : "GMT+0"
        },
        "listenerOrganizations" : [ ],
        "unitSystem" : "METRIC"
      },
      "key" : "1c654267-288a-4437-8",
      "description" : "SkuType Description"
    },
    "baseUnit" : {
      "id" : 10083,
      "key" : "1c654267-288a-4437-8Bottle",
      "description" : "Sample SizeAlias",
      "icon" : "ICON",
      "preferredSize" : "1",
      "sizeDecimalPlaces" : 2
    },
    "secondaryUnit" : {
      "id" : 10084,
      "key" : "1c654267-288a-4437-8Box",
      "description" : "Sample SizeAlias",
      "icon" : "ICON",
      "preferredSize" : "1",
      "sizeDecimalPlaces" : 2
    },
    "tertiaryUnit" : {
      "id" : 10085,
      "key" : "1c654267-288a-4437-8Container",
      "description" : "Sample SizeAlias",
      "icon" : "ICON",
      "preferredSize" : "1",
      "sizeDecimalPlaces" : 2
    },
    "secondaryQty" : 4.0,
    "tertiaryQty" : 4.0,
    "secondaryCompound" : {
      "id" : 10183,
      "creationDate" : "2023-10-19T13:31:21+0000",
      "organization" : {
        "id" : 10341,
        "creationDate" : "2023-10-19T13:31:20+0000",
        "key" : "1c654267-288a-4437-8_O",
        "description" : "Organization Rest Docs Desc",
        "city" : "São Paulo",
        "state" : "São Paulo",
        "preferedLocale" : {
          "id" : 10000,
          "key" : "I18NLocale_en",
          "language" : "en",
          "description" : "English",
          "dateFormat" : "MM/dd/yyyy",
          "timeFormat" : "hh:mm a",
          "currency" : "US$",
          "decimalSymbol" : ".",
          "digitalGrouping" : ","
        },
        "timeZone" : {
          "id" : 10096,
          "description" : "GMT+0",
          "rawOffsetMinutes" : 0,
          "timezoneName" : "GMT+0"
        },
        "listenerOrganizations" : [ ],
        "unitSystem" : "METRIC"
      },
      "key" : "1c654267-288a-4437-8SkuSecondary",
      "description" : "Sample SKU",
      "enabled" : true,
      "brand" : "Docik",
      "alternativeKey" : "1c654267-288a-4437-8SkuSecondary1c654267-288a-4437-8_O"
    },
    "tertiaryCompound" : {
      "id" : 10184,
      "creationDate" : "2023-10-19T13:31:21+0000",
      "organization" : {
        "id" : 10341,
        "creationDate" : "2023-10-19T13:31:20+0000",
        "key" : "1c654267-288a-4437-8_O",
        "description" : "Organization Rest Docs Desc",
        "city" : "São Paulo",
        "state" : "São Paulo",
        "preferedLocale" : {
          "id" : 10000,
          "key" : "I18NLocale_en",
          "language" : "en",
          "description" : "English",
          "dateFormat" : "MM/dd/yyyy",
          "timeFormat" : "hh:mm a",
          "currency" : "US$",
          "decimalSymbol" : ".",
          "digitalGrouping" : ","
        },
        "timeZone" : {
          "id" : 10096,
          "description" : "GMT+0",
          "rawOffsetMinutes" : 0,
          "timezoneName" : "GMT+0"
        },
        "listenerOrganizations" : [ ],
        "unitSystem" : "METRIC"
      },
      "key" : "1c654267-288a-4437-8SkuTertiary",
      "description" : "Sample SKU",
      "enabled" : true,
      "brand" : "Docik",
      "alternativeKey" : "1c654267-288a-4437-8SkuTertiary1c654267-288a-4437-8_O"
    },
    "secondaryCompoundQty" : 1.0,
    "tertiaryCompoundQty" : 1.0,
    "alternativeKey" : "1c654267-288a-4437-81c654267-288a-4437-8_O"
  },
  "baseUnit" : {
    "id" : 10083,
    "key" : "1c654267-288a-4437-8Bottle"
  },
  "secondaryUnit" : {
    "id" : 10084,
    "key" : "1c654267-288a-4437-8Box"
  },
  "secondaryQty" : 40,
  "secondaryCompoundQty" : 1,
  "defaultSecondaryUnit" : true
} ]

Sample API Integration Cases

Objective

This section lists sample integration cases that should be used by third party applications in order to provide specific services.

List of sample integrations

Consume Survey Answer Example

Equipment Assignment Automation Process

Tracking My Order Example

Consume Survey Answer Example

Specification

URL
 /SurveyApplied/restrictions?criteria={"filters":["*","route.*","surveyApplyRule.*","surveyApplyRule.survey.id","stop.*","surveyAnswers.*","surveyAnswers.question.*","surveyAnswers.parentSurveyAnswer","surveyAnswers.survey.id"]}

Method: POST

Body is using Monet Criteria

Summary

The purpose of this document is to explain how you can retrieve answers from a Survey in GreenMile.

To consume all [SurveyAnswers], GreenMile has a mechanism (Monet Criteria) that you can use to filter and specify which columns will be retrieved. This is a great tool to search for anything in the system. As a reference, you can take a look in the list of documented GreenMile Entities.

In the URL, you basically need to say which fields you want to retrieve (that we call "projections"):

For example:
 /SurveyApplied/restrictions?criteria={"filters":["*","route.key","surveyAnswers.*","surveyAnswers.question.question"]}

In this case, you are retrieving a [SurveyApplied] (that is basically the entity that holds all Survey answers) with all fields (*), plus route.key (see Route entity), [SurveyAnswer] and [SurveyQuestion].

If you use only a projection you will retrieve all information from the database, that is not a typical use case. Probably you will want to filter a specific range of dates or specific routes. In this case, in the request body, you can specify filters.

In the example below, you are filtering Surveys answered for a specific Route, Organization and date interval.

{
  "criteriaChain": [
    {
      "and": [
        {
          "attr": "route.organization.key",
          "eq": "ORGANIZATION_TEST"
        },
        {
          "attr":"route.key",
          "eq":"2123"
        },
        {
          "attr":"when",
          "lte":"2016-12-01T00:00:00+0000"
        },
        {
          "attr":"when",
          "gte":"2016-01-01T00:00:00+0000"
        }
      ]
    }
  ]
}

As a result, you will receive a list of [SurveyApplied]:

[
    {
        "id": 12546,
        "creationDate": "2016-02-19T09:32:10+0000",
        "lastModificationDate": "2016-02-19T09:32:10+0000",
        "lastModifierAddress": "191.247.231.36",
        "when": "2016-02-19T09:30:40+0000",
        "route": {
            "id": 74772,
            "key": "2123"
        },
        "surveyAnswers": [
            {
                "id": 12606,
                "creationDate": "2016-02-19T09:32:10+0000",
                "lastModificationDate": "2016-02-19T09:32:10+0000",
                "lastModifierAddress": "191.247.231.36",
                "key": "1ed0b135-32a9-4d32-883d-3b732ce9a4d1",
                "question": {
                    "id": 10100,
                    "question": "Question."
                },
                "valueAnswered": "ok",
                "lastModifier": {
                    "id": 12045
                },
                "creator": {
                    "id": 12045
                }
            }
        ],
        "lastModifier": {
            "id": 12045
        },
        "creator": {
            "id": 12045
        }
    }
]

Useful and related entities:

Equipment Assignment Automation Process

Overview

Once the routes are created, they are exported to the Greenmile Live site using Greenmile Connector application.

Greenmile Live is integrated with the Geotab devices, which are attached to trucks in order to capture “Actual" versus "Planned” route execution.

In order to start capturing the actual path, each Route on Greenmile Live needs to be assigned to the correct Truck containing the Geotab units.

The problem described here consists of assigning a truck (with a valid Geotab unit) to a Greenmile Route.

Objective

The desired solution is to implement an automated process that reads that database and sends equipment assignment information to Greenmile Live.

The scope of this document is to expose the list of Webservice methods available on Greenmile Live API that should be used by this automated process, in order to assign the trucks to routes on Greenmile Live.

Equipment Assignment Process

The following diagram presents the sequence of method calls necessary to the Equipment Assignment Process.

url-sequence

After the list of routes are obtained from the SQL Database, the process will need to authenticate (method call 1) to the Greenmile Live API, in order to send/retrieve information.

Once authenticated, the subsequent requests are responsible for validating if the Route (call 2) and Equipment (call 3) were already created on Greenmile Live. These requests are also responsible for retrieving the internal id for each entity.

If the route and equipment exist, the method request to assign the equipment to the route (request 4) should be executed.

Retrieve Route

The retrieve route request is necessary to validate if the route exists on Greenmile Live and to get the internal route ID.

The HTTP method call is described below:

Service: /Route/filter

HTTP Method: POST

Header:

The Cookie needs to contain the JSESSIONID previously return from the authentication.

Also, the Content-Type needs to be set to application/json. A sample header segment presented below:

Cookie: JSESSIONID=6302B6DE5D5349F8278AAFBACDBE8DC9;
Content-Type: application/json;charset=UTF-8

Request Body:

The request body contains the JSON with the criteria to filter the current route that needs to be returned.

{
     "date":"2010-09-23",
     "organization":{
            "key":"Default"
      },
     "key":"A854"
}

The following parameters need to be used to filter the route.

date: In line 2 the route date is presented using the formatting "yyyy-MM-dd".

organization: From line 3 to 5, the organization information is presented. It contains the JSON for the organization containing the Organization Key (line 4). Usually, the Greenmile Organization Key corresponds to the Routenet Region ID.

key: Route Key (line 6) is the Same route ID used by Roadnet.

Returned Information

A JSON Array will be returned by the request. It contains a list of Route Entities resulting from the current filter. As the Route Key (ID, region information was used to filter, only one route should be returned. If the route was not found, an empty list will be returned.

Return Body:

[
  {
    "id":10011,
    "date":"2010-09-23",
    "key":"A854",
    "description":"Route description",
    "..." : "..."
  },
  {
    "..." : "..."
  }
]

id: this parameter is the internal Route unique identifier (line 3).

The additional data returned on the JSON should be ignored.

Retrieve Equipment

The Retrieve equipment request is also necessary to validate if the equipment exists and to get the internal equipment ID that will be used to assign the equipment to the route.

The method call is described below:

Service: /Equipment/filter

HTTP Method: POST

Header:

The Cookie needs to contain the JSESSIONID previously return from the authentication.

Also, the Content-Type needs to be set to application/json. A sample header segment presented below:

Cookie: JSESSIONID=6302B6DE5D5349F8278AAFBACDBE8DC9;
Content-Type: application/json;charset=UTF-8

Request Body:

The request body contains the JSON with the criteria to filter the current route that needs to be returned.

{
   "key":"453",
   "organization": {
       "key":"Default"
   }
}

The following parameters would be used:

key: In line 2 the route date is presented using the formatting "yyyy-MM-dd".

organization: From line 3 to 5, the organization information is presented. It contains the JSON for organization containing the Organization Key (line 4).

Returned Information

Return code: 200 (HTTP_OK)

Return Body:

A JSON Array will be returned by the request. It contains a list of Equipment entities resulting from the current filter. As the Equipment Key (key and organization) information was used to filter, only one equipment should be returned. If the route was not found, an empty list will be returned.

[
  {
   "id":10023,
   "key":"453",
   "description":"Equipment description",
   "enabled":true,
   "gpsUnitId":"1"
  }
]

id: this parameter is the internal Equipment unique identifier (line 3).

Assign Equipment

After the Route and Equipment are validated and the respective IDs are obtained, the Assign Equipment request should be executed. The specification is described below:

Service: /RouteEquipment

HTTP Method: POST

Request Body:

The request body contains the JSON with Route Assignment information. The code segment above shows a sample JSON with the information previously returned.

{
    "route": {"id":10011},
    "equipment": {"id":10023},
    "principal": true
}

id (route): The JSON segment on the second line ( "route": {"id":10011} ) represents the Route unique identifier returned on the "Retrieve Route" step.

id (equipment): The JSON segment on the third line ( "equipment": {"id":10023} ) represents the Equipment unique identifier returned on the "Retrieve Equipment" step.

principal: A route on Greenmile can have multiple equipments assigned to it. This parameter identifies the primary peace of equipment that will be used to collect the GPS positioning information. So in this case, this parameter should always be true.

Returned Information

Return code: 200 (HTTP_OK)

Return Body: EMPTY

No body is returned for this request.

Tracking My Order Example

Objective

given a valid stop id, returns a JSON object, with data to be consumed by Tracking my order.

Specification

URL
/Stop/TrackingMyOrder/115561

Method: GET

Returned Information

Return code: 200 (HTTP_OK)

Return Body:

A JSON will be returned by the request. It contains of information the stop, route, equipament and location.

[
  {
    "id": 1749870,
    "route": {
        "id": 130234,
        "key": "gmtest3",
        "totalStops": 35,
        "canceledStops": 0,
        "redeliveredStops": 0,
        "actualDepartures": 4,
        "hasPicture": false,
        "onRoute": false
    },
    "equipment": {
        "result": {
            "id": "61a0dde88ec48b0714b9fb73",
            "equipmentId": 11680,
            "equipmentKey": "coord",
            "equipmentTypeOrgId": 10200,
            "equipmentTypeKey": "DEF",
            "organizationId": 10180,
            "position": {
                "longitude": -38.4858813,
                "latitude": -3.7866511,
                "accuracy": 21.976
            },
            "speedKmh": 0.017442683,
            "date": "2021-11-26T13:17:21+0000",
            "savedDate": "2021-11-26T13:18:15+0000",
            "route": {
                "id": 130234,
                "key": "gmtest3",
                "driverAssignments": [
                    {
                        "id": 150061,
                        "driver": {
                            "id": 19196,
                            "key": "coord",
                            "name": "coord"
                        }
                    }
                ],
                "equipmentAssignments": [
                    {
                        "id": 99857,
                        "equipment": {
                            "id": 11680,
                            "key": "coord",
                            "organization": {
                                "id": 10180,
                                "description": "PFAE"
                            }
                        },
                        "principal": true
                    }
                ],
                "status": "DEPARTED_ORIGIN"
            },
            "latitude": -3.7866511,
            "longitude": -38.4858813
        },
        "setOrExpired": true
    },
    "stop": {
        "id": 1749870,
        "key": "4b94d8be-ff6c-43ec-9644-f3cd764a1e9f",
        "orders": [
            {
                "id": 2661321,
                "creationDate": "2021-10-18T17:04:11+0000",
                "lastModificationDate": "2021-10-18T17:08:39+0000",
                "key": "72891f14-cde4-4658-974e-414a67146326",
                "number": "0625798286",
                "updateTime": "2021-10-18T17:08:35+0000",
                "plannedSize1": 1.0,
                "plannedSize2": 0.0,
                "plannedSize3": 0.0,
                "actualSize1": 1.0,
                "actualSize2": 0.0,
                "actualSize3": 0.0,
                "plannedPickupSize1": 0.0,
                "plannedPickupSize2": 0.0,
                "plannedPickupSize3": 0.0,
                "actualPickupSize1": 0.0,
                "actualPickupSize2": 0.0,
                "actualPickupSize3": 0.0,
                "damagedSize1": 0.0,
                "damagedSize2": 0.0,
                "damagedSize3": 0.0,
                "hasPicture": false,
                "newOrder": false
            },
            {
                "id": 2661322,
                "creationDate": "2021-10-18T17:04:11+0000",
                "lastModificationDate": "2021-10-18T17:08:39+0000",
                "key": "9b878dd6-f401-42ef-ab3b-03585015d67f",
                "number": "0628993448",
                "updateTime": "2021-10-18T17:08:35+0000",
                "plannedSize1": 3.0,
                "plannedSize2": 0.0,
                "plannedSize3": 0.0,
                "actualSize1": 3.0,
                "actualSize2": 0.0,
                "actualSize3": 0.0,
                "plannedPickupSize1": 0.0,
                "plannedPickupSize2": 0.0,
                "plannedPickupSize3": 0.0,
                "actualPickupSize1": 0.0,
                "actualPickupSize2": 0.0,
                "actualPickupSize3": 0.0,
                "damagedSize1": 0.0,
                "damagedSize2": 0.0,
                "damagedSize3": 0.0,
                "hasPicture": false,
                "newOrder": false
            },
            {
                "id": 2661323,
                "creationDate": "2021-10-18T17:04:11+0000",
                "lastModificationDate": "2021-10-18T17:08:39+0000",
                "key": "c4de823d-225a-40d1-949b-6558e08bd9e9",
                "number": "3224202874",
                "updateTime": "2021-10-18T17:08:35+0000",
                "plannedSize1": 8.0,
                "plannedSize2": 0.0,
                "plannedSize3": 0.0,
                "actualSize1": 8.0,
                "actualSize2": 0.0,
                "actualSize3": 0.0,
                "plannedPickupSize1": 0.0,
                "plannedPickupSize2": 0.0,
                "plannedPickupSize3": 0.0,
                "actualPickupSize1": 0.0,
                "actualPickupSize2": 0.0,
                "actualPickupSize3": 0.0,
                "damagedSize1": 0.0,
                "damagedSize2": 0.0,
                "damagedSize3": 0.0,
                "hasPicture": false,
                "newOrder": false
            },
            {
                "id": 2661320,
                "creationDate": "2021-10-18T17:04:11+0000",
                "lastModificationDate": "2021-10-18T17:08:38+0000",
                "key": "48cb22e3-f761-43a9-89ae-fc36edc646b3",
                "number": "3224367900",
                "updateTime": "2021-10-18T17:08:35+0000",
                "plannedSize1": 55.0,
                "plannedSize2": 0.0,
                "plannedSize3": 0.0,
                "actualSize1": 55.0,
                "actualSize2": 0.0,
                "actualSize3": 0.0,
                "plannedPickupSize1": 0.0,
                "plannedPickupSize2": 0.0,
                "plannedPickupSize3": 0.0,
                "actualPickupSize1": 0.0,
                "actualPickupSize2": 0.0,
                "actualPickupSize3": 0.0,
                "damagedSize1": 0.0,
                "damagedSize2": 0.0,
                "damagedSize3": 0.0,
                "hasPicture": false,
                "newOrder": false
            }
        ],
        "location": {
            "id": 40408,
            "creationDate": "2019-07-24T00:42:36+0000",
            "lastModificationDate": "2021-05-18T08:50:28+0000",
            "key": "1105406515",
            "description": "MERCADITO LA VICTORIA",
            "addressLine1": "CHIRIQUÍ ALANJE DIVALA . PCAE",
            "country": "PA",
            "longitude": -82.7145845,
            "geocodingQuality": "MANUAL",
            "latitude": 8.4111811,
            "deliveryRadius": 100,
            "deliveryDays": "S,M,W,R,S",
            "geocodingDate": "2021-03-10T20:43:04+0000",
            "geocodingLastCheck": "2021-03-10T20:43:04+0000",
            "enabled": true,
            "hasGeofence": false,
            "alternativeKey": "1105406515"
        },
        "baseLineSequenceNum": 1,
        "plannedSequenceNum": 1,
        "actualSequenceNum": 1,
        "stopType": {
            "id": 10000,
            "description": "STOP",
            "type": "STOP"
        },
        "plannedArrival": "2021-10-18T08:34:47+0000",
        "actualArrival": "2021-10-18T17:08:30+0000",
        "plannedService": "2021-10-18T08:34:47+0000",
        "actualService": "2021-10-18T17:08:30+0000",
        "plannedDeparture": "2021-10-18T08:34:47+0000",
        "actualDeparture": "2021-10-18T17:08:54+0000",
        "plannedSize1": 67.0,
        "plannedSize2": 0.0,
        "plannedSize3": 0.0,
        "actualSize1": 67.0,
        "actualSize2": 0.0,
        "actualSize3": 0.0,
        "plannedPickupSize1": 0.0,
        "plannedPickupSize2": 0.0,
        "plannedPickupSize3": 0.0,
        "actualPickupSize1": 0.0,
        "actualPickupSize2": 0.0,
        "actualPickupSize3": 0.0,
        "actualServiceTime": 24000,
        "plannedServiceTime": 0,
        "hasPicture": false,
        "hasSignature": false,
        "ordersInfo": "[0625798286], [0628993448], [3224202874], [3224367900]",
        "deliveryStatus": "DELIVERED",
        "returned": false,
        "redelivered": false,
        "canceled": false
    }
  }
]


Sending Coordinates to GreenMile

1. Introduction

GreenMile can receive coordinates in many different ways. This guide explains how to actively send coordinates to GreenMile using our REST API.

2. Prerequisite before receiving GPS Information

Before starting to send coordinate requests it’s necessary to ask GreenMile Support if your Third Party Company, also knows as GPS Provider, was already registered. If it was not registered, please ask our team to include it on the list of available track companies.

Our team will provide you a GPSProviderKey, which is the unique identification for your track company. With your GPSProviderKey in hand, you will be able to execute the following workflow in order to start sending coordinates.
uml sequence

2.1 Getting the GPS Provider

The first thing that your system will need to do is get the numeric ID of your GPS Provider using the following request.

Request
POST /GPSProvider HTTP/1.1
Content-Type: application/json
Host: 10.76.25.108:8080
Content-Length: 300

{
  "id" : null,
  "key" : "52cda3ec-591a-454b-a",
  "description" : "GPSProviderDoc",
  "gpsProviderParams" : null,
  "enabled" : true,
  "country" : "br",
  "timeZone" : {
    "id" : 10096,
    "description" : null,
    "rawOffsetMinutes" : null,
    "alias" : null,
    "timezoneName" : null
  }
}
Response
HTTP/1.1 200 OK
Content-Encoding: gzip
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Connection: keep-alive
X-Content-Type-Options: nosniff
Transfer-Encoding: chunked
Server-Version: 6.42-feature-925751-433219
Content-Type: application/json
Content-Length: 167

{
  "id" : 10121,
  "key" : "52cda3ec-591a-454b-a",
  "description" : "GPSProviderDoc",
  "enabled" : true,
  "country" : "br",
  "timeZone" : {
    "id" : 10096
  }
}

Given a GPSProvider named GPSExample his key will be "com.greenmile.trackcompany.gpsexample.GpsexampleTrackCompany" and his description will be "Gps Example".

The GPS Provider key will be fixed and provided by GreenMile for each GPS Provider Company.

3. Required GPS Information

Third Party Companies (GPS Providers) must send to GreenMile the following information for each coordinate:

(equipmentGpsUnitId : Equipment - gpsUnitId)

Table 46. COORDINATE
Attribute Name Comment Data Type Mandatory

odometerMeters

Vehicle odometer in meters (optional)

Long(22)

false

equipmentGpsUnitId

The identification of the vehicle assigned to this GPS black box GPS

String(45)

true

gpsProviderId

ID of the GPS Provider saved on GreenMile Server(The one you got above)

Integer(22)

true

position

Object that specifies latitude and longitude of the Coordinate. See Position Table

Position

true

date

Date and Time of the coordinate in GMT-Zero

Date and Time (yyyy-MM-dd HH:mm:ss)

true

speedKmh

Speed of the coordinate in Km/h

Float(22)

false

gpsProviderSavedDate

Date and Time that the coordinate was saved on the GPS Provider (optional)

Date and Time (yyyy-MM-dd HH:mm:ss)

false

engineOn

If vehicle ignition is on or off

Boolean (True / False)

false

Table 47. POSITION
Attribute Name Comment Data Type Mandatory

longitude

Position’s Longitude

Double(22)

true

latitude

Position’s Latitude

Double(22)

true

Optional attributes impact in some application features. For example, if you send the odometer (odometerMeters), a more accurate and fast distance calculation will be used.
3.1 Sample JSON Coordinate
coordinate.json
{
  "equipmentGpsUnitId": "PFH4586",
  "gpsProviderId": "20000",
  "position": {
    "longitude": -38.456475,
    "latitude": -3.736998
  },
  "date": "2015-06-11T17:12:00+0000",
  "gpsProviderSavedDate": "2015-06-11T17:13:10+0000",
  "odometerMeters": 32000000,
  "speedKmh": 27,
  "engineOn": true
}

4. Sending Coordinates

A vehicle is identified by the combination of two attributes: equipmentGpsUnitId and gpsProviderId. The first one is defined by the Third Party Company (GPS Provider) and must uniquely identify the vehicle. The second (gpsProviderId) is defined on GreenMile Server database and needs to be queried before sending the coordinate.

4.2 Sending Coordinated to GreenMile

After you have your GPS Provider Id you can start sending coordinates to GreenMile. Let’s assume here for demonstration purposes that your GPS Provider Id is 20000.

4.2.1 Sending Coordinates Batch

The best way to send coordinates to GreenMile is periodically (like every minute) send a batch of coordinates. For that, you should store the coordinates during a period of time and send them to GreenMile.

You can send a batch of coordinates using the following request:

POST /Coordinates HTTP/1.1
Content-Type: application/json
Host: 10.76.25.108:8080
Content-Length: 1440

[ {
  "id" : null,
  "equipmentId" : null,
  "equipmentKey" : null,
  "equipmentTypeOrgId" : null,
  "equipmentTypeKey" : null,
  "organizationId" : null,
  "mobileDeviceId" : null,
  "position" : {
    "longitude" : -3.7849524113555715,
    "latitude" : -3.7849524113555715,
    "accuracy" : null
  },
  "speedKmh" : 27.0,
  "odometerMeters" : 32000000,
  "engineOn" : true,
  "date" : 1697722178591,
  "savedDate" : null,
  "gpsProviderSavedDate" : 1697722178591,
  "coordSequence" : null,
  "equipmentGpsUnitId" : "DOC1313",
  "gpsProviderId" : 10082,
  "telematic" : null,
  "autoArriveDate" : null,
  "stoppedSince" : null,
  "route" : null,
  "latitude" : -3.7849524113555715,
  "longitude" : -3.7849524113555715
}, {
  "id" : null,
  "equipmentId" : null,
  "equipmentKey" : null,
  "equipmentTypeOrgId" : null,
  "equipmentTypeKey" : null,
  "organizationId" : null,
  "mobileDeviceId" : null,
  "position" : {
    "longitude" : -3.7881212142413934,
    "latitude" : -38.55789184570313,
    "accuracy" : null
  },
  "speedKmh" : 27.0,
  "odometerMeters" : 32000000,
  "engineOn" : true,
  "date" : 1697722178591,
  "savedDate" : null,
  "gpsProviderSavedDate" : 1697722178591,
  "coordSequence" : null,
  "equipmentGpsUnitId" : "DOC1313",
  "gpsProviderId" : 10082,
  "telematic" : null,
  "autoArriveDate" : null,
  "stoppedSince" : null,
  "route" : null,
  "latitude" : -38.55789184570313,
  "longitude" : -3.7881212142413934
} ]
4.2.2 Sending Coordinates Individually

You can also send individual coordinates. We recommend the use of the Batch Insert (Section 4.2.1) to avoid network latency and improve the performance.

POST /Coordinate HTTP/1.1
Content-Type: application/json
Host: 10.76.25.108:8080
Content-Length: 718

{
  "id" : null,
  "equipmentId" : null,
  "equipmentKey" : null,
  "equipmentTypeOrgId" : null,
  "equipmentTypeKey" : null,
  "organizationId" : null,
  "mobileDeviceId" : null,
  "position" : {
    "longitude" : -3.7849524113555715,
    "latitude" : -3.7849524113555715,
    "accuracy" : null
  },
  "speedKmh" : 27.0,
  "odometerMeters" : 32000000,
  "engineOn" : true,
  "date" : 1697722176804,
  "savedDate" : null,
  "gpsProviderSavedDate" : 1697722176804,
  "coordSequence" : null,
  "equipmentGpsUnitId" : "DOC1313",
  "gpsProviderId" : 10080,
  "telematic" : null,
  "autoArriveDate" : null,
  "stoppedSince" : null,
  "route" : null,
  "latitude" : -3.7849524113555715,
  "longitude" : -3.7849524113555715
}

Entities

GreenMile objects

Here are some basic entities that you may be first introduced to, in order to comprehend how we actually work.
A Route is a trajectory assigned to a Driver and/or to an Equipment. The Route may contain Stops that may also contain Orders, which contain Line Items.

This section lists the available entities on Greenmile API.
The pages only define the entity specific information like descriptions and constraints.
For more detail on the generic web service method calls, refer to the Services.

Table 48. Entities
Service Description

UndeliverableCode

Represents an UndeliverableCode entity.

AccountType

Represents an AccountType entity.

CancelCode

Represents a CancelCode entity.

DelayType

Represents a DelayType entity.

Driver

Represents a Driver entity.

DriverProfileCost

Represents a Driver Profile Cost entity.

Equipment

Represents an Equipment entity.

EquipmentType

Represents an EquipmentType entity.

Event

Represents an Event entity.

EventType

Represents an EventType entity.

Geocode

Represents a geocode entity.

Geofence

Represents a geofence entity.

GeofenceGeometry

Represents a geofenceGeometry entity.

GPSProvider

Represents a GPS Provider entity.

HoursOfServiceType

Represents a HoursOfServiceType entity.

I18NLocale

Represents an i18NLocale/PreferredLocale entity.

LineItem

Represents a LineItem entity.

LineItemUDF

Represents a LineItemUDF entity.

Location

Represents a Location entity.

LocationType

Represents a LocationType entity.

LocationOverrideTimeWindow

Represents a LocationOverrideTimeWindow entity

Order

Represents an Order entity.

OrderClass

Represents an OrderClass entity.

OrderUDF

Represents an OrderUDF entity.

Organization

Represents an Organization entity.

PaymentMethod

Represents a PaymentMethod entity.

PaymentMethodAllowed

Represents a PaymentMethodAllowed entity.

PendingOrder

Represents a PendingOrder entity.

PhotoAlbum

Represents a PhotoAlbum entity.

Photo

Represents a Photo entity.

ReasonCode

Represents a ReasonCode entity.

RouteAdditionalMaterial

Represents a RouteAdditionalMaterial entity.

RouteConsignedSku

Represents a RouteConsignedSKU entity.

Route

Represents a Route entity.

RouteDriverAssignment

Represents a RouteDriverAssignment entity.

RouteDriverPendingBalance

Represents a RouteDriverPendingBalance entity.

RouteEquipmentAssignment

Represents a RouteEquipmentAssignment entity.

RouteExtraLineItem

Represents a RouteExtraLineItem entity.

RouteHelperAssignment

Represents a RouteHelperAssignment entity.

RouteHolderMaterial

Represents a RouteHolderMaterial entity.

RouteLocationPendingPayment

Represents a RouteLocationPendingPayment entity.

RouteManifest

Represents a RouteManifest entity.

RouteManifestUDF

Represents a RouteManifestUDF entity.

RouteSummary

Represents a RouteSummary entity.

ServiceTimeType

Represents a ServiceTimeType entity.

SizeAlias

Represents a SizeAlias entity.

Sku

Represents a SKU entity.

SkuGroup

Represents a SkuGroup entity.

SkuOrganizationPriceList

Represents a SkuOrgPriceList entity.

SkuSizeConversion

Represents a SkuSizeConversion entity.

SkuType

Represents a SkuType entity.

Stop

Represents a Stop entity.

StopDocument

Represents a StopDocument entity.

StopSignature

Represents a StopSignature entity.

StopType

Represents a StopType entity.

Survey

Represents a Survey entity.

Tag

Represents a Tag entity.

TimeWindowType

Represents a TimeWindowType entity.

Transport

Represents a Transport entity.

TimeZone

Represents a TimeZone entity.

AccountType

Represents an account Type.

API Entity Name : AccountType
Refer to the CRUD Services to see the details about the create, retrieve, update and delete API methods.

Beside its ID, an AccountType is also uniquely identifiable by the key attribute.
Table 49. Attributes
Path Type Description Mandatory Natural ID

id

Integer(22)

The entity’s auto-increment id.

key

String(45)

AccountType’s key. (Version not found)

Yes

Yes

organization

Organization

Indicates the Organization of the Account Type.(Version not found)

Yes

Yes

description

String(45)

Description from Account Type. (Version not found)

Yes

color

String(45)

Color of Account Type.(Version not found)

JSON Example
{
  "organization" : {
    "id" : 10415,
    "key" : "ced2efbb-ae81-46f9-8O",
    "description" : "Organization Rest Docs Desc",
    "city" : "São Paulo",
    "state" : "São Paulo",
    "preferedLocale" : {
      "id" : 10000
    },
    "timeZone" : {
      "id" : 10096
    },
    "unitSystem" : "METRIC"
  },
  "key" : "ced2efbb-ae81-46f9-8",
  "description" : "Sample Account Type.",
  "color" : "red"
}

CancelCode

Represents a CancelCode. Used to describe the reason for a canceled Stop.

API Entity Name : CancelCode
Refer to the CRUD Services to see the details about the create, retrieve, update and delete API methods.

Beside its ID, a CancelCode is also uniquely identifiable by the key attribute.
Table 50. Attributes
Path Type Description Mandatory Natural ID

id

Integer(22)

The entity’s auto-increment id.

key

String(45)

CancelCode’s key. (Version not found)

Yes

Yes

organization

Organization

The organization to which the current Cancel Code template will apply. (Version not found)

Yes

Yes

description

String(45)

The name that will be displayed in the system and on driver’s phones for the cancellation or dispatcher. (Version not found)

Yes

enabled

Boolean

Activates the Cancel Code in GreenMile. (Version not found)

Yes

udfs

[CancelCodeUDF]

The user’s defined field. (Version not found)

JSON Example
{
  "organization" : {
    "id" : 10356
  },
  "key" : "767e37c5-404c-4d58-b",
  "description" : "CancelCode Sample",
  "enabled" : true
}

Coordinate

Represents a Coordinate. Used for equipments.

API Entity Name : Coordinate
Refer to the CRUD Services to see the details about the create, retrieve, update and delete API methods.

Beside its ID, a Coordinate is also uniquely identifiable by the key attribute.
Table 51. Attributes
Path Type Description Mandatory Natural ID

equipmentGpsUnitId

String(45)

The Unit Code will be an unique identifier found on the GPS unit. (Version not found)

Yes

position

Object

Position coordinate information. It is an Object containing the latitude and longitude information using decimal formats.

Yes

date

Date

Date from that coordinate.(Version not found)

Yes

speedKmh

Float(22)

Speed in Km/h.(Version not found)

telematic

Object

Sends coordinate with telematics.

odometerMeters

Long(22)

Current odometer value.(Version not found)

engineOn

Boolean

Engine status.(Version not found)

latitude

Double(22)

latitude information. (Deprecated version since 6.10.18, please use Position)

longitude

Double(22)

longitude information. (Deprecated version since 6.10.18, please use Position)

JSON Example
{
  "id" : null,
  "equipmentId" : 10200,
  "equipmentKey" : null,
  "equipmentTypeOrgId" : null,
  "equipmentTypeKey" : null,
  "organizationId" : null,
  "mobileDeviceId" : null,
  "position" : {
    "longitude" : -98.471664,
    "latitude" : 29.469791,
    "accuracy" : null
  },
  "speedKmh" : 30.0,
  "odometerMeters" : 10250,
  "engineOn" : true,
  "date" : 1697722740430,
  "savedDate" : null,
  "gpsProviderSavedDate" : null,
  "coordSequence" : null,
  "equipmentGpsUnitId" : "ABC-1234",
  "gpsProviderId" : 10160,
  "telematic" : {
    "9a761bd9-aaf5-4484-9_2" : "150",
    "9a761bd9-aaf5-4484-9_1" : "true"
  },
  "autoArriveDate" : null,
  "stoppedSince" : null,
  "route" : null,
  "latitude" : 29.469791,
  "longitude" : -98.471664
}

DelayType

Represents a Type of Delay, used when a Route is delayed.

API Entity Name : DelayType
Refer to the CRUD Services to see the details about the create, retrieve, update and delete API methods.

Table 52. Attributes
Path Type Description Mandatory Natural ID

id

Integer(22)

The entity’s auto-increment id.

description

String(45)

The name that will be displayed in the system and on driver’s phones for the Delay Type. (Version not found)

Yes

Yes

organization

Organization

The organization to which the current Delay Type template will apply. (Version not found)

Yes

Yes

enabled

Boolean

Activates the Delay Type in GreenMile to allow them to log into the system. (Version not found)

Yes

routeDelay

Boolean

This allows the Delay Type to be available to the driver while the route is in movement mode. (Version not found)

Yes

stopDelay

Boolean

This allows the Delay Type to be available to the driver while the route is at a stop. (Version not found)

Yes

JSON Example
{
  "organization" : {
    "id" : 10372
  },
  "description" : "6cc3876c-b515-41fc-aSample.",
  "enabled" : true,
  "routeDelay" : true,
  "stopDelay" : true
}

Driver

Represents a Driver, that is also a User of the system, responsible for driving the Equipment to complete Routes.

API Entity Name : Driver
Refer to the CRUD Services to see the details about the create, retrieve, update and delete API methods.

Beside its ID, a Driver is also uniquely identifiable by the key attribute.
Table 53. Attributes
Path Type Description Mandatory Natural ID

id

Integer(22)

The entity’s auto-increment id.

password

String(45)

The user’s password.

key

String(45)

The key associated with the specific Driver template being defined.

Yes

Yes

login

String(45)

The name the Driver will enter when logging into the GreenMile system.

Yes

Yes

preferedLocale

I18NLocale

The language associated with the specific Driver template being defined.

organization

Organization

The organization to which the current Driver will apply.

name

String(45)

The name of the Driver you would like displayed in the GreenMile system.

unitSystem

String(10)

The system of measurement that will displayed for the Driver in GreenMile Driver.

licenseNumber

String(45)

The number issues to the driver.

driverType

String(7)

Type of Job for the Driver.

licenseExpires

Date

Date the license expires on.

driverProfileCost

DriverProfileCost

The cost profile that will be utilized to compute the driver’s cost of the route .

lastDrugsTest

Date

The date of the driver’s last drug test.

lastPhysicalTest

Date

The date of the driver’s last physical.

lastAlcoholTest

Date

The date of the driver’s last alcohol test.

smartTrack

Boolean

Indicates if Driver has smart track or not.

failedAttempts

Integer(22)

Amount of login attempts.

lockDate

Date

Locked account Date.

expireDate

Date

Date to lock account.

latestLogin

Date

Date of last login.

passwordExpire

Integer(22)

Days left to change password.

email

String(45)

User’s e-mail address.

enabled

Boolean

Activates the Driver in GreenMile to allow them to log into the system.

timeZone

TimeZone

Driver’s time zone.

udfs

UserUDF

User’s Defined Fields associated to Driver.

organizations

UserOrganization

The organization to which the current Driver will apply.

userAllowedEquipments

UserEquipment

Indicates if Driver has smart track or not.

userAllowedDrivers

UserDriver

Indicates if Driver has smart track or not.

userAllowedTags

UserTag

Represents a list of tags allowed for the user.

addressLine1

String(45)

The street address for the driver.

addressLine2

String(45)

Additional address information such as apartment.

city

String(45)

City of driver’s address.

state

String(45)

State of driver’s address.

zipCode

String(45)

Postal code of driver’s address.

district

String(45)

District of driver’s address.

country

String(45)

County of driver’s address.

longitude

Double(22)

Map coordinates for Longitude of driver’s address.

latitude

Double(22)

Map coordinates for Latitude of driver’s address.

geocodingQuality

String(13)

A selection assigned to how accurate the geocode is.

phone1

String(13)

A selection assigned to how accurate the geocode is.

phone1Type

String(45)

The phone type entered in Phone 1.

phone2

String(45)

User’s phone number (2) for informational use.

phone2Type

String(45)

The phone type entered in Phone 2.

adpFileNumber

String(45)

The employee number provided by ADP for exporting of payroll data to ADP.

defaultEncoding

String(12)

The employee number provided by ADP for exporting of payroll data to ADP.

restrictTags

Boolean

Represents a list of tags not allowed to the user.

leader

User

Represents the leader of the user.

subordinates

User

Represents a list of user subordinates.

restrictUsers

Boolean

Represents a list of restricted users for this user.

ipRangeProfile

IPRangeProfile

Ip Range Profile.

groups

Group

List of groups where the driver belongs.

groups[].id

Boolean

groups[].name

String

groups[].key

String

groups[].isSystem

Boolean

groups[].locked

Boolean

groups[].admin

Boolean

groups[].sysAdmin

Boolean

restrictEquipments

Boolean

Represents a list of restricted users for this user.

restrictDrivers

Boolean

Represents a list of restricted users for this user.

isSystem

Boolean

Indifactes if is system

externalUser

Boolean

Indicates if the driver is an external user

firstName

String(45)

First name of the driver.

lastName

String(45)

Last name of the driver.

ticketTypes

TicketType

Identifies the Ticket Type list.

JSON Example
{
  "login" : "1cfebb16-0425-4de0-b",
  "password" : "1234",
  "preferedLocale" : {
    "id" : 10000
  },
  "organization" : {
    "id" : 10531
  },
  "key" : "1cfebb16-0425-4de0-b",
  "name" : "1cfebb16-0425-4de0-b",
  "unitSystem" : "METRIC",
  "externalUser" : false,
  "driverType" : "DEFAULT",
  "driverProfileCost" : {
    "id" : 10088
  },
  "firstName" : "1cfebb16-0425-4de0-b",
  "lastName" : ""
}

DriverProfileCost

Represents the cost profile of a Driver.

API Entity Name : DriverProfileCost
Refer to the CRUD Services to see the details about the create, retrieve, update and delete API methods.

Table 54. Attributes
Path Type Description Mandatory Natural ID

id

Integer(22)

The entity’s auto-increment id.

description

String(45)

The name that will be displayed in the system for the Cost Profile. (Version not found)

Yes

Yes

organization

Organization

The organization to which the current Cost Profile template will apply. (Version not found)

Yes

Yes

fixedRouteCost

BigDecimal(22)

The amount of money the route will calculate for the driver. (Version not found)

Yes

costPerHour

BigDecimal(22)

The amount of driver wage based on each hour. (Version not found)

Yes

minimumTimeHours

Integer(22)

The amount of time the driver is guaranteed pay for the route. (Version not found)

Yes

overtimeRatePerHour

BigDecimal(22)

The amount of driver wage once the amount of time in the Regular Time (minutes) box has been exceeded. (Version not found)

Yes

perDistanceRateKm

BigDecimal(22)

The amount of pay per unit for the driver. (Version not found)

Yes

minimumDistance

Integer(22)

The minimum amount of miles the driver is paid. (Version not found)

Yes

perSize1Rate

BigDecimal(22)

The amount of pay per size1 delivered. (Version not found)

Yes

perSize2Rate

BigDecimal(22)

The amount of pay per size2 delivered.. (Version not found)

Yes

perSize3Rate

BigDecimal(22)

The amount of pay per size3 delivered. (Version not found)

Yes

minimumSize1

Integer(22)

The minimum amount of size1 the driver is paid. (Version not found)

Yes

minimumSize2

Integer(22)

Data used for cost calculation considering size2. (Version not found)

Yes

minimumSize3

Integer(22)

Data used for cost calculation considering size3. (Version not found)

Yes

enabled

Boolean

Activates the Cost Profile in GreenMile to be utilized. (Version not found)

Yes

regularTimeMinutes

Integer(22)

The amount of time for the route (in minutes) for regular pay .(Version not found)

Yes

fixedStopCost

BigDecimal(22)

The amount of money the route will be calculated at for each stop. (Version not found)

Yes

udfs

[DriverProfileCostUDF]

User’s Defined Fields associated to DriverProfileCost. (Version not found)

JSON Example
{
  "id" : null,
  "creationDate" : null,
  "lastModificationDate" : null,
  "organization" : {
    "id" : 10375,
    "creationDate" : null,
    "lastModificationDate" : null,
    "key" : null,
    "parentOrganization" : null,
    "description" : null,
    "addressLine1" : null,
    "addressLine2" : null,
    "city" : null,
    "state" : null,
    "zipcode" : null,
    "district" : null,
    "country" : null,
    "taxid" : null,
    "preferedLocale" : null,
    "timeZone" : null,
    "listenerOrganizations" : null,
    "unitSystem" : null,
    "dsgOrgId" : null,
    "dsgOrganizationId" : null
  },
  "description" : "59f8fbef-dd78-437d-b Sample",
  "fixedRouteCost" : 1200,
  "costPerHour" : 15,
  "minimumTimeHours" : 8,
  "overtimeRatePerHour" : 30,
  "perDistanceRateKm" : 4,
  "minimumDistance" : 10000,
  "perSize1Rate" : 1,
  "perSize2Rate" : null,
  "perSize3Rate" : null,
  "minimumSize1" : 10,
  "minimumSize2" : null,
  "minimumSize3" : null,
  "enabled" : true,
  "regularTimeMinutes" : 10,
  "fixedStopCost" : 10,
  "udfs" : null
}

Equipment

Represents an object that can be traced. example : vehicle, driver, telemetry device.

API Entity Name : Equipment
Refer to the CRUD Services to see the details about the create, retrieve, update and delete API methods.

Beside its ID, an Equipment is also uniquely identifiable by the key attribute.
Table 55. Attributes
Path Type Description Mandatory Natural ID

key

String(45)

The unique database key associated with the specific Equipment template being defined.

id

Integer(22)

The unique database id associated with the specific Equipment template being defined.

creationDate

String(45)

The entity’s creation date.

lastModificationDate

String(45)

The entity’s last modification date.

organization

Organization

The organization to which the current Equipment template will apply.

equipmentType

EquipmentType

The Equipment Type to which the current Equipment template will apply.

description

String(45)

The name that will be displayed in the system for the Equipment.

enabled

Boolean

Activates the Equipment in GreenMile to allow them to log into the system.

gpsUnitId

String(45)

The Unit Code will be an unique identifier found on the GPS unit.

gpsProvider

GPSProvider

The GPS Black Box provider that is installed in the equipment.

tags

Tag

The name of the tag you would like to associate the equipment with.

udfs

EquipmentUDF

User’s Defined Fields associated to Equipment.

gpsProviderTelematicProfile

GPSProviderTelematicProfile

Profile of GPS provider.

JSON Example
{
  "organization" : {
    "id" : 10422
  },
  "key" : "ffe549db-1322-45a3-8",
  "equipmentType" : {
    "id" : 10201
  },
  "description" : "Sample Equipment",
  "enabled" : true,
  "gpsProvider" : {
    "id" : 10144,
    "key" : "ffe549db-1322-45a3-8GPSProviderDoc",
    "description" : "GPSProviderDoc",
    "enabled" : true,
    "country" : "br",
    "timeZone" : {
      "id" : 10096
    }
  },
  "tags" : [ ]
}

EquipmentType

Represents an attribute in Equipment that allows the definition of different types of vehicles.

API Entity Name : EquipmentType
Refer to the CRUD Services to see the details about the create, retrieve, update and delete API methods.

Beside its ID, an EquipmentType is also uniquely identifiable by the key attribute.
Table 56. Attributes
Path Type Description Mandatory Natural ID

id

Integer(22)

The entity’s auto-increment id.

key

String(45)

The unique database key associated with the specific Equipment template being defined.(Version not found)

Yes

Yes

description

String(255)

The name that will be displayed in the system for the Equipment Type.(Version not found)

Yes

Yes

organization

Organization

The organization to which the current Equipment template will apply.(Version not found)

Yes

udfs

[EquipmentTypeUDF]

User Defined Fields associated to EquipmentType.(Version not found)

weight

Double(22)

The gross weight of the vehicle.(Version not found)

height

Double(22)

The maximum height of the vehicle.(Version not found)

averageFuelConsumption

Double(22)

The average amount of fuel the equipment type consumes.(Version not found)

carbonFactor

Double(22)

The Carbon Emission Factor for the vehicle type used in CO2 reporting.(Version not found)

size1

Double(22)

The equipment type’s Size1 capacity.(Version not found)

size2

Double(22)

The equipment type’s Size2 capacity.(Version not found)

size3

Double(22)

The equipment type’s Size3 capacity.(Version not found)

fixedRouteCost

BigDecimal(22)

The amount of money the route will calculate for the equipment.(Version not found)

vehicleType

VehicleType

The type of vehicle that is using the equipment.(Version not found)

costPerMinute

BigDecimal(22)

The amount of dollars and cents that the equipments costs to operate.(Version not found)

minimumTimeMinutes

Integer(22)

The minimum amount of time used to calculate cost.(Version not found)

perDistanceRateKm

BigDecimal(22)

The amount of cost per unit traveled for the equipment.(Version not found)

minimumDistance

Integer(22)

The minimum amount of miles the equipment cost per distance will be calculated.(Version not found)

perSize1Rate

BigDecimal(22)

The amount of cost charged per size1 carried on equipment.(Version not found)

minimumSize1

Integer(22)

The minimum amount of size1 the Cost per Size1 will be calculated at.(Version not found)

enabled

Boolean

Activates the Equipment in GreenMile to allow them to log into the system.(Version not found)

avoidTollRoads

Boolean

Needs description(Version not found)

avoidTunnels

Boolean

Needs description(Version not found)

avoidShortTurns

Boolean

Needs description(Version not found)

avoidAlreadyUsedRoutes

Boolean

Needs description(Version not found)

disableChangesFromDriver

Boolean

Needs description(Version not found)

maximumEquipmentHeight

Double

Needs description(Version not found)

equipmentLength

Double

Needs description(Version not found)

grossEquipmentWeight

Double

Needs description(Version not found)

axleCount

Integer

Needs description(Version not found)

trailerCount

Integer

Needs description(Version not found)

weightPerAxle

Double

Needs description(Version not found)

maximumSupportedWeight

Double

Needs description(Version not found)

tunnelCategory

TunnelCategory

Needs description(Version not found)

width

Double

Needs description(Version not found)

JSON Example
{
  "id" : null,
  "creationDate" : null,
  "lastModificationDate" : null,
  "organization" : {
    "id" : 10483,
    "creationDate" : null,
    "lastModificationDate" : null,
    "key" : null,
    "parentOrganization" : null,
    "description" : null,
    "addressLine1" : null,
    "addressLine2" : null,
    "city" : null,
    "state" : null,
    "zipcode" : null,
    "district" : null,
    "country" : null,
    "taxid" : null,
    "preferedLocale" : null,
    "timeZone" : null,
    "listenerOrganizations" : null,
    "unitSystem" : null,
    "dsgOrgId" : null,
    "dsgOrganizationId" : null
  },
  "key" : "52837552-2568-428c-9",
  "description" : "Sample EquipmentType",
  "udfs" : null,
  "weight" : 5500.0,
  "height" : 2.5,
  "width" : null,
  "averageFuelConsumption" : 12.3,
  "carbonFactor" : 0.1,
  "enabled" : true,
  "size1" : 1200.0,
  "size2" : 600.0,
  "size3" : 300.0,
  "fixedRouteCost" : 100.0,
  "costPerMinute" : 0.1,
  "minimumTimeMinutes" : 1,
  "perDistanceRateKm" : 0.35,
  "minimumDistance" : 5,
  "perSize1Rate" : 1.5,
  "minimumSize1" : 1,
  "vehicleType" : null,
  "avoidTollRoads" : null,
  "avoidTunnels" : null,
  "avoidShortTurns" : null,
  "avoidAlreadyUsedRoutes" : null,
  "disableChangesFromDriver" : null,
  "maximumEquipmentHeight" : null,
  "equipmentLength" : null,
  "grossEquipmentWeight" : null,
  "axleCount" : null,
  "trailerCount" : null,
  "weightPerAxle" : null,
  "maximumSupportedWeight" : null,
  "tunnelCategory" : null
}

Event

Represents a configurable event in the system. You can take actions during the execution of the route, in addition to calls to other services.

API Entity Name : Event
Refer to the CRUD Services to see the details about the create, retrieve, update and delete API methods.

Beside its ID, an Event is also uniquely identifiable by the key attribute.
Table 57. Attributes
Path Type Description Mandatory Natural ID

id

Integer(22)

The entity’s auto-increment id.

description

String

The name that will be displayed in the system for the Event.(Version not found)

Yes

organization

Organization

The organization to which the current Event template will apply.(Version not found)

Yes

eventType

EventType

Represents the type of event(Version not found)

Yes

enabled

Boolean

Indicates whether it is enabled. (Version not found)

Yes

requiresAck

Boolean

Indicates whether user acknowledgement is required(Version not found)

Yes

requiresComment

Boolean

Indicates whether comments are required. (requiredAck must be enabled)(Version not found)

Yes

scheduleCron

String

Represents a task scheduler with a set time to run the event. (Version not found)

Yes

exibitionMode

String

Event exhibition mode. (NORMAL, URGENT, BLOCKER, NOT_SHOW 'DO NOT DISPLAY')(Version not found)

Yes

messageBody

String

Body of the event message. (Route @Route.key@ with Driver @Driver.login@ is delayed)(Version not found)

Yes

checks

[EventCheck]

Represents the rules for the event to run.(Version not found)

Yes

icon

String

Event icon.(Version not found)

actions

[EventAction]

Actions that the event should take.(Version not found)

JSON Example
{
  "organization" : {
    "id" : 10387
  },
  "eventType" : {
    "id" : 10000
  },
  "description" : "fa4ad70b-2c72-4c8d-a",
  "enabled" : true,
  "requiresAck" : false,
  "requiresComment" : false,
  "scheduleCron" : "STR",
  "exibitionMode" : "NORMAL",
  "messageBody" : "Route completed all assigned stops",
  "icon" : "images/event/alert_triangle_red.png",
  "checks" : [ ]
}

EventLog

Represents the generated event logs.

API Entity Name : EventLog
NOTE: Beside its ID, an EventLog is also uniquely identifiable by the key attribute.

Table 58. Attributes

Path

Type

Description

event

Event

Represents the event for which the log was generated

route

Route

The route to which the EventLog belongs.

stop

Stop

The stop to which the EventLog belongs.

order

Order

The order to which the EventLog belongs.

lineItem

LineItem

The lineItem to which the EventLog belongs.

equipment

Equipment

The equipment to which the EventLog belongs.

organization

Organization

The organization to which the EventLog belongs.

hoursOfService

HoursOfService

The driver’s hours of service time.

timeValuedTrue

Date

The time when the event was activated.

timeValuedFalse

Date

The time when the event was disabled.

latitude

Double(22)

Represents the event’s latitude

longitude

Double(22)

Represents the event’s longitude

closed

Boolean

Indicates whether the event was closed

whenRecheck

Date

indicates when to check again

messageBody

String

Represents the message generated in the event log

solvedBy

User

Indicates the user who resolved the event.

solvedWhen

Date

Represents the date on which the event was resolved.

openedBy

User

Indicates the user who opened the event.

openedWhen

Date

Represents the date the event was opened.

startCoordId

String

Represents the identifier of the initial coordinate of the event.

endCoordId

String

Represents the identifier of the final coordinate of the event.

startCoord

Coordinate

Represents the initial coordinate.

endCoord

Coordinate

Represents the final coordinate.

EventType

Represents an attribute in Event that allows the definition of different types of events.

API Entity Name : EventType
Refer to the CRUD Services to see the details about the create, retrieve, update and delete API methods.

Beside its ID, an EventType is also uniquely identifiable by the key attribute.
Table 59. Attributes
Path Type Description Mandatory Natural ID

id

Integer(22)

The entity’s auto-increment id.

id

Integer(22)

The entity’s auto-increment id.

description

String

The name that will be displayed in the system for the Event Type(Version not found)

Yes

JSON Example
{
  "description" : "0b2d61f9-4638-4b57-a"
}

Geocode

Represents a search of Geocoding.

API Entity Name : Geocode

Table 60. Attributes
Path Type Description Mandatory Natural ID

address

String(255)

Indicates a precise street address.

locality

String(255)

Indicates an incorporated city or town political entity.

country

String(5)

Indicates the national political entity, and is typically the highest order type returned by the Geocoder.

administrativeArea

String(255)

Indicates a first-order civil entity below the country level. Within the United States, these administrative levels are states. Not all nations exhibit these administrative levels.

postalCode

String(15)

Indicates a postal code as used to address postal mail within the country.

route

Route

Route id.

JSON Example
{
  "address" : "Interstate 4",
  "locality" : "Orlando",
  "country" : "US",
  "administrativeArea" : "Orange County",
  "postalCode" : "32839"
}

GeocodingQuality

Quality of the geocoding information.

Table 61. Valid values:

AUTO

Automatically geocoded. The address fields provided were recognized.

MANUAL

The user manually inputed the position information using the system.

CITY

Automatically geocoded. The coordinate accuracy is reliable on city level.

ZIP

Automatically geocoded. The coordinate accuracy is reliable only on ZIP(CEP) code level.

UNSUCCESSFULL

Geocoding not available.

GPS

A GPS hardware was used to geocode the customer.

Geofence

Represents a fence in a determined area. When creating a GeoFence it is necessary to remember that in order to close the fence you will need to re-enter the first coordinate(Longitude and Latitude).

API Entity Name : Geofence

Table 62. Attributes
Path Type Description Mandatory Natural ID

organization

Organization

The organization to which the current Cancel Code template will apply.(Version not found)

Yes

Yes

description

String(255)

The name that will be displayed in the system and on driver’s phones for the cancellation or Dispatcher.(Version not found)

color

String(30)

Indicates which color in Hex.(Version not found)

tags

Tag

Tag for geofence.(Version not found)

JSON Example
{
  "organization" : {
    "id" : 10554
  },
  "description" : "2e2d0122-4173-4cc1-a Sample",
  "color" : "rgb(238, 60, 37)",
  "geofenceGeometry" : {
    "positions" : [ {
      "longitude" : -3.7849524113555715,
      "latitude" : -38.58495241135557
    }, {
      "longitude" : -3.7881212142413934,
      "latitude" : -38.55789184570313
    }, {
      "longitude" : -3.7906048624461435,
      "latitude" : -38.56621742248536
    }, {
      "longitude" : -3.7849524113555715,
      "latitude" : -38.56836318969727
    } ]
  },
  "tags" : [ ]
}

GeofenceGeometry

Represents positions of geometry for a Geofence.

API Entity Name : GeofenceGeometry

Table 63. Attributes
Path Type Description Mandatory Natural ID

geofenceGeometry

GeofenceGeometry

Positions of geometry for Geofence.(Version not found)

Yes

geofenceGeometry.positions

[Position]

Longitude and Latitude of Geofence points.

Yes

geofenceGeometry.positions.[].longitude

Double(22)

Geofence point longitude.

Yes

geofenceGeometry.positions.[].latitude

Double(22)

Geofence point latitude.

Yes

JSON Example
{
"geofenceGeometry" : {
    "positions" : [ {
      "longitude" : -3.7849524113555715,
      "latitude" : -38.58495241135557
    }, {
      "longitude" : -3.7881212142413934,
      "latitude" : -38.55789184570313
    }, {
      "longitude" : -3.7906048624461435,
      "latitude" : -38.56621742248536
    }, {
      "longitude" : -3.7849524113555715,
      "latitude" : -38.56836318969727
    } ]
}
}

GPSProvider

[.small]#Represents a GPSProvider

API Entity Name : GPSProvider

Table 64. Attributes
Path Type Description Mandatory Natural ID

id

Integer(22)

The entity’s auto-increment id.(Version not found)

key

String

The entity’s Key. (Version not found)

Yes

Yes

description

String(255)

Description of the GPS Provider. (Version not found)

Yes

enabled

Boolean

Status enabled (true) or not (false)(Version not found)

Yes

country

String

Country Name(Version not found)

timeZone

TimeZone

Timezone Name (Version not found)

JSON Example
{
  "id" : null,
  "key" : "ff071362-7f16-4e18-b",
  "description" : "GPSProviderDoc",
  "gpsProviderParams" : null,
  "enabled" : true,
  "country" : "br",
  "timeZone" : {
    "id" : 10096,
    "description" : null,
    "rawOffsetMinutes" : null,
    "alias" : null,
    "timezoneName" : null
  }
}

GPSProviderTelematicProfile

Represents a GpsProviderTelematicProfile, a profile for telematics which include properties.

API Entity Name : GpsProviderTelematicProfile

Table 65. Attributes
Path Type Description Mandatory Natural ID

gpsProviderTelematicProps

GPSProviderTelematicProp

The telematic profile properties.(Version not found)

Yes

description

String(45)

A description for the telematic profile.(Version not found)

Yes

Yes

enabled

Boolean

Indicates if that Telematic profile is enabled or not.(Version not found)

Yes

id

Integer(22)

The entity’s auto-increment id.

JSON Example
{
  "id" : null,
  "description" : "ae124546-d04d-4939-9E",
  "enabled" : true,
  "gpsProviderTelematicProps" : [ {
    "id" : null,
    "gpsProvider" : {
      "id" : 10152,
      "key" : null,
      "description" : null,
      "gpsProviderParams" : null,
      "enabled" : null,
      "country" : null,
      "timeZone" : null
    },
    "key" : "ae124546-d04d-4939-9GPTP1",
    "description" : "ae124546-d04d-4939-9GPTP1D",
    "type" : "BOOLEAN",
    "enabled" : true
  }, {
    "id" : null,
    "gpsProvider" : {
      "id" : 10152,
      "key" : null,
      "description" : null,
      "gpsProviderParams" : null,
      "enabled" : null,
      "country" : null,
      "timeZone" : null
    },
    "key" : "ae124546-d04d-4939-9GPTP2",
    "description" : "ae124546-d04d-4939-9GPTP2D",
    "type" : "BOOLEAN",
    "enabled" : true
  } ]
}

GPSProviderTelematicProp

Represents a GpsProviderTelematicProp, which is included in a profile.

API Entity Name : GpsProviderTelematicProp

Table 66. Attributes
Path Type Description Mandatory Natural ID

key

String(45)

The key for the telematic property.(Version not found)

Yes

Yes

description

String(255)

The telematic property description.(Version not found)

Yes

gpsProvider

GPSProvider

The telematic property GPSProvider.(Version not found)

Yes

enabled

Boolean

Indicates whether it is enabled.(Version not found)

Yes

type

String(30)

The telematic property. (DECIMAL, INTEGER, BOOLEAN, TEXT, DATE_TIME, DATE, TIME)

Yes

id

Integer(22)

The entity’s auto-increment id.

This entity will be creating with telematics profile.

HoursOfServiceType

Represented a type of hours of service.

API Entity Name : HoursOfServiceType
Refer to the CRUD Services to see the details about the create, retrieve, update and delete API methods.

Beside its ID, a HoursOfServiceType is also uniquely identifiable by the key attribute.
Table 67. Attributes
Path Type Description Mandatory Natural ID

id

Integer(22)

The entity’s auto-increment id.

key

String(255)

HoursOfServiceType’s key (Automatically generated key)(Version not found)

description

String

The name that will be displayed in the system for the Hours of Service Type.(Version not found)

Yes

organization

Organization

The organization to which the current Hours of Service Type template will apply.(Version not found)

Yes

allowBreakAppointment

Boolean

The type created will be calculated as a break in Hours of Service.(Version not found)

Yes

allowLunchAppointment

Boolean

The type will be considered as meal time in Hours of Service calculation.(Version not found)

Yes

allowWaitAppointment

Boolean

The type created will be considered as a wait time for the Hours of Service calculation.(Version not found)

Yes

inferDriveTimeBasedRouteActions

Boolean

The type created will be considered as drive time in the Hours of Service calculation.(Version not found)

Yes

disableDate

Date

Disable Date.(Version not found)

breakTimeThresholdMinutes

Integer

Indicates when a break should be taken.(Version not found)

breakTimeDurationMinutes

Integer

Indicates how long this break will be.(Version not found)

lunchTimeThresholdMinutes

Integer

Indicates when a lunch break should be taken.(Version not found)

lunchTimeDurationMinutes

Integer

Indicates how long this lunch will be.(Version not found)

forceBreakTime

Boolean

If the value of forceBreakTime is True the system forces the break time to be at least the value specified in breakTimeDurationMinutes.(Version not found)

forceLunchTime

Boolean

If the value of forceLunchTime is True the system forces the lunch time to be at least the value specified in lunchTimeDurationMinutes.(Version not found)

JSON Example
{
  "description" : "Sample HoursOfServiceType",
  "allowBreakAppointment" : true,
  "allowLunchAppointment" : true,
  "allowWaitAppointment" : true,
  "inferDriveTimeBasedRouteActions" : true,
  "organization" : {
    "id" : 10548
  },
  "breakTimeThresholdMinutes" : 10,
  "breakTimeDurationMinutes" : 10,
  "lunchTimeThresholdMinutes" : 10,
  "lunchTimeDurationMinutes" : 10,
  "forceBreakTime" : false,
  "forceLunchTime" : false,
  "enabled" : true
}

I18NLocale

Represents the locale internationalization.

API Entity Name : i18NLocale
This entity is pre-added to each server. To get a list of I18NLocale please refer to List by Example.

Beside its ID, an i18NLocale is also uniquely identifiable by the key attribute.
Table 68. Attributes
Path Type Description

id

Integer(22)

The entity’s auto-increment id.

key

String(45)

PreferredLocale’s Key.

description

String(45)

PreferredLocale’s description.

language

String(4)

PreferredLocale’s language.

dateFormat

String(30)

PreferredLocale’s date format.

timeFormat

String(15)

PreferredLocale’s time format.

currency

String(10)

PreferredLocale’s currency.

decimalSymbol

Character(1)

PreferredLocale’s decimal symbol.

digitalGrouping

Character(1)

PreferredLocale’s digital grouping.

JSON Example
[ {
  "id" : 10000,
  "key" : "I18NLocale_en",
  "language" : "en",
  "description" : "English",
  "dateFormat" : "MM/dd/yyyy",
  "timeFormat" : "hh:mm a",
  "currency" : "US$",
  "decimalSymbol" : ".",
  "digitalGrouping" : ","
} ]

LineItem

Represents an item within an Order.

API Entity Name : LineItem
Refer to the CRUD Services to see the details about the create, retrieve, update and delete API methods.

Beside its ID, a LineItem is also uniquely identifiable by the lineItemID attribute.
Table 69. Attributes
Path Type Description Mandatory Natural ID

id

Integer(22)

The entity’s auto-increment id.

lineItemID

String(45)

The unique database key associated with the specific LineItem template being defined. (Version not found)

Yes

sku

Sku

The SKU to which the LineItem belongs. (Version not found)

Yes

plannedSize1

Double(22)

Planned amount of products that will be delivered in size1. (Version not found)

Yes

plannedSize2

Double(22)

Planned amount of products that will be delivered in size2. (Version not found)

plannedSize3

Double(22)

Planned amount of products that will be delivered in size3. (Version not found)

order

Order

The Order to which the LineItem belongs. (Version not found)

key

String

The key used to identify the entity. (Version not found)

lastModifier

[LastModifier]

Last User who changed the entity. (Version not found)

updateTime

Date

The moment of the last update of the entity. (Version not found)

plannedPickupSize1

Double(22)

Planned pickup size for size1. (Version not found)

plannedPickupSize2

Double(22)

Planned pickup size for size2. (Version not found)

plannedPickupSize3

Double(22)

Planned pickup size for size3. (Version not found)

damagedSize1

Double(22)

Quantity of damaged products for size1. (Version not found)

damagedSize2

Double(22)

Quantity of damaged products for size2. (Version not found)

damagedSize3

Double(22)

Quantity of damaged products for size3. (Version not found)

deliveryReasonCode

ReasonCode

Displays a reason for delivering within GreenMile Driver while at stop. (Version not found)

overReasonCode

ReasonCode

Displays a positive amount of product and be displayed as an overage in the system. (Version not found)

shortReasonCode

ReasonCode

Displays a negative amount of product and be displayed as a short in the system. (Version not found)

damagedReasonCode

ReasonCode

Displays a negative amount of product and be displayed as a damaged amount in the system. (Version not found)

pickupReasonCode

ReasonCode

Displays a positive amount of product and be displayed as a pickup in the system. (Version not found)

actualSize1

Double(22)

Actual amount of products that were delivered in size1. (Version not found)

actualSize2

Double(22)

Actual amount of products that were delivered in size2. (Version not found)

actualSize3

Double(22)

Actual amount of products that were delivered in size3. (Version not found)

actualPickupSize1

Double(22)

Actual amount of withdrawal size for size 1. (Version not found)

actualPickupSize2

Double(22)

Actual amount of withdrawal size for size 2. (Version not found)

actualPickupSize3

Double(22)

Actual amount of withdrawal size for size 3. (Version not found)

size1AliasConfig

SizeAlias

Represents the size1 associated with the lineItem. (Version not found)

size2AliasConfig

SizeAlias

Represents the size2 associated with the lineItem. (Version not found)

size3AliasConfig

SizeAlias

Represents the size3 associated with the lineItem. (Version not found)

hasPicture

boolean

Indicates if the LineItem has any photos.(Version not found)

boxKey

String(45)

Key of the box representing the lineItem. (Version not found)

unitPrice

Float(22)

LineItem unit price. (Version not found)

totalPrice

Float(22)

LineItem total price. (Version not found)

bonusKey

String(45)

Represents the key of the promotional code. (Version not found)

damagedSku

Sku

Represents the damaged SKU. (Version not found)

allowShort

Boolean

If the lineItem accepts partial deliveries. (Version not found)

udfs

LineItemUDF

User’s Defined Fields associated to LineItem. (Version not found)

unitTaxSize1

Double(22)

LineItem tax unit value for size1.(Version not found)

unitTaxSize2

Double(22)

LineItem tax unit value for size2.(Version not found)

unitTaxSize3

Double(22)

LineItem tax unit value for size3.(Version not found)

unitDiscountSize1

Double(22)

The discount unit value for LineItem size1.(Version not found)

unitDiscountSize2

Double(22)

The discount unit value for LineItem size2.(Version not found)

unitDiscountSize3

Double(22)

The discount unit value for LineItem size3.(Version not found)

totalTax

Double(22)

Total tax amount of LineItem. Amount used for payment consolidation. (Driver or document generation in GM-Driver). (Version not found)

totalDiscount

Double(22)

Total LineItem Discount Amount.(Version not found)

disregardInStock

Boolean

Indicates whether LineItem will be disregarded from inventory when starting the Route.(Version not found)

JSON Example
{
  "lineItemID" : "e065a709-66fe-48e4-b",
  "order" : {
    "id" : 10220,
    "stop" : {
      "id" : 10320,
      "key" : "e065a709-66fe-48e4-b",
      "route" : {
        "id" : 10373,
        "organization" : {
          "id" : 10381
        },
        "key" : "e065a709-66fe-48e4-b",
        "date" : "2023-10-19",
        "description" : "Sample Route Doc",
        "origin" : {
          "id" : 10334,
          "organization" : {
            "id" : 10381
          },
          "key" : "e065a709-66fe-48e4-b_O",
          "locationType" : {
            "id" : 10334,
            "organization" : {
              "id" : 10381
            },
            "key" : "e065a709-66fe-48e4-b_OLocTypeDoc",
            "description" : "Sample LocationType",
            "enabled" : true
          },
          "description" : "Location - Description Sample",
          "city" : "FortalezaDoc",
          "state" : "Ceará",
          "country" : "BR",
          "longitude" : -38.46933,
          "latitude" : -3.734536,
          "phone1" : "+55 (85) 9 9988-7766",
          "phone1Type" : "3",
          "email" : "example.greenmile@gogreen.com",
          "deliveryInstructions" : "Sample Delivery Instructions.",
          "deliveryRadius" : 20,
          "hasGeofence" : false,
          "creditLimit" : 1000,
          "legalName" : "Location's Legal Name"
        },
        "origLatitude" : -3.734536,
        "origLongitude" : -38.46933,
        "destination" : {
          "id" : 10335,
          "organization" : {
            "id" : 10381
          },
          "key" : "e065a709-66fe-48e4-b_D",
          "locationType" : {
            "id" : 10335,
            "organization" : {
              "id" : 10381
            },
            "key" : "e065a709-66fe-48e4-b_DLocTypeDoc",
            "description" : "Sample LocationType",
            "enabled" : true
          },
          "description" : "Location - Description Sample",
          "city" : "FortalezaDoc",
          "state" : "Ceará",
          "country" : "BR",
          "longitude" : -38.46933,
          "latitude" : -3.734536,
          "phone1" : "+55 (85) 9 9988-7766",
          "phone1Type" : "3",
          "email" : "example.greenmile@gogreen.com",
          "deliveryInstructions" : "Sample Delivery Instructions.",
          "deliveryRadius" : 20,
          "hasGeofence" : false,
          "creditLimit" : 1000,
          "legalName" : "Location's Legal Name"
        },
        "destLatitude" : -3.734536,
        "destLongitude" : -38.46933,
        "lastStopIsDestination" : false,
        "plannedArrival" : "2023-10-19T13:33:03+0000",
        "plannedDeparture" : "2023-10-19T13:33:03+0000",
        "plannedComplete" : "2023-10-19T13:33:03+0000",
        "plannedStart" : "2023-10-19T13:33:03+0000",
        "hasHelper" : false,
        "plannedServiceTime" : 0,
        "onRoute" : false
      },
      "plannedSequenceNum" : 1,
      "stopType" : {
        "id" : 10300
      },
      "baseLineArrival" : "2023-10-19T13:33:02Z",
      "plannedArrival" : "2023-10-19T13:33:02Z",
      "projectedArrival" : "2023-10-19T13:33:02Z",
      "plannedService" : "2023-10-19T13:33:02Z",
      "projectedService" : "2023-10-19T13:33:02Z",
      "baseLineDeparture" : "2023-10-19T13:33:02Z",
      "plannedDeparture" : "2023-10-19T13:33:02Z",
      "projectedDeparture" : "2023-10-19T13:33:02Z",
      "plannedDistance" : 1234567.0,
      "projectedDistance" : 1234567.0,
      "instructions" : "Stop instructions",
      "bulkArriveCanceled" : false,
      "plannedServiceTime" : 0
    },
    "number" : "e065a709-66fe-48e4-b",
    "plannedSize1" : 11.2,
    "plannedSize2" : 14.6,
    "plannedSize3" : 37.5,
    "baselineSize1" : 3.4,
    "baselineSize2" : 6.9,
    "baselineSize3" : 34.5,
    "actualSize1" : 23.2,
    "actualSize2" : 26.2,
    "actualSize3" : 21.2,
    "plannedPickupSize1" : 12.3,
    "plannedPickupSize2" : 11.2,
    "plannedPickupSize3" : 34.2,
    "actualPickupSize1" : 12.3,
    "actualPickupSize2" : 11.2,
    "actualPickupSize3" : 34.2,
    "damagedSize1" : 1.4,
    "damagedSize2" : 4.2,
    "damagedSize3" : 5.7,
    "specialInstructions" : "Special Instructions Sample.",
    "beginDate" : "2023-10-19T13:33:04Z",
    "endDate" : "2023-10-19T13:33:04Z",
    "hasPicture" : false,
    "allowShort" : false,
    "newOrder" : false
  },
  "sku" : {
    "id" : 10202
  },
  "plannedSize1" : 1.0,
  "plannedSize2" : 2.0,
  "plannedSize3" : 3.0,
  "plannedPickupSize1" : 1.0,
  "plannedPickupSize2" : 2.0,
  "plannedPickupSize3" : 3.0,
  "damagedSize1" : 1.0,
  "damagedSize2" : 2.0,
  "damagedSize3" : 0.0,
  "deliveryReasonCode" : {
    "id" : 10020,
    "organization" : {
      "id" : 10381
    },
    "key" : "e065a709-66fe-48e4-b",
    "description" : "Sample Reason Code",
    "delivery" : true,
    "over" : true,
    "shorts" : true,
    "damaged" : true,
    "pickup" : true,
    "enabled" : true,
    "reasonCodeType" : "D"
  },
  "overReasonCode" : {
    "id" : 10020,
    "organization" : {
      "id" : 10381
    },
    "key" : "e065a709-66fe-48e4-b",
    "description" : "Sample Reason Code",
    "delivery" : true,
    "over" : true,
    "shorts" : true,
    "damaged" : true,
    "pickup" : true,
    "enabled" : true,
    "reasonCodeType" : "D"
  },
  "shortReasonCode" : {
    "id" : 10020,
    "organization" : {
      "id" : 10381
    },
    "key" : "e065a709-66fe-48e4-b",
    "description" : "Sample Reason Code",
    "delivery" : true,
    "over" : true,
    "shorts" : true,
    "damaged" : true,
    "pickup" : true,
    "enabled" : true,
    "reasonCodeType" : "D"
  },
  "damagedReasonCode" : {
    "id" : 10020,
    "organization" : {
      "id" : 10381
    },
    "key" : "e065a709-66fe-48e4-b",
    "description" : "Sample Reason Code",
    "delivery" : true,
    "over" : true,
    "shorts" : true,
    "damaged" : true,
    "pickup" : true,
    "enabled" : true,
    "reasonCodeType" : "D"
  },
  "hasPicture" : false,
  "unitPrice" : 145.0,
  "bonusKey" : "BONUS 12345",
  "unitTaxSize1" : 5.0,
  "unitTaxSize2" : 10.0,
  "unitTaxSize3" : 20.0,
  "totalTax" : 30.0,
  "unitDiscountSize1" : 3.0,
  "unitDiscountSize2" : 6.0,
  "unitDiscountSize3" : 12.0,
  "totalDiscount" : 20.0
}

LineItemUDF

Represents a user defiened filed within a LineItem.

API Entity Name : LineItemUDF
This entity is created when a LineItem has udfs.

The example below shows how it is included in a LineItem. The udfs attribute is a list of LineItemUDFs.
Table 70. Attributes
Path Type Description Mandatory Natural ID

id

Integer(22)

The entity’s auto-increment id.

lineItemID

String(45)

The unique database key associated with the specific LineItem template being defined. (Version not found)

Yes

sku

Sku

The SKU to which the LineItem belongs. (Version not found)

Yes

plannedSize1

Double(22)

Planned amount of products that will be delivered in size1. (Version not found)

Yes

plannedSize2

Double(22)

Planned amount of products that will be delivered in size2. (Version not found)

plannedSize3

Double(22)

Planned amount of products that will be delivered in size3. (Version not found)

order

Order

The Order to which the LineItem belongs. (Version not found)

key

String

The key used to identify the entity. (Version not found)

lastModifier

[LastModifier]

Last User who changed the entity. (Version not found)

updateTime

Date

The moment of the last update of the entity. (Version not found)

plannedPickupSize1

Double(22)

Planned pickup size for size1. (Version not found)

plannedPickupSize2

Double(22)

Planned pickup size for size2. (Version not found)

plannedPickupSize3

Double(22)

Planned pickup size for size3. (Version not found)

damagedSize1

Double(22)

Quantity of damaged products for size1. (Version not found)

damagedSize2

Double(22)

Quantity of damaged products for size2. (Version not found)

damagedSize3

Double(22)

Quantity of damaged products for size3. (Version not found)

deliveryReasonCode

ReasonCode

Displays a reason for delivering within GreenMile Driver while at stop. (Version not found)

overReasonCode

ReasonCode

Displays a positive amount of product and be displayed as an overage in the system. (Version not found)

shortReasonCode

ReasonCode

Displays a negative amount of product and be displayed as a short in the system. (Version not found)

damagedReasonCode

ReasonCode

Displays a negative amount of product and be displayed as a damaged amount in the system. (Version not found)

pickupReasonCode

ReasonCode

Displays a positive amount of product and be displayed as a pickup in the system. (Version not found)

actualSize1

Double(22)

Actual amount of products that were delivered in size1. (Version not found)

actualSize2

Double(22)

Actual amount of products that were delivered in size2. (Version not found)

actualSize3

Double(22)

Actual amount of products that were delivered in size3. (Version not found)

actualPickupSize1

Double(22)

Actual amount of withdrawal size for size 1. (Version not found)

actualPickupSize2

Double(22)

Actual amount of withdrawal size for size 2. (Version not found)

actualPickupSize3

Double(22)

Actual amount of withdrawal size for size 3. (Version not found)

size1AliasConfig

SizeAlias

Represents the size1 associated with the lineItem. (Version not found)

size2AliasConfig

SizeAlias

Represents the size2 associated with the lineItem. (Version not found)

size3AliasConfig

SizeAlias

Represents the size3 associated with the lineItem. (Version not found)

hasPicture

boolean

Indicates if the LineItem has any photos.(Version not found)

boxKey

String(45)

Key of the box representing the lineItem. (Version not found)

unitPrice

Float(22)

LineItem unit price. (Version not found)

totalPrice

Float(22)

LineItem total price. (Version not found)

bonusKey

String(45)

Represents the key of the promotional code. (Version not found)

damagedSku

Sku

Represents the damaged SKU. (Version not found)

allowShort

Boolean

If the lineItem accepts partial deliveries. (Version not found)

udfs

LineItemUDF

User’s Defined Fields associated to LineItem. (Version not found)

unitTaxSize1

Double(22)

LineItem tax unit value for size1.(Version not found)

unitTaxSize2

Double(22)

LineItem tax unit value for size2.(Version not found)

unitTaxSize3

Double(22)

LineItem tax unit value for size3.(Version not found)

unitDiscountSize1

Double(22)

The discount unit value for LineItem size1.(Version not found)

unitDiscountSize2

Double(22)

The discount unit value for LineItem size2.(Version not found)

unitDiscountSize3

Double(22)

The discount unit value for LineItem size3.(Version not found)

totalTax

Double(22)

Total tax amount of LineItem. Amount used for payment consolidation. (Driver or document generation in GM-Driver). (Version not found)

totalDiscount

Double(22)

Total LineItem Discount Amount.(Version not found)

disregardInStock

Boolean

Indicates whether LineItem will be disregarded from inventory when starting the Route.(Version not found)

JSON Example
{
  "lineItemID" : "ebdc839d-c0fa-4af9-b",
  "order" : {
    "id" : 10242,
    "stop" : {
      "id" : 10344,
      "key" : "ebdc839d-c0fa-4af9-b",
      "route" : {
        "id" : 10383,
        "organization" : {
          "id" : 10410
        },
        "key" : "ebdc839d-c0fa-4af9-b",
        "date" : "2023-10-19",
        "description" : "Sample Route Doc",
        "origin" : {
          "id" : 10354,
          "organization" : {
            "id" : 10410
          },
          "key" : "ebdc839d-c0fa-4af9-b_O",
          "locationType" : {
            "id" : 10354,
            "organization" : {
              "id" : 10410
            },
            "key" : "ebdc839d-c0fa-4af9-b_OLocTypeDoc",
            "description" : "Sample LocationType",
            "enabled" : true
          },
          "description" : "Location - Description Sample",
          "city" : "FortalezaDoc",
          "state" : "Ceará",
          "country" : "BR",
          "longitude" : -38.46933,
          "latitude" : -3.734536,
          "phone1" : "+55 (85) 9 9988-7766",
          "phone1Type" : "3",
          "email" : "example.greenmile@gogreen.com",
          "deliveryInstructions" : "Sample Delivery Instructions.",
          "deliveryRadius" : 20,
          "hasGeofence" : false,
          "creditLimit" : 1000,
          "legalName" : "Location's Legal Name"
        },
        "origLatitude" : -3.734536,
        "origLongitude" : -38.46933,
        "destination" : {
          "id" : 10355,
          "organization" : {
            "id" : 10410
          },
          "key" : "ebdc839d-c0fa-4af9-b_D",
          "locationType" : {
            "id" : 10355,
            "organization" : {
              "id" : 10410
            },
            "key" : "ebdc839d-c0fa-4af9-b_DLocTypeDoc",
            "description" : "Sample LocationType",
            "enabled" : true
          },
          "description" : "Location - Description Sample",
          "city" : "FortalezaDoc",
          "state" : "Ceará",
          "country" : "BR",
          "longitude" : -38.46933,
          "latitude" : -3.734536,
          "phone1" : "+55 (85) 9 9988-7766",
          "phone1Type" : "3",
          "email" : "example.greenmile@gogreen.com",
          "deliveryInstructions" : "Sample Delivery Instructions.",
          "deliveryRadius" : 20,
          "hasGeofence" : false,
          "creditLimit" : 1000,
          "legalName" : "Location's Legal Name"
        },
        "destLatitude" : -3.734536,
        "destLongitude" : -38.46933,
        "lastStopIsDestination" : false,
        "plannedArrival" : "2023-10-19T13:34:31+0000",
        "plannedDeparture" : "2023-10-19T13:34:31+0000",
        "plannedComplete" : "2023-10-19T13:34:31+0000",
        "plannedStart" : "2023-10-19T13:34:31+0000",
        "hasHelper" : false,
        "plannedServiceTime" : 0,
        "onRoute" : false
      },
      "plannedSequenceNum" : 1,
      "stopType" : {
        "id" : 10324
      },
      "baseLineArrival" : "2023-10-19T13:34:31Z",
      "plannedArrival" : "2023-10-19T13:34:31Z",
      "projectedArrival" : "2023-10-19T13:34:31Z",
      "plannedService" : "2023-10-19T13:34:31Z",
      "projectedService" : "2023-10-19T13:34:31Z",
      "baseLineDeparture" : "2023-10-19T13:34:31Z",
      "plannedDeparture" : "2023-10-19T13:34:31Z",
      "projectedDeparture" : "2023-10-19T13:34:31Z",
      "plannedDistance" : 1234567.0,
      "projectedDistance" : 1234567.0,
      "instructions" : "Stop instructions",
      "bulkArriveCanceled" : false,
      "plannedServiceTime" : 0
    },
    "number" : "ebdc839d-c0fa-4af9-b",
    "plannedSize1" : 11.2,
    "plannedSize2" : 14.6,
    "plannedSize3" : 37.5,
    "baselineSize1" : 3.4,
    "baselineSize2" : 6.9,
    "baselineSize3" : 34.5,
    "actualSize1" : 23.2,
    "actualSize2" : 26.2,
    "actualSize3" : 21.2,
    "plannedPickupSize1" : 12.3,
    "plannedPickupSize2" : 11.2,
    "plannedPickupSize3" : 34.2,
    "actualPickupSize1" : 12.3,
    "actualPickupSize2" : 11.2,
    "actualPickupSize3" : 34.2,
    "damagedSize1" : 1.4,
    "damagedSize2" : 4.2,
    "damagedSize3" : 5.7,
    "specialInstructions" : "Special Instructions Sample.",
    "beginDate" : "2023-10-19T13:34:32Z",
    "endDate" : "2023-10-19T13:34:32Z",
    "hasPicture" : false,
    "allowShort" : false,
    "newOrder" : false
  },
  "sku" : {
    "id" : 10242
  },
  "plannedSize1" : 1.0,
  "plannedSize2" : 2.0,
  "plannedSize3" : 3.0,
  "plannedPickupSize1" : 1.0,
  "plannedPickupSize2" : 2.0,
  "plannedPickupSize3" : 3.0,
  "damagedSize1" : 1.0,
  "damagedSize2" : 2.0,
  "damagedSize3" : 0.0,
  "deliveryReasonCode" : {
    "id" : 10040,
    "organization" : {
      "id" : 10410
    },
    "key" : "ebdc839d-c0fa-4af9-b",
    "description" : "Sample Reason Code",
    "delivery" : true,
    "over" : true,
    "shorts" : true,
    "damaged" : true,
    "pickup" : true,
    "enabled" : true,
    "reasonCodeType" : "D"
  },
  "overReasonCode" : {
    "id" : 10040,
    "organization" : {
      "id" : 10410
    },
    "key" : "ebdc839d-c0fa-4af9-b",
    "description" : "Sample Reason Code",
    "delivery" : true,
    "over" : true,
    "shorts" : true,
    "damaged" : true,
    "pickup" : true,
    "enabled" : true,
    "reasonCodeType" : "D"
  },
  "shortReasonCode" : {
    "id" : 10040,
    "organization" : {
      "id" : 10410
    },
    "key" : "ebdc839d-c0fa-4af9-b",
    "description" : "Sample Reason Code",
    "delivery" : true,
    "over" : true,
    "shorts" : true,
    "damaged" : true,
    "pickup" : true,
    "enabled" : true,
    "reasonCodeType" : "D"
  },
  "damagedReasonCode" : {
    "id" : 10040,
    "organization" : {
      "id" : 10410
    },
    "key" : "ebdc839d-c0fa-4af9-b",
    "description" : "Sample Reason Code",
    "delivery" : true,
    "over" : true,
    "shorts" : true,
    "damaged" : true,
    "pickup" : true,
    "enabled" : true,
    "reasonCodeType" : "D"
  },
  "hasPicture" : false,
  "unitPrice" : 145.0,
  "bonusKey" : "BONUS 12345",
  "udfs" : [ {
    "key" : "LineItemUDFDoc",
    "value" : "UDF1"
  } ],
  "unitTaxSize1" : 5.0,
  "unitTaxSize2" : 10.0,
  "unitTaxSize3" : 20.0,
  "totalTax" : 30.0,
  "unitDiscountSize1" : 3.0,
  "unitDiscountSize2" : 6.0,
  "unitDiscountSize3" : 12.0,
  "totalDiscount" : 20.0
}

Location

Should be used to represent any Customer, Point of Interest or Account information. This information will be used to represent the route locations information like stops and depot.

API Entity Name : Location
Refer to the CRUD Services to see the details about the create, retrieve, update and delete API methods.

Beside its ID, a Location is also uniquely identifiable by the key attribute.
Table 71. Attributes
Path Type Description Mandatory Natural ID

id

Integer(22)

The entity’s auto-increment id.

key

String(45)

The unique database key associated with the specific Location template being defined.(Version not found)

Yes

Yes

organization

Organization

The organization to which the current Location template will apply.(Version not found)

Yes

Yes

locationType

LocationType

The location type associated with this location.(Version not found)

Yes

Yes

accountType

AccountType

The account type associated with this location.(Version not found)

lastModifier

[LastModifier]

Last User who changed the entity.(Version not found)

locationOverrideTimeWindows

LocationOverrideTimeWindow

Indicates the time window type specific for that customer (What time opens and closes).(Version not found)

serviceTimeType

ServiceTimeType

Indicates the service time type for that customer.(Version not found)

timeWindowType

TimeWindowType

Indicates the time window type for that customer (What time opens and closes).(Version not found)

udfs

[LocationUDF]

User’s Defined Fields associated to Location.(Version not found)

description

String(255)

The name that will be displayed in the system for the Location.(Version not found)

taxID

String(25)

Tax identifier (CPF/CNPJ).(Version not found)

addressLine1

String(255)

The street address for the Location.(Version not found)

addressLine2

String(255)

Additional address information such as apartment.(Version not found)

city

String(45)

City of Location’s address.(Version not found)

state

String(20)

State of Location’s address.(Version not found)

zipCode

String(15)

Postal code of Location’s address.(Version not found)

district

String(45)

District of Location’s address(Version not found)

country

String(5)

Country of Location’s address.(Version not found)

longitude

Double(22)

Longitude using decimal format. (Version not found)

latitude

Double(22)

Latitude using decimal format. (Version not found)

geocodingQuality

GeocodingQuality

Quality of the geocoding information.

phone1

String(30)

Location’s phone number (1) for informational use.(Version not found)

phone1Type

String(1)

Primary phone number Valid values: 0,1,2,3,4. 0 = Work, 1 = Home, 2 = Other, 3 = Mobile, 4 = Fax(Version not found)

phone2

String(30)

Location’s phone number (2) for informational use.(Version not found)

phone2Type

String(1)

Secondary phone number type. Valid values: 0,1,2,3,4. 0 = Work, 1 = Home, 2 = Other, 3 = Mobile, 4 = Fax(Version not found)

email

String(45)

Location’s e-mail address.(Version not found)

deliveryInstructions

String(4000)

Delivery instructions.(Version not found)

deliveryDays

String(13)

Delivery days can be represented by M,T,W,R,F,S,U. Each letter represents one delivery day on the week. Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, Sunday. For example, the String "M,R" will represent the delivery days of Monday and Tuesday.(Version not found)

deliveryRadius

Integer(22)

Creates a circle around the location with the radius of the circle configured according to the number entered in miles.(Version not found)

nonHelperFixedTimeSecs

Integer(22)

Time in seconds fixed of a Non Helper.(Version not found)

nonHelperVarTimeSecs

Integer(22)

Time in seconds variable of a Non Helper.(Version not found)

helperFixedTimeSecs

Integer(22)

Time in seconds fixed of a Helper(Version not found)

helperVarTimeSecs

Integer(22)

Time in seconds variableof a Helper(Version not found)

perSize1Rate

BigDecimal(22)

Rate per Size 1.(Version not found)

fixedCost

BigDecimal(22)

Fixed Cost of Location.(Version not found)

consignees

[LocationConsignee]

Consignees of the Location. Example: manager, store assistant, employee.(Version not found)

geocodingDate

Date

Date when the location was geocoded.(Version not found)

geocodingLastCheck

Date

Date time the location geocode was checked(Version not found)

geocodingUser

User

User that geocoded the Location.(Version not found)

timeZone

TimeZone

The time zone associated with the specific Location template.(Version not found)

allowedUsers

[UserLocation]

User’s that are allowed to see this Location.(Version not found)

enabled

Boolean

Activates the Location in GreenMile to be utilized.(Version not found)

hasGeofence

Boolean

Shows if the Location has a Geofence.(Version not found)

creditLimit

BigDecimal(22)

Location credit limit.(Version not found)

legalName

String(255)

Name of the individual or entity issuing the check.(Version not found)

taxType

String(45)

Tax type charged at location.(Version not found)

appliedTax

BigDecimal(22)

The amount related to the tax charged at location.(Version not found)

locationPaymentMethods

[LocationPaymentMethod]

Allowed payment methods at location.(Version not found)

JSON Example
{
  "organization" : {
    "id" : 10476,
    "key" : "79854b7f-0d98-488f-aO",
    "description" : "Organization Rest Docs Desc",
    "city" : "São Paulo",
    "state" : "São Paulo",
    "preferedLocale" : {
      "id" : 10000
    },
    "timeZone" : {
      "id" : 10096
    },
    "unitSystem" : "METRIC"
  },
  "key" : "79854b7f-0d98-488f-aLD",
  "locationType" : {
    "id" : 10424,
    "organization" : {
      "id" : 10476,
      "key" : "79854b7f-0d98-488f-aO",
      "description" : "Organization Rest Docs Desc",
      "city" : "São Paulo",
      "state" : "São Paulo",
      "preferedLocale" : {
        "id" : 10000
      },
      "timeZone" : {
        "id" : 10096
      },
      "unitSystem" : "METRIC"
    },
    "key" : "79854b7f-0d98-488f-aLDLTD",
    "description" : "Sample LocationType",
    "enabled" : true
  },
  "description" : "Location - Description Sample",
  "city" : "FortalezaDoc",
  "state" : "Ceará",
  "country" : "BR",
  "longitude" : -38.46933,
  "latitude" : -3.734536,
  "phone1" : "+55 (85) 9 9988-7766",
  "phone1Type" : "3",
  "email" : "example.greenmile@gogreen.com",
  "deliveryInstructions" : "Sample Delivery Instructions.",
  "deliveryRadius" : 20,
  "hasGeofence" : false,
  "creditLimit" : 1000,
  "legalName" : "Location's Legal Name",
  "locationPaymentMethods" : [ {
    "location" : {
      "organization" : {
        "id" : 10476,
        "key" : "79854b7f-0d98-488f-aO",
        "description" : "Organization Rest Docs Desc",
        "city" : "São Paulo",
        "state" : "São Paulo",
        "preferedLocale" : {
          "id" : 10000
        },
        "timeZone" : {
          "id" : 10096
        },
        "unitSystem" : "METRIC"
      },
      "key" : "79854b7f-0d98-488f-aLD",
      "locationType" : {
        "id" : 10424,
        "organization" : {
          "id" : 10476,
          "key" : "79854b7f-0d98-488f-aO",
          "description" : "Organization Rest Docs Desc",
          "city" : "São Paulo",
          "state" : "São Paulo",
          "preferedLocale" : {
            "id" : 10000
          },
          "timeZone" : {
            "id" : 10096
          },
          "unitSystem" : "METRIC"
        },
        "key" : "79854b7f-0d98-488f-aLDLTD",
        "description" : "Sample LocationType",
        "enabled" : true
      },
      "description" : "Location - Description Sample",
      "city" : "FortalezaDoc",
      "state" : "Ceará",
      "country" : "BR",
      "longitude" : -38.46933,
      "latitude" : -3.734536,
      "phone1" : "+55 (85) 9 9988-7766",
      "phone1Type" : "3",
      "email" : "example.greenmile@gogreen.com",
      "deliveryInstructions" : "Sample Delivery Instructions.",
      "deliveryRadius" : 20,
      "hasGeofence" : false,
      "creditLimit" : 1000,
      "legalName" : "Location's Legal Name",
      "alternativeKey" : "79854b7f-0d98-488f-aLD79854b7f-0d98-488f-aLDLTD79854b7f-0d98-488f-aO79854b7f-0d98-488f-aO"
    },
    "paymentMethod" : {
      "id" : 10045,
      "organization" : {
        "id" : 10476,
        "key" : "79854b7f-0d98-488f-aO",
        "description" : "Organization Rest Docs Desc",
        "city" : "São Paulo",
        "state" : "São Paulo",
        "preferedLocale" : {
          "id" : 10000
        },
        "timeZone" : {
          "id" : 10096
        },
        "unitSystem" : "METRIC"
      },
      "key" : "79854b7f-0d98-488f-aLDLC",
      "description" : "PaymentMethod Sample",
      "enabled" : true,
      "allowPendingPayment" : false,
      "askPaymentDocument" : "y",
      "documentSize" : 32,
      "numberOfDays" : 3,
      "documentMask" : "Mask"
    },
    "limit" : 2000
  } ]
}

LocationType

Represents a type of Location.

API Entity Name : LocationType
Refer to the CRUD Services to see the details about the create, retrieve, update and delete API methods.

Beside its ID, a LocationType is also uniquely identifiable by the key attribute.
Table 72. Attributes
Path Type Description Mandatory Natural ID

id

Integer(22)

The entity’s auto-increment id.

key

String(255)

LocationType’s key(Version not found)

Yes

Yes

organization

Organization

The organization to which the current Location Type template will apply.(Version not found)

Yes

Yes

description

String(45)

The name that will be displayed in the system for the Location Type.(Version not found)

Yes

enabled

Boolean

Activates the Location Type in GreenMile to allow them to log into the system.(Version not found)

Yes

showOnMobileCreate

Boolean

Allows the Location Type to be chosen in GreenMile Driver.(Version not found)

JSON Example
{
  "organization" : {
    "id" : 10469
  },
  "key" : "d0888437-037c-4767-9",
  "description" : "Sample LocationType",
  "enabled" : true
}

LocationOverrideTimeWindow

Represents a Location Override Time Window.
location-override-time-window.png

API Entity Name : LocationOverrideTimeWindow
Refer to the CRUD Services to see the details about the create, retrieve, update and delete API methods.

Beside its ID, a LocationOverrideTimeWindow is also uniquely identifiable by the key attribute.
Table 73. Attributes
Path Type Description Mandatory Natural ID

id

Integer(22)

The entity’s auto-increment id.

id

Integer(22)

The entity’s auto-increment id.

openTime

String

Represents the opening time of the place.(Version not found)

Yes

closeTime

String

Represents the closing time of the place.(Version not found)

Yes

tw1Open

String

Represents the start time of the first service window.(Version not found)

Yes

tw1Close

String

Represents the end time of the first service window.(Version not found)

Yes

location

Location

Represents the location to which LocationOverrideTimeWindow belongs.(Version not found)

Yes

tw2Open

String

Represents the start time of second service window.(Version not found)

tw2Close

String

Represents the end time of second service window.(Version not found)

monday

Boolean

Allows you to receive deliveries on Mondays.(Version not found)

tuesday

Boolean

Allows you to receive deliveries on Tuesdays.(Version not found)

wednesday

Boolean

Allows you to receive deliveries on Wednesdays.(Version not found)

thursday

Boolean

Allows you to receive deliveries on Thursdays.(Version not found)

friday

Boolean

Allows you to receive deliveries on Fridays.(Version not found)

saturday

Boolean

Allows you to receive deliveries on Saturdays.(Version not found)

sunday

Boolean

Allows you to receive deliveries on Sundays.(Version not found)

JSON Example
{
  "openTime" : "07:00",
  "closeTime" : "18:00",
  "tw1Open" : "05:00",
  "tw1Close" : "06:00",
  "tw2Open" : "16:00",
  "tw2Close" : "19:00",
  "monday" : true,
  "tuesday" : false,
  "wednesday" : true,
  "thursday" : false,
  "friday" : true,
  "saturday" : true,
  "sunday" : false,
  "location" : {
    "id" : 10415
  }
}

Order

Represents an order to be delivered on a Stop.

API Entity Name : Order
Refer to the CRUD Services to see the details about the create, retrieve, update and delete API methods.

Beside its ID, an Order is also uniquely identifiable by the number attribute.
Table 74. Attributes
Path Type Description Mandatory Natural ID

id

Integer(22)

The entity’s auto-increment id.

number

String(45)

The order number.(Version not found)

Yes

stop

Stop

The stop to which the order belongs.(Version not found)

lineItems

LineItem

Represents a list of items within an order.(Version not found)

plannedSize1

Double(22)

Planned amount of product that will be delivered on size1.(Version not found)

plannedSize2

Double(22)

Planned amount of product that will be delivered on size2.(Version not found)

plannedSize3

Double(22)

Planned amount of product that will be delivered on size3.(Version not found)

actualSize1

Double(22)

Actual amount of product that will be delivered on size1.(Version not found)

actualSize2

Double(22)

Actual amount of product that will be delivered on size2.(Version not found)

actualSize3

Double(22)

Actual amount of product that will be delivered on size3.(Version not found)

plannedPickupSize1

Double(22)

Planned pickup size for size1. (Version not found)

plannedPickupSize2

Double(22)

Planned pickup size for size2. (Version not found)

plannedPickupSize3

Double(22)

Planned pickup size for size3. (Version not found)

actualPickupSize1

Double(22)

Actual amount of withdrawal size for size 1. (Version not found)

actualPickupSize2

Double(22)

Actual amount of withdrawal size for size 2. (Version not found)

actualPickupSize3

Double(22)

Actual amount of withdrawal size for size 3. (Version not found)

damagedSize1

Double(22)

Quantity of damaged products for size1. (Version not found)

damagedSize2

Double(22)

Quantity of damaged products for size2. (Version not found)

damagedSize3

Double(22)

Quantity of damaged products for size3. (Version not found)

specialInstructions

String(4000)

Text describing any special instructions for this order. (Version not found)

selector

String

(Deprecated). (Version not found)

beginDate

Date

The initial period of delivery of the order. (Version not found)

endDate

Date

The final period of delivery of the order. (Version not found)

udfs

OrderUDF

User’s Defined Fields associated to Order. (Version not found)

deliveryReasonCode

ReasonCode

Displays a reason for delivering within GreenMile Driver while at stop. (Version not found)

overReasonCode

ReasonCode

Displays a positive amount of product and be displayed as an overage in the system. (Version not found)

shortReasonCode

ReasonCode

Displays a negative amount of product and be displayed as a short in the system. (Version not found)

damagedReasonCode

ReasonCode

Displays a negative amount of product and be displayed as a damaged amount in the system. (Version not found)

pickupReasonCode

ReasonCode

Displays a positive amount of product and be displayed as a pickup in the system. (Version not found)

hasPicture

boolean

Indicates if the Order has any picture. (Version not found)

salesMan

User

The Seller of this Order. (Version not found)

baselineSize1

Double(22)

Initial quantity of products to be delivered in size1. (Version not found)

baselineSize2

Double(22)

Initial quantity of products to be delivered in size2. (Version not found)

baselineSize3

Double(22)

Initial quantity of products to be delivered in size3. (Version not found)

paymentMethod

PaymentMethod

Method of payment of the order. (Version not found)

size1AliasConfig

SizeAlias

Represents the size1 associated with the lineItem. (Version not found)

size2AliasConfig

SizeAlias

Represents the size2 associated with the lineItem. (Version not found)

size3AliasConfig

SizeAlias

Represents the size3 associated with the lineItem. (Version not found)

allowShort

Boolean

If the order accepts partial deliveries. (Version not found)

newOrder

Boolean

Indicates whether the Order was created manually. (Version not found)

orderClass

OrderClass

The type of order being delivered. (Version not found)

orderPayments

List<OrderPayments>

Represents a list of orderPayments(Version not found)

orderInvoices

List<OrderInvoices>

Represents a list of orderInvoices(Version not found)

key

String(45)

Order’s key(Version not found)

payments

[Payment]

Represents a list of payments(Version not found)

pendingOrder

PendingOrder

Represents a PendingOrder(Version not found)

lastModifier

[LastModifier]

Last User who changed the entity. (Version not found)

updateTime

Date

The moment of the last update of the entity. (Version not found)

plannedPaymentMethod

PaymentMethod

Is the payment method that was planned for that order.(Version not found)

relatedOrder

Order

It is the related Order of that Order(Version not found)

defaultReturnablesAction

DefaultReturnablesAction

Devine if the default will be pick up or deliver(Version not found)

JSON Example
{
  "stop" : {
    "id" : 10380,
    "key" : "e59fdce3-f538-4003-9OD",
    "route" : {
      "id" : 10420,
      "organization" : {
        "id" : 10486,
        "key" : "e59fdce3-f538-4003-9O",
        "description" : "Organization Rest Docs Desc",
        "city" : "São Paulo",
        "state" : "São Paulo",
        "preferedLocale" : {
          "id" : 10000
        },
        "timeZone" : {
          "id" : 10096
        },
        "unitSystem" : "METRIC"
      },
      "key" : "e59fdce3-f538-4003-9OD",
      "date" : "2023-10-19",
      "description" : "Sample Route Doc",
      "origin" : {
        "id" : 10437,
        "organization" : {
          "id" : 10486,
          "key" : "e59fdce3-f538-4003-9O",
          "description" : "Organization Rest Docs Desc",
          "city" : "São Paulo",
          "state" : "São Paulo",
          "preferedLocale" : {
            "id" : 10000
          },
          "timeZone" : {
            "id" : 10096
          },
          "unitSystem" : "METRIC"
        },
        "key" : "e59fdce3-f538-4003-9OD_O",
        "locationType" : {
          "id" : 10431,
          "organization" : {
            "id" : 10486,
            "key" : "e59fdce3-f538-4003-9O",
            "description" : "Organization Rest Docs Desc",
            "city" : "São Paulo",
            "state" : "São Paulo",
            "preferedLocale" : {
              "id" : 10000
            },
            "timeZone" : {
              "id" : 10096
            },
            "unitSystem" : "METRIC"
          },
          "key" : "e59fdce3-f538-4003-9OD_OLocTypeDoc",
          "description" : "Sample LocationType",
          "enabled" : true
        },
        "description" : "Location - Description Sample",
        "city" : "FortalezaDoc",
        "state" : "Ceará",
        "country" : "BR",
        "longitude" : -38.46933,
        "latitude" : -3.734536,
        "phone1" : "+55 (85) 9 9988-7766",
        "phone1Type" : "3",
        "email" : "example.greenmile@gogreen.com",
        "deliveryInstructions" : "Sample Delivery Instructions.",
        "deliveryRadius" : 20,
        "hasGeofence" : false,
        "creditLimit" : 1000,
        "legalName" : "Location's Legal Name"
      },
      "origLatitude" : -3.734536,
      "origLongitude" : -38.46933,
      "destination" : {
        "id" : 10438,
        "organization" : {
          "id" : 10486,
          "key" : "e59fdce3-f538-4003-9O",
          "description" : "Organization Rest Docs Desc",
          "city" : "São Paulo",
          "state" : "São Paulo",
          "preferedLocale" : {
            "id" : 10000
          },
          "timeZone" : {
            "id" : 10096
          },
          "unitSystem" : "METRIC"
        },
        "key" : "e59fdce3-f538-4003-9OD_D",
        "locationType" : {
          "id" : 10432,
          "organization" : {
            "id" : 10486,
            "key" : "e59fdce3-f538-4003-9O",
            "description" : "Organization Rest Docs Desc",
            "city" : "São Paulo",
            "state" : "São Paulo",
            "preferedLocale" : {
              "id" : 10000
            },
            "timeZone" : {
              "id" : 10096
            },
            "unitSystem" : "METRIC"
          },
          "key" : "e59fdce3-f538-4003-9OD_DLocTypeDoc",
          "description" : "Sample LocationType",
          "enabled" : true
        },
        "description" : "Location - Description Sample",
        "city" : "FortalezaDoc",
        "state" : "Ceará",
        "country" : "BR",
        "longitude" : -38.46933,
        "latitude" : -3.734536,
        "phone1" : "+55 (85) 9 9988-7766",
        "phone1Type" : "3",
        "email" : "example.greenmile@gogreen.com",
        "deliveryInstructions" : "Sample Delivery Instructions.",
        "deliveryRadius" : 20,
        "hasGeofence" : false,
        "creditLimit" : 1000,
        "legalName" : "Location's Legal Name"
      },
      "destLatitude" : -3.734536,
      "destLongitude" : -38.46933,
      "lastStopIsDestination" : false,
      "plannedArrival" : "2023-10-19T13:38:05+0000",
      "plannedDeparture" : "2023-10-19T13:38:05+0000",
      "plannedComplete" : "2023-10-19T13:38:05+0000",
      "plannedStart" : "2023-10-19T13:38:05+0000",
      "hasHelper" : false,
      "plannedServiceTime" : 0,
      "onRoute" : false
    },
    "plannedSequenceNum" : 1,
    "stopType" : {
      "id" : 10360
    },
    "baseLineArrival" : "2023-10-19T13:38:04Z",
    "plannedArrival" : "2023-10-19T13:38:04Z",
    "projectedArrival" : "2023-10-19T13:38:04Z",
    "plannedService" : "2023-10-19T13:38:04Z",
    "projectedService" : "2023-10-19T13:38:04Z",
    "baseLineDeparture" : "2023-10-19T13:38:04Z",
    "plannedDeparture" : "2023-10-19T13:38:04Z",
    "projectedDeparture" : "2023-10-19T13:38:04Z",
    "plannedDistance" : 1234567.0,
    "projectedDistance" : 1234567.0,
    "instructions" : "Stop instructions",
    "bulkArriveCanceled" : false,
    "plannedServiceTime" : 0
  },
  "number" : "e59fdce3-f538-4003-9OD",
  "plannedSize1" : 11.2,
  "plannedSize2" : 14.6,
  "plannedSize3" : 37.5,
  "baselineSize1" : 3.4,
  "baselineSize2" : 6.9,
  "baselineSize3" : 34.5,
  "actualSize1" : 23.2,
  "actualSize2" : 26.2,
  "actualSize3" : 21.2,
  "plannedPickupSize1" : 12.3,
  "plannedPickupSize2" : 11.2,
  "plannedPickupSize3" : 34.2,
  "actualPickupSize1" : 12.3,
  "actualPickupSize2" : 11.2,
  "actualPickupSize3" : 34.2,
  "damagedSize1" : 1.4,
  "damagedSize2" : 4.2,
  "damagedSize3" : 5.7,
  "specialInstructions" : "Special Instructions Sample.",
  "beginDate" : "2023-10-19T13:38:05Z",
  "endDate" : "2023-10-19T13:38:05Z",
  "hasPicture" : false,
  "allowShort" : false,
  "newOrder" : false
}

OrderClass

The type of order being delivered.

API Entity Name : OrderClass
Refer to the CRUD Services to see the details about the create, retrieve, update and delete API methods.

Beside its ID, an OrderClass is also uniquely identifiable by the number attribute.
Table 75. Attributes
Path Type Description Mandatory Natural ID

id

Integer(22)

The entity’s auto-increment id.

key

String(45)

OrderClass’s key. (Version not found)

Yes

Yes

description

String(255)

The name that will be displayed in the system for the OrderClass. (Version not found)

Yes

organization

Organization

The organization to which the current OrderClass belongs. (Version not found)

Yes

Yes

enabled

Boolean

If orderClass is active. (Version not found)

Yes

pickup

Boolean

If the order class is of pickup type.(Version not found)

Yes

allowNewOrder

Boolean

If it is allowed to create a new order.(Version not found)

Yes

allDamaged

Boolean

if the order class is of damage type.(Version not found)

Yes

allowedLocationTypes

[AllowedLocationType]

Location Types allowed to create an order with that order class(Version not found)

Yes

allowedSkuTypes

[AllowedSkuType]

Location Types allowed to create an order with that order class(Version not found)

Yes

useConsignedSku

Boolean

Identifies the origin and quantity of skus that can be added to the order with this orderclass, in this case restricting the list and quantity of skus consigned on the route(Version not found)

Yes

allowedOrderSizes

[AllowedOrderSize]

Restrict the quantity of each size for each sku added to the order with this orderclass(Version not found)

Yes

JSON Example
{
  "organization" : {
    "id" : 10369
  },
  "key" : "2da4fb82-acbb-4ee5-a",
  "description" : "Sample OrderClass",
  "enabled" : true,
  "pickup" : false,
  "allowNewOrder" : false,
  "allDamaged" : false,
  "useConsignedSku" : false
}

OrderUDF

Represents a user defined field in an Order.

API Entity Name : OrderUDF

The example below shows how it is included in an Order. The udfs attribute is a list of OrderUDFs
Table 76. Attributes
Path Type Description Mandatory Natural ID

id

Integer(22)

The entity’s auto-increment id.

udfs

OrderUDF

Yes

udfs.[].key

String(45)

Key of User Defined Field.

Yes

udfs.[].value

String(255)

Value of User Defined Field.

Yes

JSON Example
{
  "stop" : {
    "id" : 10342,
    "key" : "0c478fa7-e67f-43fa-9",
    "route" : {
      "id" : 10381,
      "organization" : {
        "id" : 10402
      },
      "key" : "0c478fa7-e67f-43fa-9",
      "date" : "2023-10-19",
      "description" : "Sample Route Doc",
      "origin" : {
        "id" : 10350,
        "organization" : {
          "id" : 10402
        },
        "key" : "0c478fa7-e67f-43fa-9_O",
        "locationType" : {
          "id" : 10350,
          "organization" : {
            "id" : 10402
          },
          "key" : "0c478fa7-e67f-43fa-9_OLocTypeDoc",
          "description" : "Sample LocationType",
          "enabled" : true
        },
        "description" : "Location - Description Sample",
        "city" : "FortalezaDoc",
        "state" : "Ceará",
        "country" : "BR",
        "longitude" : -38.46933,
        "latitude" : -3.734536,
        "phone1" : "+55 (85) 9 9988-7766",
        "phone1Type" : "3",
        "email" : "example.greenmile@gogreen.com",
        "deliveryInstructions" : "Sample Delivery Instructions.",
        "deliveryRadius" : 20,
        "hasGeofence" : false,
        "creditLimit" : 1000,
        "legalName" : "Location's Legal Name"
      },
      "origLatitude" : -3.734536,
      "origLongitude" : -38.46933,
      "destination" : {
        "id" : 10351,
        "organization" : {
          "id" : 10402
        },
        "key" : "0c478fa7-e67f-43fa-9_D",
        "locationType" : {
          "id" : 10351,
          "organization" : {
            "id" : 10402
          },
          "key" : "0c478fa7-e67f-43fa-9_DLocTypeDoc",
          "description" : "Sample LocationType",
          "enabled" : true
        },
        "description" : "Location - Description Sample",
        "city" : "FortalezaDoc",
        "state" : "Ceará",
        "country" : "BR",
        "longitude" : -38.46933,
        "latitude" : -3.734536,
        "phone1" : "+55 (85) 9 9988-7766",
        "phone1Type" : "3",
        "email" : "example.greenmile@gogreen.com",
        "deliveryInstructions" : "Sample Delivery Instructions.",
        "deliveryRadius" : 20,
        "hasGeofence" : false,
        "creditLimit" : 1000,
        "legalName" : "Location's Legal Name"
      },
      "destLatitude" : -3.734536,
      "destLongitude" : -38.46933,
      "lastStopIsDestination" : false,
      "plannedArrival" : "2023-10-19T13:34:12+0000",
      "plannedDeparture" : "2023-10-19T13:34:12+0000",
      "plannedComplete" : "2023-10-19T13:34:12+0000",
      "plannedStart" : "2023-10-19T13:34:12+0000",
      "hasHelper" : false,
      "plannedServiceTime" : 0,
      "onRoute" : false
    },
    "plannedSequenceNum" : 1,
    "stopType" : {
      "id" : 10322
    },
    "baseLineArrival" : "2023-10-19T13:34:11Z",
    "plannedArrival" : "2023-10-19T13:34:11Z",
    "projectedArrival" : "2023-10-19T13:34:11Z",
    "plannedService" : "2023-10-19T13:34:11Z",
    "projectedService" : "2023-10-19T13:34:11Z",
    "baseLineDeparture" : "2023-10-19T13:34:11Z",
    "plannedDeparture" : "2023-10-19T13:34:11Z",
    "projectedDeparture" : "2023-10-19T13:34:11Z",
    "plannedDistance" : 1234567.0,
    "projectedDistance" : 1234567.0,
    "instructions" : "Stop instructions",
    "bulkArriveCanceled" : false,
    "plannedServiceTime" : 0
  },
  "number" : "0c478fa7-e67f-43fa-9",
  "plannedSize1" : 11.2,
  "plannedSize2" : 14.6,
  "plannedSize3" : 37.5,
  "baselineSize1" : 3.4,
  "baselineSize2" : 6.9,
  "baselineSize3" : 34.5,
  "actualSize1" : 23.2,
  "actualSize2" : 26.2,
  "actualSize3" : 21.2,
  "plannedPickupSize1" : 12.3,
  "plannedPickupSize2" : 11.2,
  "plannedPickupSize3" : 34.2,
  "actualPickupSize1" : 12.3,
  "actualPickupSize2" : 11.2,
  "actualPickupSize3" : 34.2,
  "damagedSize1" : 1.4,
  "damagedSize2" : 4.2,
  "damagedSize3" : 5.7,
  "specialInstructions" : "Special Instructions Sample.",
  "beginDate" : "2023-10-19T13:34:13Z",
  "endDate" : "2023-10-19T13:34:13Z",
  "udfs" : [ {
    "key" : "0c478fa7-e67f-43fa-9OrderUDFDoc",
    "value" : "orderUDF"
  } ],
  "hasPicture" : false,
  "allowShort" : false,
  "newOrder" : false
}

Organization

Depot or region containing a set of routes, drivers and equipment.

API Entity Name : Organization
Refer to the CRUD Services to see the details about the create, retrieve, update and delete API methods.

Beside its ID, an Organization is also uniquely identifiable by the key attribute.
Table 77. Attributes
Path Type Description Mandatory Natural ID

id

Integer(22)

The entity’s auto-increment id.

key

String(45)

The entity’s key.(Version not found)

Yes

Yes

description

String(45)

The entity’s description.(Version not found)

Yes

timeZone

TimeZone

Organization time zone.(Version not found)

Yes

addressLine1

String(255)

The entity’s addressLine1.(Version not found)

addressLine2

String(255)

The entity’s addressLine2.(Version not found)

city

String(45)

The entity’s city.(Version not found)

state

String(20)

The entity’s state.(Version not found)

zipcode

String(15)

The entity’s zipcode.(Version not found)

district

String(45)

The entity’s district.(Version not found)

country

String(5)

The entity’s country.(Version not found)

taxid

String(100)

The entity’s taxid.(Version not found)

listenerOrganizations

Organization

List of Organization that notified.(Version not found)

parentOrganization

Organization

Represents the parent organization.(Version not found)

preferedLocale

I18NLocale

Organization’s I18NLocale.(Version not found)

unitSystem

UnitSystem

Organization’s unit system.(Version not found)

JSON Example
{
  "id" : null,
  "creationDate" : null,
  "lastModificationDate" : null,
  "key" : "ac165dc9-e299-4b10-9513-4bb49539f194",
  "parentOrganization" : {
    "id" : 10510,
    "creationDate" : null,
    "lastModificationDate" : null,
    "key" : null,
    "parentOrganization" : null,
    "description" : null,
    "addressLine1" : null,
    "addressLine2" : null,
    "city" : null,
    "state" : null,
    "zipcode" : null,
    "district" : null,
    "country" : null,
    "taxid" : null,
    "preferedLocale" : null,
    "timeZone" : null,
    "listenerOrganizations" : null,
    "unitSystem" : null,
    "dsgOrgId" : null,
    "dsgOrganizationId" : null
  },
  "description" : "Organization Rest Docs Desc",
  "addressLine1" : null,
  "addressLine2" : null,
  "city" : "São Paulo",
  "state" : "São Paulo",
  "zipcode" : null,
  "district" : null,
  "country" : null,
  "taxid" : null,
  "preferedLocale" : {
    "id" : 10000,
    "parentLocale" : null,
    "key" : null,
    "language" : null,
    "country" : null,
    "description" : null,
    "dateFormat" : null,
    "timeFormat" : null,
    "currency" : null,
    "decimalSymbol" : null,
    "digitalGrouping" : null,
    "organizationId" : null
  },
  "timeZone" : {
    "id" : 10096,
    "description" : null,
    "rawOffsetMinutes" : null,
    "alias" : null,
    "timezoneName" : null
  },
  "listenerOrganizations" : null,
  "unitSystem" : "METRIC",
  "dsgOrgId" : null,
  "dsgOrganizationId" : null
}

PaymentMethod

Represents a paymentMethod entity.

API Entity Name : PaymentMethod
Refer to the CRUD Services to see the details about the create, retrieve, update and delete API methods.

Table 78. Attributes
Path Type Description Mandatory Natural ID

key

String(45)

PaymentMethod’s key(Version not found)

Yes

Yes

organization

Organization

Organization id. (Version not found)

Yes

Yes

description

String(255)

Description of payment method. (Version not found)

Yes

enabled

Boolean

Indicates whether it is enabled. (Version not found)

Yes

allowPendingPayment

Boolean

Allow pending payment. (Version not found)

askPaymentDocument

String(1)

(Version not found)

documentMask

String(45)

Document Mask. (Version not found)

documentSize

Integer(22)

Document Size. (Version not found)

paymentMethodsTo

PaymentMethodAllowed

List of other payment methods. (Version not found)

type

[PaymentMethodType]

Payment method type.(Version not found)

numberOfDays

Integer

Represents the number of valid days for payment method. (Version not found)

id

Integer(22)

The entity’s auto-increment id.

JSON Example
{
  "organization" : {
    "id" : 10457
  },
  "key" : "c263f64d-36e1-4743-8",
  "description" : "PaymentMethod Sample",
  "enabled" : true,
  "allowPendingPayment" : false,
  "askPaymentDocument" : "y",
  "documentSize" : 32,
  "numberOfDays" : 3,
  "documentMask" : "Mask"
}

PaymentMethodAllowed

If you wish to add a PaymentMethodAllowed, both payment methods must already be registered.

API Entity Name : PaymentMethodAllowed
Refer to the CRUD Services to see the details about the create, retrieve, update and delete API methods.

Table 79. Attributes
Path Type Description Mandatory Natural ID

paymentMethodFrom

PaymentMethod

From whom the payment method has been assigned.

Yes

Yes

paymentMethodTo

PaymentMethod

To whom the payment method is assigned.

Yes

Yes

id

Integer(22)

The entity’s auto-increment id.

JSON Example
{
  "paymentMethodFrom" : {
    "id" : 10001
  },
  "paymentMethodTo" : {
    "id" : 10000
  }
}

PendingOrder

Represents a pending order to be delivered or picked up.

API Entity Name : PendingOrder
Refer to the CRUD Services to see the details about the create, retrieve, update and delete API methods.

Beside its ID, a PendingOrder is also uniquely identifiable by the number attribute.
Table 80. Attributes
Path Type Description Mandatory Natural ID

id

Integer(22)

The entity’s auto-increment id.

number

String(45)

The Pending Order number.(Version not found)

Yes

Yes

organization

Organization

Indicates the Organization of the pending order.(Version not found)

Yes

location

Location

Location of the pending order.(Version not found)

Yes

lineItems

List<PendingLineItem>

Represents a list of items within an order.(Version not found)

plannedSize1

Double(22)

Planned amount of product that will be delivered on size1.(Version not found)

plannedSize2

Double(22)

Planned amount of product that will be delivered on size2.(Version not found)

plannedSize3

Double(22)

Planned amount of product that will be delivered on size3.(Version not found)

plannedPickupSize1

Double(22)

Planned pickup size for size1. (Version not found)

plannedPickupSize2

Double(22)

Planned pickup size for size2. (Version not found)

plannedPickupSize3

Double(22)

Planned pickup size for size3. (Version not found)

specialInstructions

String(4000)

Text describing any special instructions for this order. (Version not found)

orderType

String(8)

Enumerator describing type of the Pending Order, two values allowed: DELIVERY or PICKUP. (Version not found)

assignedBy

User

The User who assigned the Pending Order. (Version not found)

assignedDate

Date

The date when the Pending Order was assigned. (Version not found)

assignedOrder

Order

The Assigned Order. (Version not found)

priority

Integer(22)

Priority. (Version not found)

cancelledBy

User

The User who canceled this Pending Order. (Version not found)

cancelledDate

Date

The date when the Pending Order was canceled. (Version not found)

cancelCode

PendingOrderCancelCode

Cancellation Code. (Version not found)

JSON Example
{
  "id" : null,
  "creationDate" : null,
  "lastModificationDate" : null,
  "organization" : {
    "id" : 10439,
    "creationDate" : null,
    "lastModificationDate" : null,
    "key" : null,
    "parentOrganization" : null,
    "description" : null,
    "addressLine1" : null,
    "addressLine2" : null,
    "city" : null,
    "state" : null,
    "zipcode" : null,
    "district" : null,
    "country" : null,
    "taxid" : null,
    "preferedLocale" : null,
    "timeZone" : null,
    "listenerOrganizations" : null,
    "unitSystem" : null,
    "dsgOrgId" : null,
    "dsgOrganizationId" : null
  },
  "priority" : 0,
  "assignedBy" : null,
  "assignedDate" : null,
  "assignedOrder" : null,
  "cancelledBy" : null,
  "cancelledDate" : null,
  "cancelCode" : null,
  "location" : {
    "id" : 10386,
    "creationDate" : null,
    "lastModifier" : null,
    "lastModificationDate" : null,
    "organization" : {
      "id" : 10439,
      "creationDate" : null,
      "lastModificationDate" : null,
      "key" : null,
      "parentOrganization" : null,
      "description" : null,
      "addressLine1" : null,
      "addressLine2" : null,
      "city" : null,
      "state" : null,
      "zipcode" : null,
      "district" : null,
      "country" : null,
      "taxid" : null,
      "preferedLocale" : null,
      "timeZone" : null,
      "listenerOrganizations" : null,
      "unitSystem" : null,
      "dsgOrgId" : null,
      "dsgOrganizationId" : null
    },
    "key" : "8a3787a5-c186-4b3e-a",
    "accountType" : null,
    "locationType" : {
      "id" : 10386,
      "creationDate" : null,
      "lastModificationDate" : null,
      "organization" : {
        "id" : 10439,
        "creationDate" : null,
        "lastModificationDate" : null,
        "key" : null,
        "parentOrganization" : null,
        "description" : null,
        "addressLine1" : null,
        "addressLine2" : null,
        "city" : null,
        "state" : null,
        "zipcode" : null,
        "district" : null,
        "country" : null,
        "taxid" : null,
        "preferedLocale" : null,
        "timeZone" : null,
        "listenerOrganizations" : null,
        "unitSystem" : null,
        "dsgOrgId" : null,
        "dsgOrganizationId" : null
      },
      "key" : "8a3787a5-c186-4b3e-aLocTypeDoc",
      "description" : "Sample LocationType",
      "showOnMobileCreate" : null,
      "enabled" : true
    },
    "timeWindowType" : null,
    "locationOverrideTimeWindows" : null,
    "serviceTimeType" : null,
    "udfs" : null,
    "description" : "Location - Description Sample",
    "taxID" : null,
    "addressLine1" : null,
    "addressLine2" : null,
    "city" : "FortalezaDoc",
    "state" : "Ceará",
    "zipCode" : null,
    "district" : null,
    "country" : "BR",
    "longitude" : -38.46933,
    "geocodingQuality" : null,
    "latitude" : -3.734536,
    "phone1" : "+55 (85) 9 9988-7766",
    "phone1Type" : "3",
    "phone2" : null,
    "phone2Type" : null,
    "email" : "example.greenmile@gogreen.com",
    "deliveryInstructions" : "Sample Delivery Instructions.",
    "deliveryRadius" : 20,
    "expandedDeliveryRadius" : null,
    "deliveryDays" : null,
    "nonHelperFixedTimeSecs" : null,
    "nonHelperVarTimeSecs" : null,
    "helperFixedTimeSecs" : null,
    "helperVarTimeSecs" : null,
    "perSize1Rate" : null,
    "fixedCost" : null,
    "consignees" : null,
    "geocodingDate" : null,
    "geocodingLastCheck" : null,
    "geocodingUser" : null,
    "timeZone" : null,
    "geofence" : null,
    "expandedGeofence" : null,
    "allowedUsers" : null,
    "enabled" : null,
    "hasGeofence" : false,
    "creditLimit" : 1000,
    "legalName" : "Location's Legal Name",
    "taxType" : null,
    "appliedTax" : null,
    "locationPaymentMethods" : null
  },
  "number" : "8a3787a5-c186-4b3e-a",
  "lineItems" : [ ],
  "plannedSize1" : 43.98,
  "plannedSize2" : 23.98,
  "plannedSize3" : 33.98,
  "plannedPickupSize1" : 23.0,
  "plannedPickupSize2" : 13.0,
  "plannedPickupSize3" : 3.0,
  "specialInstructions" : "Do not kill the messenger",
  "orderType" : "DELIVERY",
  "order" : null
}

PhotoAlbum

Represents a picture’s Album.

API Entity Name : PhotoAlbum

Table 81. Attributes
Field Type Description

photos

Photo

An alpha-numerical identifier

id

Integer

Identifier to PhotoAlbum

key

String(255)

An alpha-numerical identifier

user

User

An alpha-numerical identifier

description

String(255)

An alpha-numerical identifier

route

Route

An alpha-numerical identifier

stop

Stop

An alpha-numerical identifier

order

Order

An alpha-numerical identifier

lineItem

LineItem

An alpha-numerical identifier

Photo

Represents a picture taken.

API Entity Name : Photo

Table 82. Attributes
Field Type Description

filePath

String(255)

The picture’s file path into the FTP

id

Integer

Identifier to Stop

photoComment

String(255)

The comment to that picture

photoAlbum

PhotoAlbum

Represents the album from where the picture belongs

base64Thumbnail

String

A Base64 string to the picture’s thumbnail

base64Image

String

A Base64 string to the actual picture

ReasonCode

Represents a reason code of delivery. (Over, Short, Damaged and Delivery)

API Entity Name : ReasonCode
Refer to the CRUD Services to see the details about the create, retrieve, update and delete API methods.

Beside its ID, a ReasonCode is also uniquely identifiable by the Key attribute.
Table 83. Attributes
Path Type Description Mandatory Natural ID

id

Integer(22)

The entity’s auto-increment id.

key

String(45)

ReasonCode’s key (Since 2.12.2)

Yes

Yes

organization

Organization

Organization id. (Version not found)

Yes

Yes

description

String(45)

Description of reason code. (Version not found)

Yes

enabled

Boolean

Indicates whether it is enabled. (Version not found)

Yes

signature

Boolean

Define if it will have signature or not. (Version not found)

Yes

reasonCodeType

Char(1)

Indicates the type of ReasonCode. 'D' Delivery and 'L' Load Check.(Version not found)

Yes

delivery

Boolean

If it is a Delivery type reason.(Version not found)

Yes

over

Boolean

If it is an Over type reason.(Version not found)

Yes

shorts

Boolean

If it is a Shorts type reason.(Version not found)

Yes

damaged

Boolean

If it is a Damaged type reason.(Version not found)

Yes

pickup

Boolean

If it is a Pickup type reason.(Version not found)

Yes

udfs

[ReasonCodeUDF]

User’s Defined Fields associated to ReasonCode.(Version not found)

JSON Example
{
  "organization" : {
    "id" : 10505
  },
  "key" : "b5410df9-da64-4c66-9",
  "description" : "Sample Reason Code",
  "delivery" : true,
  "over" : true,
  "shorts" : true,
  "damaged" : true,
  "pickup" : true,
  "enabled" : true,
  "reasonCodeType" : "D"
}

Route

Represents a route with stops where drivers will deliver orders.
route-diagram

Start: Start of route. Time when information is passed to the Driver, add materials that will be needed on the route, check order notes.
Departure: Moment when the truck leaves for the first delivery.
Arrive: Arrival of the truck at the last destination. Check equipment, check order notes, checklist of additional materials.
Complete: Route completed.

API Entity Name : Route
Refer to the CRUD Services to see the details about the create, retrieve, update and delete API methods.

Beside its ID, a Route is also uniquely identifiable by the key attribute.
Table 84. Attributes
Path Type Description Mandatory Natural ID

id

Integer(22)

The entity’s auto-increment id.

key

String(45)

The entity’s key. (Version not found)

Yes

Yes

date

Date

Route date. (Version not found)

Yes

Yes

organization

Organization

The organization to which the route belongs.(Version not found)

Yes

Yes

origin

Location

Location of the starting point of the route. (Version not found)

Yes

Yes

destination

Location

Last location to end the route. (Version not found)

Yes

lastStopIsDestination

Boolean

Indicates whether the last stop is the destination. (Version not found)

Yes

plannedStart

Date

The planned start date of the route. (Version not found)

Yes

plannedDeparture

Date

The planned departure of the route. (Version not found)

Yes

plannedArrival

Date

The planned date for the arrival of the route. (Version not found)

Yes

plannedComplete

Date

The planned date to complete the course. (Version not found)

Yes

hasHelper

Boolean

true if the route has a helper. (Version not found)

Yes

description

String(45)

Description of the route. (Version not found)

lastModifier

[LastModifier]

Last User who changed the entity.(Version not found)

firstStopIsOrigin

Boolean

It’s a flag defining that the first stop is the Route origin.(Version not found)

proactiveRouteOptSimulation

String

it’s the uuid used by PRO to check if the resequence simulation is the last triggered by gms.(Version not found)

proactiveRouteOptTimestamp

Date

It’s a timestamp used to check if the resequence simulation is valid or expired.(Version not found)

origLatitude

Double(22)

Route’s origin latitude. (Version not found)

origLongitude

Double(22)

Route’s origin longitude. (Version not found)

destLatitude

Double(22)

Route’s destination latitude. (Version not found)

destLongitude

Double(22)

Route’s destination longitude. (Version not found)

stops

Stop

List of stops that contains in the route. (Version not found)

extraLineItems

RouteExtraLineItem

Extra LineItems that can be sold after order creation. (Version not found)

udfs

[RouteUDF]

Additional user-defined fields for the route.(Version not found)

baseLineStart

Date

Date initially set for the start of the route. (Version not found)

baseLineDeparture

Date

Date initially set for the departure of the route. (Version not found)

baseLineArrival

Date

Date initially set for arrival of the route. (Version not found)

baseLineComplete

Date

Date initially set to complete the route.(Version not found)

actualStart

Date

Actual start date of the route. (Version not found)

actualDeparture

Date

Actual departure date of the route. (Version not found)

actualArrival

Date

Actual arrival date of the route .(Version not found)

actualComplete

Date

Actual route completion date. (Version not found)

projectedStart

Date

The projected start date of the route. (Version not found)

projectedDeparture

Date

The projected departure date of the route. (Version not found)

projectedArrival

Date

The projected arrival date of the route. (Version not found)

projectedComplete

Date

The projected completion date of the route. (Version not found)

baseLineDistance

Double(22)

The trip distance set initially. (Version not found)

actualDistance

Double(22)

Actual travel distance. (Version not found)

plannedDistance

Double(22)

Planned travel distance. (Version not found)

projectedDistance

Double(22)

Projected travel distance. (Version not found)

actualStartDataQuality

String(255)

Indicates how the Actual Start information was entered into the system. (Version not found)

actualDistanceDataQuality

String(20)

Indicates how the Actual Distance information was entered into the system. (Version not found)

actualCompleteDataQuality

String(20)

Indicates how the Actual Complete information was entered into the system. (Version not found)

actualDepartureDataQuality

String(20)

Indicates how the Actual Departure information was entered into the system. (Version not found)

baseLineCost

BigDecimal(22

The initial cost of the route. (Version not found)

plannedCost

BigDecimal(22

The planned cost of the route. (Version not found)

actualCost

BigDecimal(22)

The actual cost of the route. (Version not found)

reopenedDate

Date

Date of reopening of the route. (Version not found)

reopenedBy

User

User responsible for reopening the route. (Version not found)

canceledStops

Integer(22)

The number of stops canceled on the route. (Version not found)

undeliveredStops

Integer(22)

The number of stops undelivered on the route. (Version not found)

redeliveredStops

Integer(22)

The number of stops redelivered on the route. (Version not found)

totalStops

Integer(22)

The number of stops on the route. (Version not found)

actualDepartures

Integer(22)

Indicates the number of Stops Served on the route. (Version not found)

status

RouteStatus

Route’s status. (Version not found)

hasPicture

Boolean

Indicates if the route has any photos. (Version not found)

baselineTravelTimeMinutes

Integer(22)

Travel time initially set in minutes.(Version not found)

plannedTravelTimeMinutes

Integer(22)

Planned travel time in minutes. (Version not found)

actualTravelTimeMinutes

Integer(22)

Actual travel time in minutes. (Version not found)

baselineSize1

Double(22)

The initial quantity of products to be delivered in size1. (Version not found)

baselineSize2

Double(22)

The initial quantity of products to be delivered in size2. (Version not found)

baselineSize3

Double(22)

The initial quantity of products to be delivered in size3. (Version not found)

plannedSize1

Double(22)

The planned amount of products that will be delivered in size1. (Version not found)

plannedSize2

Double(22)

The planned amount of products that will be delivered in size2. (Version not found)

plannedSize3

Double(22)

The planned amount of products that will be delivered in size3. (Version not found)

actualSize1

Double(22)

The actual amount of products that were delivered in size1. (Version not found)

actualSize2

Double(22)

The actual amount of products that were delivered in size2. (Version not found)

actualSize3

Double(22)

The actual amount of products that were delivered in size3. (Version not found)

baselinePickupSize1

Double(22)

The initial amount of withdrawal size for size1. (Version not found)

baselinePickupSize2

Double(22)

The initial amount of withdrawal size for size2. (Version not found)

baselinePickupSize3

Double(22)

The initial amount of withdrawal size for size3.(Version not found)

plannedPickupSize1

Double(22)

Planned pickup size for size1. (Version not found)

plannedPickupSize2

Double(22)

Planned pickup size for size2. (Version not found)

plannedPickupSize3

Double(22)

Planned pickup size for size3. (Version not found)

actualPickupSize1

Double(22)

The actual amount of withdrawal size for size 1. (Version not found)

actualPickupSize2

Double(22)

The actual amount of withdrawal size for size 2. (Version not found)

actualPickupSize3

Double(22)

The actual amount of withdrawal size for size 3. (Version not found)

hasGps

Boolean

Indicates whether the route has GPS. (Version not found)

lastUpdatedProjectedTime

Date

Date of the last update of Projected Time. (Version not found)

actualDistanceRecalculatedAt

Date

The date the actual distance was recalculated.(Version not found)

resequenceMethod

HAVERSINE, DISTANCEMATRIX

locationPendingPayments

RouteLocationPendingPayment

Represents an outstanding balance of a location on a route. (Version not found)

driverPendingBalances

RouteDriverPendingBalance

Represents an outstanding balance of a driver on a route. Example: damaged material. (Version not found)

additionalMaterials

RouteAdditionalMaterial

Represents extra support materials for deliveries on the route. Example: pallet, chapatex, pallet truck. (Version not found)

consignedSkus

RouteConsignedSku

Represents the amount of a borrowed sku on a route. (Version not found)

holderMaterials

RouteHolderMaterial

Represents returnable objects that must be in the driver’s truck at the end of the route. Example: bottles, containers. (Version not found)

driverAssignments

RouteDriverAssignment

Represents the association between a route and the drivers. (Version not found)

helperAssignments

RouteHelperAssignment

Represents the association between a route and the drivers as auxiliaries. (Version not found)

equipmentAssignments

RouteEquipmentAssignment

Represents the association between a route and equipment. (Version not found)

manifests

RouteManifest

Represents a general summary of the route, containing SKU information and which transport it belongs to. (Version not found)

size1AliasConfig

SizeAlias

Represents the size1 associated with the route. (Version not found)

size2AliasConfig

SizeAlias

Represents the size2 associated with the route. (Version not found)

size3AliasConfig

SizeAlias

Represents the size3 associated with the route. (Version not found)

amountReceived

Double(22)

Total value received from the route. (Version not found)

proactiveRouteOptConfig

[ProactiveRouteOptConfig]

Enabled for PRO clients only. Proactive Route Optimization (PRO) configuration. Add optimization goal (DISTANCE, TIME, TIME_WINDOW, COST), service window tolerance, delivery type prioritization.(Version not found)

proactiveRouteOptPending

String

Indicates a pending request to perform stop rescheduling via Resequencer. (Configuration Information).(Version not found)

proactiveRouteOptApplied

String

Indicates an applied request that was executed in the rescheduling of the stop via Resequencer. (Configuration Information).(Version not found)

exceededLicense

Date

The date the license was exceeded.(Version not found)

notLoadedSkus

[RouteNotLoadedSku]

Represents a list of unloaded SKU.(Version not found)

totalStopsInProgress

Integer(22)

Represents total stops in progress.(Version not found)

unsuccessfulDelivery

Boolean

Indicates whether the route contains partial and/or canceled deliveries.(Version not found)

tagAssignments

[RouteTagAssignment]

Represents a list of tags linked to the route.(Version not found)

JSON Example
{
  "organization" : {
    "id" : 10359
  },
  "key" : "037ad181-4dd2-4fa2-a",
  "date" : "2023-10-19",
  "description" : "Sample Route Doc",
  "origin" : {
    "id" : 10300,
    "organization" : {
      "id" : 10359
    },
    "key" : "037ad181-4dd2-4fa2-a_O",
    "locationType" : {
      "id" : 10300,
      "organization" : {
        "id" : 10359
      },
      "key" : "037ad181-4dd2-4fa2-a_OLocTypeDoc",
      "description" : "Sample LocationType",
      "enabled" : true
    },
    "description" : "Location - Description Sample",
    "city" : "FortalezaDoc",
    "state" : "Ceará",
    "country" : "BR",
    "longitude" : -38.46933,
    "latitude" : -3.734536,
    "phone1" : "+55 (85) 9 9988-7766",
    "phone1Type" : "3",
    "email" : "example.greenmile@gogreen.com",
    "deliveryInstructions" : "Sample Delivery Instructions.",
    "deliveryRadius" : 20,
    "hasGeofence" : false,
    "creditLimit" : 1000,
    "legalName" : "Location's Legal Name"
  },
  "origLatitude" : -3.734536,
  "origLongitude" : -38.46933,
  "destination" : {
    "id" : 10301,
    "organization" : {
      "id" : 10359
    },
    "key" : "037ad181-4dd2-4fa2-a_D",
    "locationType" : {
      "id" : 10301,
      "organization" : {
        "id" : 10359
      },
      "key" : "037ad181-4dd2-4fa2-a_DLocTypeDoc",
      "description" : "Sample LocationType",
      "enabled" : true
    },
    "description" : "Location - Description Sample",
    "city" : "FortalezaDoc",
    "state" : "Ceará",
    "country" : "BR",
    "longitude" : -38.46933,
    "latitude" : -3.734536,
    "phone1" : "+55 (85) 9 9988-7766",
    "phone1Type" : "3",
    "email" : "example.greenmile@gogreen.com",
    "deliveryInstructions" : "Sample Delivery Instructions.",
    "deliveryRadius" : 20,
    "hasGeofence" : false,
    "creditLimit" : 1000,
    "legalName" : "Location's Legal Name"
  },
  "destLatitude" : -3.734536,
  "destLongitude" : -38.46933,
  "lastStopIsDestination" : false,
  "plannedArrival" : "2023-10-19T13:32:04Z",
  "plannedDeparture" : "2023-10-19T13:32:04Z",
  "plannedComplete" : "2023-10-19T13:32:04Z",
  "plannedStart" : "2023-10-19T13:32:04Z",
  "hasHelper" : false,
  "plannedServiceTime" : 0,
  "onRoute" : false
}

Special attributes

The route maintenance maintenance service has a special set of business rules described below:

Properties Planned

The route has a set of attribute starting with the "planned" prefix. For example, the plannedStart and plannedDeparture attributes.

The use of these properties for the creation of the route is conditional to the attribute "resequence" described above.

Route calculated by Greenmile engine

{{url}}/Route?resequence=true

The planned propriedades MUST NOT set, because the routing process. Only the attribute plannedStart needs to be informed in order to be used as the base for the route calculation.

Route calculated by third part software

{{url}}/Route?resequence=false
Request
POST /Route?resequence=true HTTP/1.1
Content-Type: application/json
Host: 10.76.25.108:8080
Content-Length: 2211

{
  "organization" : {
    "id" : 10456
  },
  "key" : "6b646886-3c5f-403c-8",
  "date" : "2023-10-19",
  "description" : "Sample Route Doc",
  "origin" : {
    "id" : 10409,
    "organization" : {
      "id" : 10456
    },
    "key" : "6b646886-3c5f-403c-8_O",
    "locationType" : {
      "id" : 10409,
      "organization" : {
        "id" : 10456
      },
      "key" : "6b646886-3c5f-403c-8_OLocTypeDoc",
      "description" : "Sample LocationType",
      "enabled" : true
    },
    "description" : "Location - Description Sample",
    "city" : "FortalezaDoc",
    "state" : "Ceará",
    "country" : "BR",
    "longitude" : -38.46933,
    "latitude" : -3.734536,
    "phone1" : "+55 (85) 9 9988-7766",
    "phone1Type" : "3",
    "email" : "example.greenmile@gogreen.com",
    "deliveryInstructions" : "Sample Delivery Instructions.",
    "deliveryRadius" : 20,
    "hasGeofence" : false,
    "creditLimit" : 1000,
    "legalName" : "Location's Legal Name"
  },
  "origLatitude" : -3.734536,
  "origLongitude" : -38.46933,
  "destination" : {
    "id" : 10410,
    "organization" : {
      "id" : 10456
    },
    "key" : "6b646886-3c5f-403c-8_D",
    "locationType" : {
      "id" : 10410,
      "organization" : {
        "id" : 10456
      },
      "key" : "6b646886-3c5f-403c-8_DLocTypeDoc",
      "description" : "Sample LocationType",
      "enabled" : true
    },
    "description" : "Location - Description Sample",
    "city" : "FortalezaDoc",
    "state" : "Ceará",
    "country" : "BR",
    "longitude" : -38.46933,
    "latitude" : -3.734536,
    "phone1" : "+55 (85) 9 9988-7766",
    "phone1Type" : "3",
    "email" : "example.greenmile@gogreen.com",
    "deliveryInstructions" : "Sample Delivery Instructions.",
    "deliveryRadius" : 20,
    "hasGeofence" : false,
    "creditLimit" : 1000,
    "legalName" : "Location's Legal Name"
  },
  "destLatitude" : -3.734536,
  "destLongitude" : -38.46933,
  "lastStopIsDestination" : false,
  "plannedArrival" : "2023-10-19T13:36:55Z",
  "plannedDeparture" : "2023-10-19T13:36:55Z",
  "plannedComplete" : "2023-10-19T13:36:55Z",
  "plannedStart" : "2023-10-19T13:36:55Z",
  "hasHelper" : false,
  "plannedServiceTime" : 0,
  "onRoute" : false
}
Response
{
  "id" : 10405,
  "creationDate" : "2023-10-19T13:36:55+0000",
  "organization" : {
    "id" : 10456
  },
  "key" : "6b646886-3c5f-403c-8",
  "date" : "2023-10-19",
  "description" : "Sample Route Doc",
  "origin" : {
    "id" : 10409,
    "creationDate" : "2023-10-19T13:36:55+0000",
    "organization" : {
      "id" : 10456,
      "creationDate" : "2023-10-19T13:36:54+0000",
      "key" : "6b646886-3c5f-403c-8_O",
      "description" : "Organization Rest Docs Desc",
      "city" : "São Paulo",
      "state" : "São Paulo",
      "timeZone" : {
        "id" : 10096,
        "description" : "GMT+0",
        "rawOffsetMinutes" : 0,
        "timezoneName" : "GMT+0"
      },
      "unitSystem" : "METRIC"
    },
    "key" : "6b646886-3c5f-403c-8_O",
    "description" : "Location - Description Sample",
    "city" : "FortalezaDoc",
    "state" : "Ceará",
    "country" : "BR",
    "longitude" : -38.46933,
    "latitude" : -3.734536,
    "phone1" : "+55 (85) 9 9988-7766",
    "phone1Type" : "3",
    "email" : "example.greenmile@gogreen.com",
    "deliveryInstructions" : "Sample Delivery Instructions.",
    "deliveryRadius" : 20,
    "deliveryDays" : "0",
    "enabled" : true,
    "hasGeofence" : false,
    "creditLimit" : 1000,
    "legalName" : "Location's Legal Name",
    "alternativeKey" : "6b646886-3c5f-403c-8_O6b646886-3c5f-403c-8_O"
  },
  "origLatitude" : -3.734536,
  "origLongitude" : -38.46933,
  "destination" : {
    "id" : 10410,
    "creationDate" : "2023-10-19T13:36:55+0000",
    "organization" : {
      "id" : 10456,
      "creationDate" : "2023-10-19T13:36:54+0000",
      "key" : "6b646886-3c5f-403c-8_O",
      "description" : "Organization Rest Docs Desc",
      "city" : "São Paulo",
      "state" : "São Paulo",
      "timeZone" : {
        "id" : 10096,
        "description" : "GMT+0",
        "rawOffsetMinutes" : 0,
        "timezoneName" : "GMT+0"
      },
      "unitSystem" : "METRIC"
    },
    "key" : "6b646886-3c5f-403c-8_D",
    "description" : "Location - Description Sample",
    "city" : "FortalezaDoc",
    "state" : "Ceará",
    "country" : "BR",
    "longitude" : -38.46933,
    "latitude" : -3.734536,
    "phone1" : "+55 (85) 9 9988-7766",
    "phone1Type" : "3",
    "email" : "example.greenmile@gogreen.com",
    "deliveryInstructions" : "Sample Delivery Instructions.",
    "deliveryRadius" : 20,
    "deliveryDays" : "0",
    "enabled" : true,
    "hasGeofence" : false,
    "creditLimit" : 1000,
    "legalName" : "Location's Legal Name",
    "alternativeKey" : "6b646886-3c5f-403c-8_D6b646886-3c5f-403c-8_O"
  },
  "destLatitude" : -3.734536,
  "destLongitude" : -38.46933,
  "firstStopIsOrigin" : false,
  "lastStopIsDestination" : false,
  "stops" : [ ],
  "baseLineArrival" : "2023-10-19T13:36:55+0000",
  "baseLineDeparture" : "2023-10-19T13:36:55+0000",
  "plannedArrival" : "2023-10-19T13:36:55+0000",
  "plannedDeparture" : "2023-10-19T13:36:55+0000",
  "projectedArrival" : "2023-10-19T13:36:55+0000",
  "projectedDeparture" : "2023-10-19T13:36:55+0000",
  "baseLineDistance" : 0.0,
  "plannedDistance" : 0.0,
  "projectedDistance" : 0.0,
  "baseLineComplete" : "2023-10-19T13:36:55+0000",
  "plannedComplete" : "2023-10-19T13:36:55+0000",
  "projectedComplete" : "2023-10-19T13:36:55+0000",
  "baseLineCost" : 0,
  "plannedCost" : 0,
  "baseLineStart" : "2023-10-19T13:36:55+0000",
  "plannedStart" : "2023-10-19T13:36:55+0000",
  "projectedStart" : "2023-10-19T13:36:55+0000",
  "hasHelper" : false,
  "totalStops" : 0,
  "canceledStops" : 0,
  "undeliveredStops" : 0,
  "redeliveredStops" : 0,
  "actualDepartures" : 0,
  "status" : "NOT_STARTED",
  "plannedTravelTimeMinutes" : 0,
  "baselineTravelTimeMinutes" : 0,
  "plannedServiceTime" : 0,
  "baselineServiceTime" : 0,
  "hasPicture" : false,
  "hasGps" : false,
  "size1AliasConfig" : {
    "id" : 10000,
    "key" : "Weight",
    "description" : "Weight",
    "icon" : "gmfont-sizes-icon-size1",
    "preferredSize" : "1"
  },
  "size2AliasConfig" : {
    "id" : 10001,
    "key" : "Volume",
    "description" : "Volume",
    "icon" : "gmfont-sizes-icon-size2",
    "preferredSize" : "1"
  },
  "size3AliasConfig" : {
    "id" : 10002,
    "key" : "Value",
    "description" : "Value",
    "icon" : "gmfont-sizes-icon-size3",
    "preferredSize" : "1"
  },
  "resequenceMethod" : "DISTANCEMATRIX",
  "onRoute" : false
}

In this case, every planned property MUST be informed. The third part software using the API to export the route will calculate the route planned times. The planned stop properties like, for example, planned arrival and planned sequence number will also need be calculated.

Properties Baseline

Every property starting with the "baseline" prefix will be set automatically when the route is created and CAN NOT be changed after that.

Properties Planned

The route planned properties are subject to change after the route is created. Because of that, the baseline properties are used to keep the original planned value information when the route was created.

Properties Actual

The route has a set of attribute starting with "actual" prefix. These attributes CAN NOT be changed by the create and update operations because they are informed by specific services like API methods like startRoute, for example.

Properties Projected

The route has a set of attribute starting with "projected" prefix. These attributes CAN NOT be changed by the create and update operations because they are calculated automatically according to the route execution along the day. When the route is created, the projected values are initially equal to the planned times.

RouteAdditionalMaterial

Represents extra support materials for deliveries on the route. Example: pallet, chapatex, pallet truck.
route-additional-material

API Entity Name : RouteAdditionalMaterial
Refer to the CRUD Services to see the details about the create, retrieve, update and delete API methods.

Table 85. Attributes
Path Type Description Mandatory Natural ID

id

Integer(22)

The entity’s auto-increment id.

route

Route

Route id. (Version not found)

Yes

Yes

sku

Sku

SKU id. (Version not found)

Yes

transport

Transport

Transport id. (Version not found)

sizeAlias

SizeAlias

SizeAlias id. (Version not found)

quantity

Integer(22)

Amount of additional materials. (Version not found)

JSON Example
{
  "route" : {
    "id" : 10428,
    "onRoute" : false
  },
  "sku" : {
    "id" : 10352
  },
  "transport" : {
    "id" : 10080
  },
  "quantity" : 1,
  "sizeAlias" : {
    "id" : 10320
  }
}

RouteConsignedSku

Represents the amount of a borrowed sku on a route.
route-consigned-sku

This example shows the delivery of 3 bottles in an establishment where the driver receives only 1 bottle back. This means that 2 bottles are being loaned to this customer.

API Entity Name : RouteConsignedSku
Refer to the CRUD Services to see the details about the create, retrieve, update and delete API methods.

Table 86. Attributes
Path Type Description Mandatory Natural ID

id

Integer(22)

The entity’s auto-increment id.

sku

Sku

SKU id. (Version not found)

Yes

Yes

location

Location

Location id. (Version not found)

Yes

Yes

route

Route

Route id. (Since 2.12.2)

Yes

Yes

dateConsigned

Date

Consignment date. (Version not found)

Yes

newRouteConsignedSku

Boolean

Indicates whether it is a new consigned Sku. (Version not found)

Yes

amount

Float(22)

Value of SKUs transported. (Version not found)

consigned

Boolean

Identifies that the sku was actually consigned (and not just borrowed). (Version not found)

amountReceived

Double(22)

Value of SKUs received. (Version not found)

plannedSize1

Double(22)

Planned amount of products that will be delivered in size1. (Version not found)

plannedSize2

Double(22)

Planned amount of products that will be delivered in size2. (Version not found)

plannedSize3

Double(22)

Planned amount of products that will be delivered in size3. (Version not found)

actualSize1

Double(22)

Actual amount of products that were delivered in size1. (Version not found)

actualSize2

Double(22)

Actual amount of products that were delivered in size2. (Version not found)

actualSize3

Double(22)

Actual amount of products that were delivered in size3. (Version not found)

size1Alias

SizeAlias

Represents the size1 associated with the routeConsignedSku. (Version not found)

size2Alias

SizeAlias

Represents the size2 associated with the routeConsignedSku. (Version not found)

size3Alias

SizeAlias

Represents the size3 associated with the routeConsignedSku. (Version not found)

JSON Example
{
  "route" : {
    "id" : 10388,
    "onRoute" : false
  },
  "location" : {
    "id" : 10367
  },
  "sku" : {
    "id" : 10248
  },
  "dateConsigned" : "2023-10-19T13:34:54Z",
  "amount" : 1,
  "amountReceived" : 3,
  "plannedSize1" : 100.0,
  "plannedSize2" : 200.0,
  "plannedSize3" : 300.0,
  "actualSize1" : 100.0,
  "actualSize2" : 200.0,
  "actualSize3" : 300.0,
  "size1Alias" : {
    "id" : 10166
  },
  "size2Alias" : {
    "id" : 10167
  },
  "size3Alias" : {
    "id" : 10168
  },
  "newRouteConsignedSku" : true,
  "consigned" : false
}

RouteDriverAssignment

Represents the association between a Route and a Driver.

This endpoint accepts /RouteDriver and /RouteDriverAssignment.

API Entity Name : RouteDriverAssignment
Refer to the CRUD Services to see the details about the create, retrieve, update and delete API methods.

Table 87. Attributes
Path Type Description Mandatory Natural ID

id

Integer(22)

The entity’s auto-increment id.

Yes

driver

Driver

Driver id. (Version not found)

Yes

Yes

route

Route

Route id. (Version not found)

Yes

Yes

JSON Example
{
  "id" : null,
  "creationDate" : null,
  "lastModificationDate" : null,
  "route" : {
    "id" : 10431,
    "creationDate" : null,
    "lastModifier" : null,
    "lastModificationDate" : null,
    "organization" : {
      "id" : 10523,
      "creationDate" : null,
      "lastModificationDate" : null,
      "key" : "9d702d93-0f31-4be5-aO",
      "parentOrganization" : null,
      "description" : "Organization Rest Docs Desc",
      "addressLine1" : null,
      "addressLine2" : null,
      "city" : "São Paulo",
      "state" : "São Paulo",
      "zipcode" : null,
      "district" : null,
      "country" : null,
      "taxid" : null,
      "preferedLocale" : {
        "id" : 10000,
        "parentLocale" : null,
        "key" : null,
        "language" : null,
        "country" : null,
        "description" : null,
        "dateFormat" : null,
        "timeFormat" : null,
        "currency" : null,
        "decimalSymbol" : null,
        "digitalGrouping" : null,
        "organizationId" : null
      },
      "timeZone" : {
        "id" : 10096,
        "description" : null,
        "rawOffsetMinutes" : null,
        "alias" : null,
        "timezoneName" : null
      },
      "listenerOrganizations" : null,
      "unitSystem" : "METRIC",
      "dsgOrgId" : null,
      "dsgOrganizationId" : null
    },
    "key" : "9d702d93-0f31-4be5-aRouteDoc",
    "date" : "2023-10-19",
    "description" : "Sample Route Doc",
    "origin" : {
      "id" : 10459,
      "creationDate" : null,
      "lastModifier" : null,
      "lastModificationDate" : null,
      "organization" : {
        "id" : 10523,
        "creationDate" : null,
        "lastModificationDate" : null,
        "key" : "9d702d93-0f31-4be5-aO",
        "parentOrganization" : null,
        "description" : "Organization Rest Docs Desc",
        "addressLine1" : null,
        "addressLine2" : null,
        "city" : "São Paulo",
        "state" : "São Paulo",
        "zipcode" : null,
        "district" : null,
        "country" : null,
        "taxid" : null,
        "preferedLocale" : {
          "id" : 10000,
          "parentLocale" : null,
          "key" : null,
          "language" : null,
          "country" : null,
          "description" : null,
          "dateFormat" : null,
          "timeFormat" : null,
          "currency" : null,
          "decimalSymbol" : null,
          "digitalGrouping" : null,
          "organizationId" : null
        },
        "timeZone" : {
          "id" : 10096,
          "description" : null,
          "rawOffsetMinutes" : null,
          "alias" : null,
          "timezoneName" : null
        },
        "listenerOrganizations" : null,
        "unitSystem" : "METRIC",
        "dsgOrgId" : null,
        "dsgOrganizationId" : null
      },
      "key" : "9d702d93-0f31-4be5-aRouteDoc_O",
      "accountType" : null,
      "locationType" : {
        "id" : 10453,
        "creationDate" : null,
        "lastModificationDate" : null,
        "organization" : {
          "id" : 10523,
          "creationDate" : null,
          "lastModificationDate" : null,
          "key" : "9d702d93-0f31-4be5-aO",
          "parentOrganization" : null,
          "description" : "Organization Rest Docs Desc",
          "addressLine1" : null,
          "addressLine2" : null,
          "city" : "São Paulo",
          "state" : "São Paulo",
          "zipcode" : null,
          "district" : null,
          "country" : null,
          "taxid" : null,
          "preferedLocale" : {
            "id" : 10000,
            "parentLocale" : null,
            "key" : null,
            "language" : null,
            "country" : null,
            "description" : null,
            "dateFormat" : null,
            "timeFormat" : null,
            "currency" : null,
            "decimalSymbol" : null,
            "digitalGrouping" : null,
            "organizationId" : null
          },
          "timeZone" : {
            "id" : 10096,
            "description" : null,
            "rawOffsetMinutes" : null,
            "alias" : null,
            "timezoneName" : null
          },
          "listenerOrganizations" : null,
          "unitSystem" : "METRIC",
          "dsgOrgId" : null,
          "dsgOrganizationId" : null
        },
        "key" : "9d702d93-0f31-4be5-aRouteDoc_OLocTypeDoc",
        "description" : "Sample LocationType",
        "showOnMobileCreate" : null,
        "enabled" : true
      },
      "timeWindowType" : null,
      "locationOverrideTimeWindows" : null,
      "serviceTimeType" : null,
      "udfs" : null,
      "description" : "Location - Description Sample",
      "taxID" : null,
      "addressLine1" : null,
      "addressLine2" : null,
      "city" : "FortalezaDoc",
      "state" : "Ceará",
      "zipCode" : null,
      "district" : null,
      "country" : "BR",
      "longitude" : -38.46933,
      "geocodingQuality" : null,
      "latitude" : -3.734536,
      "phone1" : "+55 (85) 9 9988-7766",
      "phone1Type" : "3",
      "phone2" : null,
      "phone2Type" : null,
      "email" : "example.greenmile@gogreen.com",
      "deliveryInstructions" : "Sample Delivery Instructions.",
      "deliveryRadius" : 20,
      "deliveryDays" : null,
      "nonHelperFixedTimeSecs" : null,
      "nonHelperVarTimeSecs" : null,
      "helperFixedTimeSecs" : null,
      "helperVarTimeSecs" : null,
      "perSize1Rate" : null,
      "fixedCost" : null,
      "consignees" : null,
      "geocodingDate" : null,
      "geocodingLastCheck" : null,
      "geocodingUser" : null,
      "timeZone" : null,
      "allowedUsers" : null,
      "enabled" : null,
      "hasGeofence" : false,
      "creditLimit" : 1000,
      "legalName" : "Location's Legal Name",
      "taxType" : null,
      "appliedTax" : null,
      "locationPaymentMethods" : null
    },
    "origLatitude" : -3.734536,
    "origLongitude" : -38.46933,
    "destination" : {
      "id" : 10460,
      "creationDate" : null,
      "lastModifier" : null,
      "lastModificationDate" : null,
      "organization" : {
        "id" : 10523,
        "creationDate" : null,
        "lastModificationDate" : null,
        "key" : "9d702d93-0f31-4be5-aO",
        "parentOrganization" : null,
        "description" : "Organization Rest Docs Desc",
        "addressLine1" : null,
        "addressLine2" : null,
        "city" : "São Paulo",
        "state" : "São Paulo",
        "zipcode" : null,
        "district" : null,
        "country" : null,
        "taxid" : null,
        "preferedLocale" : {
          "id" : 10000,
          "parentLocale" : null,
          "key" : null,
          "language" : null,
          "country" : null,
          "description" : null,
          "dateFormat" : null,
          "timeFormat" : null,
          "currency" : null,
          "decimalSymbol" : null,
          "digitalGrouping" : null,
          "organizationId" : null
        },
        "timeZone" : {
          "id" : 10096,
          "description" : null,
          "rawOffsetMinutes" : null,
          "alias" : null,
          "timezoneName" : null
        },
        "listenerOrganizations" : null,
        "unitSystem" : "METRIC",
        "dsgOrgId" : null,
        "dsgOrganizationId" : null
      },
      "key" : "9d702d93-0f31-4be5-aRouteDoc_D",
      "accountType" : null,
      "locationType" : {
        "id" : 10454,
        "creationDate" : null,
        "lastModificationDate" : null,
        "organization" : {
          "id" : 10523,
          "creationDate" : null,
          "lastModificationDate" : null,
          "key" : "9d702d93-0f31-4be5-aO",
          "parentOrganization" : null,
          "description" : "Organization Rest Docs Desc",
          "addressLine1" : null,
          "addressLine2" : null,
          "city" : "São Paulo",
          "state" : "São Paulo",
          "zipcode" : null,
          "district" : null,
          "country" : null,
          "taxid" : null,
          "preferedLocale" : {
            "id" : 10000,
            "parentLocale" : null,
            "key" : null,
            "language" : null,
            "country" : null,
            "description" : null,
            "dateFormat" : null,
            "timeFormat" : null,
            "currency" : null,
            "decimalSymbol" : null,
            "digitalGrouping" : null,
            "organizationId" : null
          },
          "timeZone" : {
            "id" : 10096,
            "description" : null,
            "rawOffsetMinutes" : null,
            "alias" : null,
            "timezoneName" : null
          },
          "listenerOrganizations" : null,
          "unitSystem" : "METRIC",
          "dsgOrgId" : null,
          "dsgOrganizationId" : null
        },
        "key" : "9d702d93-0f31-4be5-aRouteDoc_DLocTypeDoc",
        "description" : "Sample LocationType",
        "showOnMobileCreate" : null,
        "enabled" : true
      },
      "timeWindowType" : null,
      "locationOverrideTimeWindows" : null,
      "serviceTimeType" : null,
      "udfs" : null,
      "description" : "Location - Description Sample",
      "taxID" : null,
      "addressLine1" : null,
      "addressLine2" : null,
      "city" : "FortalezaDoc",
      "state" : "Ceará",
      "zipCode" : null,
      "district" : null,
      "country" : "BR",
      "longitude" : -38.46933,
      "geocodingQuality" : null,
      "latitude" : -3.734536,
      "phone1" : "+55 (85) 9 9988-7766",
      "phone1Type" : "3",
      "phone2" : null,
      "phone2Type" : null,
      "email" : "example.greenmile@gogreen.com",
      "deliveryInstructions" : "Sample Delivery Instructions.",
      "deliveryRadius" : 20,
      "deliveryDays" : null,
      "nonHelperFixedTimeSecs" : null,
      "nonHelperVarTimeSecs" : null,
      "helperFixedTimeSecs" : null,
      "helperVarTimeSecs" : null,
      "perSize1Rate" : null,
      "fixedCost" : null,
      "consignees" : null,
      "geocodingDate" : null,
      "geocodingLastCheck" : null,
      "geocodingUser" : null,
      "timeZone" : null,
      "allowedUsers" : null,
      "enabled" : null,
      "hasGeofence" : false,
      "creditLimit" : 1000,
      "legalName" : "Location's Legal Name",
      "taxType" : null,
      "appliedTax" : null,
      "locationPaymentMethods" : null
    },
    "destLatitude" : -3.734536,
    "destLongitude" : -38.46933,
    "firstStopIsOrigin" : null,
    "lastStopIsDestination" : false,
    "stops" : null,
    "extraLineItems" : null,
    "udfs" : null,
    "baseLineArrival" : null,
    "baseLineDeparture" : null,
    "plannedArrival" : 1697722781686,
    "plannedDeparture" : 1697722781686,
    "projectedArrival" : null,
    "projectedDeparture" : null,
    "actualArrival" : null,
    "actualDeparture" : null,
    "baseLineDistance" : null,
    "plannedDistance" : null,
    "projectedDistance" : null,
    "actualDistance" : null,
    "baseLineComplete" : null,
    "plannedComplete" : 1697722781686,
    "projectedComplete" : null,
    "actualComplete" : null,
    "actualStartDataQuality" : null,
    "actualDistanceDataQuality" : null,
    "actualCompleteDataQuality" : null,
    "actualDepartureDataQuality" : null,
    "baseLineCost" : null,
    "plannedCost" : null,
    "actualCost" : null,
    "baseLineStart" : null,
    "plannedStart" : 1697722781686,
    "projectedStart" : null,
    "actualStart" : null,
    "hasHelper" : false,
    "driverAssignments" : null,
    "equipmentAssignments" : null,
    "tagAssignments" : null,
    "locationPendingPayments" : null,
    "driverPendingBalances" : null,
    "additionalMaterials" : null,
    "consignedSkus" : null,
    "holderMaterials" : null,
    "manifests" : null,
    "notLoadedSkus" : null,
    "totalStops" : null,
    "canceledStops" : null,
    "undeliveredStops" : null,
    "redeliveredStops" : null,
    "actualDepartures" : null,
    "totalStopsInProgress" : null,
    "status" : null,
    "actualTravelTimeMinutes" : null,
    "plannedTravelTimeMinutes" : null,
    "baselineTravelTimeMinutes" : null,
    "hasPicture" : null,
    "actualSize1" : null,
    "actualSize2" : null,
    "actualSize3" : null,
    "baselineSize1" : null,
    "baselineSize2" : null,
    "baselineSize3" : null,
    "plannedSize1" : null,
    "plannedSize2" : null,
    "plannedSize3" : null,
    "actualPickupSize1" : null,
    "actualPickupSize2" : null,
    "actualPickupSize3" : null,
    "baselinePickupSize1" : null,
    "baselinePickupSize2" : null,
    "baselinePickupSize3" : null,
    "plannedPickupSize1" : null,
    "plannedPickupSize2" : null,
    "plannedPickupSize3" : null,
    "hasGps" : null,
    "lastUpdatedProjectedTime" : null,
    "helperAssignments" : null,
    "actualDistanceRecalculatedAt" : null,
    "size1AliasConfig" : null,
    "size2AliasConfig" : null,
    "size3AliasConfig" : null,
    "resequenceMethod" : null,
    "amountReceived" : null,
    "reopenedDate" : null,
    "reopenedBy" : null,
    "exceededLicense" : null,
    "proactiveRouteOptConfig" : null,
    "proactiveRouteOptPending" : null,
    "proactiveRouteOptApplied" : null,
    "unsuccessfulDelivery" : null,
    "proactiveRouteOptSimulation" : null,
    "proactiveRouteOptTimestamp" : null,
    "onRoute" : false
  },
  "driver" : {
    "id" : 10303,
    "login" : "9d702d93-0f31-4be5-aDriver",
    "email" : null,
    "enabled" : null,
    "failedAttempts" : null,
    "lockDate" : null,
    "expireDate" : null,
    "latestLogin" : null,
    "passwordExpire" : null,
    "preferedLocale" : {
      "id" : 10000,
      "parentLocale" : null,
      "key" : null,
      "language" : null,
      "country" : null,
      "description" : null,
      "dateFormat" : null,
      "timeFormat" : null,
      "currency" : null,
      "decimalSymbol" : null,
      "digitalGrouping" : null,
      "organizationId" : null
    },
    "organization" : {
      "id" : 10523,
      "creationDate" : null,
      "lastModificationDate" : null,
      "key" : "9d702d93-0f31-4be5-aO",
      "parentOrganization" : null,
      "description" : "Organization Rest Docs Desc",
      "addressLine1" : null,
      "addressLine2" : null,
      "city" : "São Paulo",
      "state" : "São Paulo",
      "zipcode" : null,
      "district" : null,
      "country" : null,
      "taxid" : null,
      "preferedLocale" : {
        "id" : 10000,
        "parentLocale" : null,
        "key" : null,
        "language" : null,
        "country" : null,
        "description" : null,
        "dateFormat" : null,
        "timeFormat" : null,
        "currency" : null,
        "decimalSymbol" : null,
        "digitalGrouping" : null,
        "organizationId" : null
      },
      "timeZone" : {
        "id" : 10096,
        "description" : null,
        "rawOffsetMinutes" : null,
        "alias" : null,
        "timezoneName" : null
      },
      "listenerOrganizations" : null,
      "unitSystem" : "METRIC",
      "dsgOrgId" : null,
      "dsgOrganizationId" : null
    },
    "timeZone" : null,
    "udfs" : null,
    "organizations" : null,
    "userAllowedEquipments" : null,
    "userAllowedDrivers" : null,
    "userAllowedTags" : null,
    "key" : "9d702d93-0f31-4be5-aDriver",
    "name" : "9d702d93-0f31-4be5-aDriver",
    "addressLine1" : null,
    "addressLine2" : null,
    "city" : null,
    "state" : null,
    "zipCode" : null,
    "district" : null,
    "country" : null,
    "longitude" : null,
    "latitude" : null,
    "geocodingQuality" : null,
    "phone1" : null,
    "phone1Type" : null,
    "phone2" : null,
    "phone2Type" : null,
    "unitSystem" : "METRIC",
    "adpFileNumber" : null,
    "ipRangeProfile" : null,
    "groups" : null,
    "ticketTypes" : null,
    "restrictEquipments" : null,
    "restrictDrivers" : null,
    "restrictTags" : null,
    "isSystem" : null,
    "defaultEncoding" : null,
    "leader" : null,
    "subordinates" : null,
    "restrictUsers" : null,
    "externalUser" : false,
    "licenseNumber" : null,
    "driverType" : "DEFAULT",
    "licenseExpires" : null,
    "driverProfileCost" : {
      "id" : 10083,
      "creationDate" : null,
      "lastModificationDate" : null,
      "organization" : {
        "id" : 10523,
        "creationDate" : null,
        "lastModificationDate" : null,
        "key" : "9d702d93-0f31-4be5-aO",
        "parentOrganization" : null,
        "description" : "Organization Rest Docs Desc",
        "addressLine1" : null,
        "addressLine2" : null,
        "city" : "São Paulo",
        "state" : "São Paulo",
        "zipcode" : null,
        "district" : null,
        "country" : null,
        "taxid" : null,
        "preferedLocale" : {
          "id" : 10000,
          "parentLocale" : null,
          "key" : null,
          "language" : null,
          "country" : null,
          "description" : null,
          "dateFormat" : null,
          "timeFormat" : null,
          "currency" : null,
          "decimalSymbol" : null,
          "digitalGrouping" : null,
          "organizationId" : null
        },
        "timeZone" : {
          "id" : 10096,
          "description" : null,
          "rawOffsetMinutes" : null,
          "alias" : null,
          "timezoneName" : null
        },
        "listenerOrganizations" : null,
        "unitSystem" : "METRIC",
        "dsgOrgId" : null,
        "dsgOrganizationId" : null
      },
      "description" : "9d702d93-0f31-4be5-aDriver_DPC Sample",
      "fixedRouteCost" : 1200,
      "costPerHour" : 15,
      "minimumTimeHours" : 8,
      "overtimeRatePerHour" : 30,
      "perDistanceRateKm" : 4,
      "minimumDistance" : 10000,
      "perSize1Rate" : 1,
      "perSize2Rate" : null,
      "perSize3Rate" : null,
      "minimumSize1" : 10,
      "minimumSize2" : null,
      "minimumSize3" : null,
      "enabled" : true,
      "regularTimeMinutes" : 10,
      "fixedStopCost" : 10,
      "udfs" : null
    },
    "lastDrugsTest" : null,
    "lastPhysicalTest" : null,
    "lastAlcoholTest" : null,
    "smartTrack" : null,
    "firstName" : "9d702d93-0f31-4be5-aDriver",
    "lastName" : ""
  }
}

RouteDriverPendingBalance

Represents an outstanding balance of a driver on a route. Example: damaged material.

API Entity Name : RouteDriverPendingBalance
Refer to the CRUD Services to see the details about the create, retrieve, update and delete API methods.

Table 88. Attributes
Path Type Description Mandatory Natural ID

id

Integer(22)

The entity’s auto-increment id.

description

String(255)

Description of the driver’s pendency. (Version not found)

Yes

driver

Driver

Driver id. (Version not found)

Yes

route

Route

Route id. (Version not found)

Yes

Yes

quantity

Integer(22)

Quantity of pending. (Version not found)

amount

Float(22)

Amount of the driver’s pendency. (Version not found)

JSON Example
{
  "id" : null,
  "route" : {
    "id" : 10425,
    "creationDate" : null,
    "lastModifier" : null,
    "lastModificationDate" : null,
    "organization" : {
      "id" : 10496,
      "creationDate" : null,
      "lastModificationDate" : null,
      "key" : null,
      "parentOrganization" : null,
      "description" : null,
      "addressLine1" : null,
      "addressLine2" : null,
      "city" : null,
      "state" : null,
      "zipcode" : null,
      "district" : null,
      "country" : null,
      "taxid" : null,
      "preferedLocale" : null,
      "timeZone" : null,
      "listenerOrganizations" : null,
      "unitSystem" : null,
      "dsgOrgId" : null,
      "dsgOrganizationId" : null
    },
    "key" : "baf4e276-0e6e-4655-9",
    "date" : "2023-10-19",
    "description" : "Sample Route Doc",
    "origin" : {
      "id" : 10447,
      "creationDate" : null,
      "lastModifier" : null,
      "lastModificationDate" : null,
      "organization" : {
        "id" : 10496,
        "creationDate" : null,
        "lastModificationDate" : null,
        "key" : null,
        "parentOrganization" : null,
        "description" : null,
        "addressLine1" : null,
        "addressLine2" : null,
        "city" : null,
        "state" : null,
        "zipcode" : null,
        "district" : null,
        "country" : null,
        "taxid" : null,
        "preferedLocale" : null,
        "timeZone" : null,
        "listenerOrganizations" : null,
        "unitSystem" : null,
        "dsgOrgId" : null,
        "dsgOrganizationId" : null
      },
      "key" : "baf4e276-0e6e-4655-9_O",
      "accountType" : null,
      "locationType" : {
        "id" : 10441,
        "creationDate" : null,
        "lastModificationDate" : null,
        "organization" : {
          "id" : 10496,
          "creationDate" : null,
          "lastModificationDate" : null,
          "key" : null,
          "parentOrganization" : null,
          "description" : null,
          "addressLine1" : null,
          "addressLine2" : null,
          "city" : null,
          "state" : null,
          "zipcode" : null,
          "district" : null,
          "country" : null,
          "taxid" : null,
          "preferedLocale" : null,
          "timeZone" : null,
          "listenerOrganizations" : null,
          "unitSystem" : null,
          "dsgOrgId" : null,
          "dsgOrganizationId" : null
        },
        "key" : "baf4e276-0e6e-4655-9_OLocTypeDoc",
        "description" : "Sample LocationType",
        "showOnMobileCreate" : null,
        "enabled" : true
      },
      "timeWindowType" : null,
      "locationOverrideTimeWindows" : null,
      "serviceTimeType" : null,
      "udfs" : null,
      "description" : "Location - Description Sample",
      "taxID" : null,
      "addressLine1" : null,
      "addressLine2" : null,
      "city" : "FortalezaDoc",
      "state" : "Ceará",
      "zipCode" : null,
      "district" : null,
      "country" : "BR",
      "longitude" : -38.46933,
      "geocodingQuality" : null,
      "latitude" : -3.734536,
      "phone1" : "+55 (85) 9 9988-7766",
      "phone1Type" : "3",
      "phone2" : null,
      "phone2Type" : null,
      "email" : "example.greenmile@gogreen.com",
      "deliveryInstructions" : "Sample Delivery Instructions.",
      "deliveryRadius" : 20,
      "deliveryDays" : null,
      "nonHelperFixedTimeSecs" : null,
      "nonHelperVarTimeSecs" : null,
      "helperFixedTimeSecs" : null,
      "helperVarTimeSecs" : null,
      "perSize1Rate" : null,
      "fixedCost" : null,
      "consignees" : null,
      "geocodingDate" : null,
      "geocodingLastCheck" : null,
      "geocodingUser" : null,
      "timeZone" : null,
      "allowedUsers" : null,
      "enabled" : null,
      "hasGeofence" : false,
      "creditLimit" : 1000,
      "legalName" : "Location's Legal Name",
      "taxType" : null,
      "appliedTax" : null,
      "locationPaymentMethods" : null
    },
    "origLatitude" : -3.734536,
    "origLongitude" : -38.46933,
    "destination" : {
      "id" : 10448,
      "creationDate" : null,
      "lastModifier" : null,
      "lastModificationDate" : null,
      "organization" : {
        "id" : 10496,
        "creationDate" : null,
        "lastModificationDate" : null,
        "key" : null,
        "parentOrganization" : null,
        "description" : null,
        "addressLine1" : null,
        "addressLine2" : null,
        "city" : null,
        "state" : null,
        "zipcode" : null,
        "district" : null,
        "country" : null,
        "taxid" : null,
        "preferedLocale" : null,
        "timeZone" : null,
        "listenerOrganizations" : null,
        "unitSystem" : null,
        "dsgOrgId" : null,
        "dsgOrganizationId" : null
      },
      "key" : "baf4e276-0e6e-4655-9_D",
      "accountType" : null,
      "locationType" : {
        "id" : 10442,
        "creationDate" : null,
        "lastModificationDate" : null,
        "organization" : {
          "id" : 10496,
          "creationDate" : null,
          "lastModificationDate" : null,
          "key" : null,
          "parentOrganization" : null,
          "description" : null,
          "addressLine1" : null,
          "addressLine2" : null,
          "city" : null,
          "state" : null,
          "zipcode" : null,
          "district" : null,
          "country" : null,
          "taxid" : null,
          "preferedLocale" : null,
          "timeZone" : null,
          "listenerOrganizations" : null,
          "unitSystem" : null,
          "dsgOrgId" : null,
          "dsgOrganizationId" : null
        },
        "key" : "baf4e276-0e6e-4655-9_DLocTypeDoc",
        "description" : "Sample LocationType",
        "showOnMobileCreate" : null,
        "enabled" : true
      },
      "timeWindowType" : null,
      "locationOverrideTimeWindows" : null,
      "serviceTimeType" : null,
      "udfs" : null,
      "description" : "Location - Description Sample",
      "taxID" : null,
      "addressLine1" : null,
      "addressLine2" : null,
      "city" : "FortalezaDoc",
      "state" : "Ceará",
      "zipCode" : null,
      "district" : null,
      "country" : "BR",
      "longitude" : -38.46933,
      "geocodingQuality" : null,
      "latitude" : -3.734536,
      "phone1" : "+55 (85) 9 9988-7766",
      "phone1Type" : "3",
      "phone2" : null,
      "phone2Type" : null,
      "email" : "example.greenmile@gogreen.com",
      "deliveryInstructions" : "Sample Delivery Instructions.",
      "deliveryRadius" : 20,
      "deliveryDays" : null,
      "nonHelperFixedTimeSecs" : null,
      "nonHelperVarTimeSecs" : null,
      "helperFixedTimeSecs" : null,
      "helperVarTimeSecs" : null,
      "perSize1Rate" : null,
      "fixedCost" : null,
      "consignees" : null,
      "geocodingDate" : null,
      "geocodingLastCheck" : null,
      "geocodingUser" : null,
      "timeZone" : null,
      "allowedUsers" : null,
      "enabled" : null,
      "hasGeofence" : false,
      "creditLimit" : 1000,
      "legalName" : "Location's Legal Name",
      "taxType" : null,
      "appliedTax" : null,
      "locationPaymentMethods" : null
    },
    "destLatitude" : -3.734536,
    "destLongitude" : -38.46933,
    "firstStopIsOrigin" : null,
    "lastStopIsDestination" : false,
    "stops" : null,
    "extraLineItems" : null,
    "udfs" : null,
    "baseLineArrival" : null,
    "baseLineDeparture" : null,
    "plannedArrival" : 1697722727850,
    "plannedDeparture" : 1697722727850,
    "projectedArrival" : null,
    "projectedDeparture" : null,
    "actualArrival" : null,
    "actualDeparture" : null,
    "baseLineDistance" : null,
    "plannedDistance" : null,
    "projectedDistance" : null,
    "actualDistance" : null,
    "baseLineComplete" : null,
    "plannedComplete" : 1697722727850,
    "projectedComplete" : null,
    "actualComplete" : null,
    "actualStartDataQuality" : null,
    "actualDistanceDataQuality" : null,
    "actualCompleteDataQuality" : null,
    "actualDepartureDataQuality" : null,
    "baseLineCost" : null,
    "plannedCost" : null,
    "actualCost" : null,
    "baseLineStart" : null,
    "plannedStart" : 1697722727850,
    "projectedStart" : null,
    "actualStart" : null,
    "hasHelper" : false,
    "driverAssignments" : null,
    "equipmentAssignments" : null,
    "tagAssignments" : null,
    "locationPendingPayments" : null,
    "driverPendingBalances" : null,
    "additionalMaterials" : null,
    "consignedSkus" : null,
    "holderMaterials" : null,
    "manifests" : null,
    "notLoadedSkus" : null,
    "totalStops" : null,
    "canceledStops" : null,
    "undeliveredStops" : null,
    "redeliveredStops" : null,
    "actualDepartures" : null,
    "totalStopsInProgress" : null,
    "status" : null,
    "actualTravelTimeMinutes" : null,
    "plannedTravelTimeMinutes" : null,
    "baselineTravelTimeMinutes" : null,
    "hasPicture" : null,
    "actualSize1" : null,
    "actualSize2" : null,
    "actualSize3" : null,
    "baselineSize1" : null,
    "baselineSize2" : null,
    "baselineSize3" : null,
    "plannedSize1" : null,
    "plannedSize2" : null,
    "plannedSize3" : null,
    "actualPickupSize1" : null,
    "actualPickupSize2" : null,
    "actualPickupSize3" : null,
    "baselinePickupSize1" : null,
    "baselinePickupSize2" : null,
    "baselinePickupSize3" : null,
    "plannedPickupSize1" : null,
    "plannedPickupSize2" : null,
    "plannedPickupSize3" : null,
    "hasGps" : null,
    "lastUpdatedProjectedTime" : null,
    "helperAssignments" : null,
    "actualDistanceRecalculatedAt" : null,
    "size1AliasConfig" : null,
    "size2AliasConfig" : null,
    "size3AliasConfig" : null,
    "resequenceMethod" : null,
    "amountReceived" : null,
    "reopenedDate" : null,
    "reopenedBy" : null,
    "exceededLicense" : null,
    "proactiveRouteOptConfig" : null,
    "proactiveRouteOptPending" : null,
    "proactiveRouteOptApplied" : null,
    "unsuccessfulDelivery" : null,
    "proactiveRouteOptSimulation" : null,
    "proactiveRouteOptTimestamp" : null,
    "onRoute" : false
  },
  "driver" : {
    "id" : 10300,
    "login" : "baf4e276-0e6e-4655-9",
    "email" : null,
    "enabled" : null,
    "failedAttempts" : null,
    "lockDate" : null,
    "expireDate" : null,
    "latestLogin" : null,
    "passwordExpire" : null,
    "preferedLocale" : {
      "id" : 10000,
      "parentLocale" : null,
      "key" : null,
      "language" : null,
      "country" : null,
      "description" : null,
      "dateFormat" : null,
      "timeFormat" : null,
      "currency" : null,
      "decimalSymbol" : null,
      "digitalGrouping" : null,
      "organizationId" : null
    },
    "organization" : {
      "id" : 10496,
      "creationDate" : null,
      "lastModificationDate" : null,
      "key" : null,
      "parentOrganization" : null,
      "description" : null,
      "addressLine1" : null,
      "addressLine2" : null,
      "city" : null,
      "state" : null,
      "zipcode" : null,
      "district" : null,
      "country" : null,
      "taxid" : null,
      "preferedLocale" : null,
      "timeZone" : null,
      "listenerOrganizations" : null,
      "unitSystem" : null,
      "dsgOrgId" : null,
      "dsgOrganizationId" : null
    },
    "timeZone" : null,
    "udfs" : null,
    "organizations" : null,
    "userAllowedEquipments" : null,
    "userAllowedDrivers" : null,
    "userAllowedTags" : null,
    "key" : "baf4e276-0e6e-4655-9",
    "name" : "baf4e276-0e6e-4655-9",
    "addressLine1" : null,
    "addressLine2" : null,
    "city" : null,
    "state" : null,
    "zipCode" : null,
    "district" : null,
    "country" : null,
    "longitude" : null,
    "latitude" : null,
    "geocodingQuality" : null,
    "phone1" : null,
    "phone1Type" : null,
    "phone2" : null,
    "phone2Type" : null,
    "unitSystem" : "METRIC",
    "adpFileNumber" : null,
    "ipRangeProfile" : null,
    "groups" : null,
    "ticketTypes" : null,
    "restrictEquipments" : null,
    "restrictDrivers" : null,
    "restrictTags" : null,
    "isSystem" : null,
    "defaultEncoding" : null,
    "leader" : null,
    "subordinates" : null,
    "restrictUsers" : null,
    "externalUser" : false,
    "licenseNumber" : null,
    "driverType" : "DEFAULT",
    "licenseExpires" : null,
    "driverProfileCost" : {
      "id" : 10080,
      "creationDate" : null,
      "lastModificationDate" : null,
      "organization" : null,
      "description" : null,
      "fixedRouteCost" : null,
      "costPerHour" : null,
      "minimumTimeHours" : null,
      "overtimeRatePerHour" : null,
      "perDistanceRateKm" : null,
      "minimumDistance" : null,
      "perSize1Rate" : null,
      "perSize2Rate" : null,
      "perSize3Rate" : null,
      "minimumSize1" : null,
      "minimumSize2" : null,
      "minimumSize3" : null,
      "enabled" : null,
      "regularTimeMinutes" : null,
      "fixedStopCost" : null,
      "udfs" : null
    },
    "lastDrugsTest" : null,
    "lastPhysicalTest" : null,
    "lastAlcoholTest" : null,
    "smartTrack" : null,
    "firstName" : "baf4e276-0e6e-4655-9",
    "lastName" : ""
  },
  "description" : "RouteDriverPendingBalance Sample",
  "amount" : 12,
  "quantity" : 2
}

RouteEquipmentAssignment

Represents the association between a Route and an Equipment.

This endpoint accepts /RouteEquipment and /RouteEquipmentAssignment.

API Entity Name : RouteEquipmentAssignment
Refer to the CRUD Services to see the details about the create, retrieve, update and delete API methods.

Table 89. Attributes
Path Type Description Mandatory Natural ID

id

Integer(22)

The entity’s auto-increment id.

id

Integer(22)

The entity’s auto-increment id.

equipment

Equipment

Equipment id. (Version not found)

Yes

Yes

route

Route

Route id. (Version not found)

Yes

Yes

principal

Boolean

Has priority in sending information. (Version not found)

Yes

score

Double

Represents the equipment score. (Version not found)

Yes

dateScore

Date

Represents the date of the equipment score. (Version not found)

Yes

JSON Example
{
  "route" : {
    "id" : 10438,
    "onRoute" : false
  },
  "equipment" : {
    "id" : 10203
  },
  "principal" : true,
  "score" : 80.0,
  "dateScore" : "2023-10-19T13:40:34Z"
}

RouteExtraLineItem

Represents the extra LineItem added to the Route.

This endpoint accepts /RouteExtraLineItem.

API Entity Name : RouteEquipmentAssignment
Refer to the CRUD Services to see the details about the create, retrieve, update and delete API methods.

Table 90. Attributes
Path Type Description Mandatory Natural ID

id

Integer(22)

The entity’s auto-increment id.

route

Route

Route Id. (Version not found)

Yes

sku

Sku

SKU Id. (Version not found)

Yes

Yes

plannedSize1

Double(22)

Planned quantity of extra products in size1.(Version not found)

Yes

plannedSize2

Double(22)

Planned quantity of extra products in size2.(Version not found)

plannedSize3

Double(22)

Planned quantity of extra products in size3.(Version not found)

availableSize1

Double(22)

Represents the quantity available in size1.(Version not found)

availableSize2

Double(22)

Represents the quantity available in size2(Version not found)

availableSize3

Double(22)

Represents the quantity available in size3(Version not found)

size1Alias

Double(22)

Represents the size1 associated with the RouteExtraLineItem.(Version not found)

size2Alias

Double(22)

Represents the size2 associated with the RouteExtraLineItem.(Version not found)

size3Alias

Double(22)

Represents the size3 associated with the RouteExtraLineItem.(Version not found)

JSON Example
{
  "sku" : {
    "id" : 10257
  },
  "route" : {
    "id" : 10393,
    "onRoute" : false
  },
  "plannedSize1" : 10.0,
  "plannedSize2" : 30.0,
  "plannedSize3" : 0.0,
  "availableSize1" : 5.0,
  "availableSize2" : 15.0,
  "availableSize3" : 0.0
}

RouteHelperAssignment

Represents the association between a Route and a Driver as a helper.

This endpoint accepts /RouteHelper and /RouteHelperAssignment.

API Entity Name : RouteHelperAssignment
Refer to the CRUD Services to see the details about the create, retrieve, update and delete API methods.

Table 91. Attributes
Path Type Description Mandatory Natural ID

id

Integer(22)

The entity’s auto-increment id.

id

Integer(22)

The entity’s auto-increment id.

helper

Driver

Helper id. (Version not found)

Yes

Yes

route

Route

Route id. (Version not found)

Yes

Yes

JSON Example
{
  "id" : null,
  "creationDate" : null,
  "lastModificationDate" : null,
  "route" : {
    "id" : 10370,
    "creationDate" : null,
    "lastModifier" : null,
    "lastModificationDate" : null,
    "organization" : {
      "id" : 10378,
      "creationDate" : null,
      "lastModificationDate" : null,
      "key" : "6630b4b6-41f1-4eff-9",
      "parentOrganization" : null,
      "description" : "Organization Rest Docs Desc",
      "addressLine1" : null,
      "addressLine2" : null,
      "city" : "São Paulo",
      "state" : "São Paulo",
      "zipcode" : null,
      "district" : null,
      "country" : null,
      "taxid" : null,
      "preferedLocale" : {
        "id" : 10000,
        "parentLocale" : null,
        "key" : null,
        "language" : null,
        "country" : null,
        "description" : null,
        "dateFormat" : null,
        "timeFormat" : null,
        "currency" : null,
        "decimalSymbol" : null,
        "digitalGrouping" : null,
        "organizationId" : null
      },
      "timeZone" : {
        "id" : 10096,
        "description" : null,
        "rawOffsetMinutes" : null,
        "alias" : null,
        "timezoneName" : null
      },
      "listenerOrganizations" : null,
      "unitSystem" : "METRIC",
      "dsgOrgId" : null,
      "dsgOrganizationId" : null
    },
    "key" : "6630b4b6-41f1-4eff-9",
    "date" : "2023-10-19",
    "description" : "Sample Route Doc",
    "origin" : {
      "id" : 10328,
      "creationDate" : null,
      "lastModifier" : null,
      "lastModificationDate" : null,
      "organization" : {
        "id" : 10378,
        "creationDate" : null,
        "lastModificationDate" : null,
        "key" : "6630b4b6-41f1-4eff-9",
        "parentOrganization" : null,
        "description" : "Organization Rest Docs Desc",
        "addressLine1" : null,
        "addressLine2" : null,
        "city" : "São Paulo",
        "state" : "São Paulo",
        "zipcode" : null,
        "district" : null,
        "country" : null,
        "taxid" : null,
        "preferedLocale" : {
          "id" : 10000,
          "parentLocale" : null,
          "key" : null,
          "language" : null,
          "country" : null,
          "description" : null,
          "dateFormat" : null,
          "timeFormat" : null,
          "currency" : null,
          "decimalSymbol" : null,
          "digitalGrouping" : null,
          "organizationId" : null
        },
        "timeZone" : {
          "id" : 10096,
          "description" : null,
          "rawOffsetMinutes" : null,
          "alias" : null,
          "timezoneName" : null
        },
        "listenerOrganizations" : null,
        "unitSystem" : "METRIC",
        "dsgOrgId" : null,
        "dsgOrganizationId" : null
      },
      "key" : "6630b4b6-41f1-4eff-9_O",
      "accountType" : null,
      "locationType" : {
        "id" : 10328,
        "creationDate" : null,
        "lastModificationDate" : null,
        "organization" : {
          "id" : 10378,
          "creationDate" : null,
          "lastModificationDate" : null,
          "key" : "6630b4b6-41f1-4eff-9",
          "parentOrganization" : null,
          "description" : "Organization Rest Docs Desc",
          "addressLine1" : null,
          "addressLine2" : null,
          "city" : "São Paulo",
          "state" : "São Paulo",
          "zipcode" : null,
          "district" : null,
          "country" : null,
          "taxid" : null,
          "preferedLocale" : {
            "id" : 10000,
            "parentLocale" : null,
            "key" : null,
            "language" : null,
            "country" : null,
            "description" : null,
            "dateFormat" : null,
            "timeFormat" : null,
            "currency" : null,
            "decimalSymbol" : null,
            "digitalGrouping" : null,
            "organizationId" : null
          },
          "timeZone" : {
            "id" : 10096,
            "description" : null,
            "rawOffsetMinutes" : null,
            "alias" : null,
            "timezoneName" : null
          },
          "listenerOrganizations" : null,
          "unitSystem" : "METRIC",
          "dsgOrgId" : null,
          "dsgOrganizationId" : null
        },
        "key" : "6630b4b6-41f1-4eff-9_OLocTypeDoc",
        "description" : "Sample LocationType",
        "showOnMobileCreate" : null,
        "enabled" : true
      },
      "timeWindowType" : null,
      "locationOverrideTimeWindows" : null,
      "serviceTimeType" : null,
      "udfs" : null,
      "description" : "Location - Description Sample",
      "taxID" : null,
      "addressLine1" : null,
      "addressLine2" : null,
      "city" : "FortalezaDoc",
      "state" : "Ceará",
      "zipCode" : null,
      "district" : null,
      "country" : "BR",
      "longitude" : -38.46933,
      "geocodingQuality" : null,
      "latitude" : -3.734536,
      "phone1" : "+55 (85) 9 9988-7766",
      "phone1Type" : "3",
      "phone2" : null,
      "phone2Type" : null,
      "email" : "example.greenmile@gogreen.com",
      "deliveryInstructions" : "Sample Delivery Instructions.",
      "deliveryRadius" : 20,
      "deliveryDays" : null,
      "nonHelperFixedTimeSecs" : null,
      "nonHelperVarTimeSecs" : null,
      "helperFixedTimeSecs" : null,
      "helperVarTimeSecs" : null,
      "perSize1Rate" : null,
      "fixedCost" : null,
      "consignees" : null,
      "geocodingDate" : null,
      "geocodingLastCheck" : null,
      "geocodingUser" : null,
      "timeZone" : null,
      "allowedUsers" : null,
      "enabled" : null,
      "hasGeofence" : false,
      "creditLimit" : 1000,
      "legalName" : "Location's Legal Name",
      "taxType" : null,
      "appliedTax" : null,
      "locationPaymentMethods" : null
    },
    "origLatitude" : -3.734536,
    "origLongitude" : -38.46933,
    "destination" : {
      "id" : 10329,
      "creationDate" : null,
      "lastModifier" : null,
      "lastModificationDate" : null,
      "organization" : {
        "id" : 10378,
        "creationDate" : null,
        "lastModificationDate" : null,
        "key" : "6630b4b6-41f1-4eff-9",
        "parentOrganization" : null,
        "description" : "Organization Rest Docs Desc",
        "addressLine1" : null,
        "addressLine2" : null,
        "city" : "São Paulo",
        "state" : "São Paulo",
        "zipcode" : null,
        "district" : null,
        "country" : null,
        "taxid" : null,
        "preferedLocale" : {
          "id" : 10000,
          "parentLocale" : null,
          "key" : null,
          "language" : null,
          "country" : null,
          "description" : null,
          "dateFormat" : null,
          "timeFormat" : null,
          "currency" : null,
          "decimalSymbol" : null,
          "digitalGrouping" : null,
          "organizationId" : null
        },
        "timeZone" : {
          "id" : 10096,
          "description" : null,
          "rawOffsetMinutes" : null,
          "alias" : null,
          "timezoneName" : null
        },
        "listenerOrganizations" : null,
        "unitSystem" : "METRIC",
        "dsgOrgId" : null,
        "dsgOrganizationId" : null
      },
      "key" : "6630b4b6-41f1-4eff-9_D",
      "accountType" : null,
      "locationType" : {
        "id" : 10329,
        "creationDate" : null,
        "lastModificationDate" : null,
        "organization" : {
          "id" : 10378,
          "creationDate" : null,
          "lastModificationDate" : null,
          "key" : "6630b4b6-41f1-4eff-9",
          "parentOrganization" : null,
          "description" : "Organization Rest Docs Desc",
          "addressLine1" : null,
          "addressLine2" : null,
          "city" : "São Paulo",
          "state" : "São Paulo",
          "zipcode" : null,
          "district" : null,
          "country" : null,
          "taxid" : null,
          "preferedLocale" : {
            "id" : 10000,
            "parentLocale" : null,
            "key" : null,
            "language" : null,
            "country" : null,
            "description" : null,
            "dateFormat" : null,
            "timeFormat" : null,
            "currency" : null,
            "decimalSymbol" : null,
            "digitalGrouping" : null,
            "organizationId" : null
          },
          "timeZone" : {
            "id" : 10096,
            "description" : null,
            "rawOffsetMinutes" : null,
            "alias" : null,
            "timezoneName" : null
          },
          "listenerOrganizations" : null,
          "unitSystem" : "METRIC",
          "dsgOrgId" : null,
          "dsgOrganizationId" : null
        },
        "key" : "6630b4b6-41f1-4eff-9_DLocTypeDoc",
        "description" : "Sample LocationType",
        "showOnMobileCreate" : null,
        "enabled" : true
      },
      "timeWindowType" : null,
      "locationOverrideTimeWindows" : null,
      "serviceTimeType" : null,
      "udfs" : null,
      "description" : "Location - Description Sample",
      "taxID" : null,
      "addressLine1" : null,
      "addressLine2" : null,
      "city" : "FortalezaDoc",
      "state" : "Ceará",
      "zipCode" : null,
      "district" : null,
      "country" : "BR",
      "longitude" : -38.46933,
      "geocodingQuality" : null,
      "latitude" : -3.734536,
      "phone1" : "+55 (85) 9 9988-7766",
      "phone1Type" : "3",
      "phone2" : null,
      "phone2Type" : null,
      "email" : "example.greenmile@gogreen.com",
      "deliveryInstructions" : "Sample Delivery Instructions.",
      "deliveryRadius" : 20,
      "deliveryDays" : null,
      "nonHelperFixedTimeSecs" : null,
      "nonHelperVarTimeSecs" : null,
      "helperFixedTimeSecs" : null,
      "helperVarTimeSecs" : null,
      "perSize1Rate" : null,
      "fixedCost" : null,
      "consignees" : null,
      "geocodingDate" : null,
      "geocodingLastCheck" : null,
      "geocodingUser" : null,
      "timeZone" : null,
      "allowedUsers" : null,
      "enabled" : null,
      "hasGeofence" : false,
      "creditLimit" : 1000,
      "legalName" : "Location's Legal Name",
      "taxType" : null,
      "appliedTax" : null,
      "locationPaymentMethods" : null
    },
    "destLatitude" : -3.734536,
    "destLongitude" : -38.46933,
    "firstStopIsOrigin" : null,
    "lastStopIsDestination" : false,
    "stops" : null,
    "extraLineItems" : null,
    "udfs" : null,
    "baseLineArrival" : null,
    "baseLineDeparture" : null,
    "plannedArrival" : 1697722370012,
    "plannedDeparture" : 1697722370012,
    "projectedArrival" : null,
    "projectedDeparture" : null,
    "actualArrival" : null,
    "actualDeparture" : null,
    "baseLineDistance" : null,
    "plannedDistance" : null,
    "projectedDistance" : null,
    "actualDistance" : null,
    "baseLineComplete" : null,
    "plannedComplete" : 1697722370012,
    "projectedComplete" : null,
    "actualComplete" : null,
    "actualStartDataQuality" : null,
    "actualDistanceDataQuality" : null,
    "actualCompleteDataQuality" : null,
    "actualDepartureDataQuality" : null,
    "baseLineCost" : null,
    "plannedCost" : null,
    "actualCost" : null,
    "baseLineStart" : null,
    "plannedStart" : 1697722370012,
    "projectedStart" : null,
    "actualStart" : null,
    "hasHelper" : false,
    "driverAssignments" : null,
    "equipmentAssignments" : null,
    "tagAssignments" : null,
    "locationPendingPayments" : null,
    "driverPendingBalances" : null,
    "additionalMaterials" : null,
    "consignedSkus" : null,
    "holderMaterials" : null,
    "manifests" : null,
    "notLoadedSkus" : null,
    "totalStops" : null,
    "canceledStops" : null,
    "undeliveredStops" : null,
    "redeliveredStops" : null,
    "actualDepartures" : null,
    "totalStopsInProgress" : null,
    "status" : null,
    "actualTravelTimeMinutes" : null,
    "plannedTravelTimeMinutes" : null,
    "baselineTravelTimeMinutes" : null,
    "hasPicture" : null,
    "actualSize1" : null,
    "actualSize2" : null,
    "actualSize3" : null,
    "baselineSize1" : null,
    "baselineSize2" : null,
    "baselineSize3" : null,
    "plannedSize1" : null,
    "plannedSize2" : null,
    "plannedSize3" : null,
    "actualPickupSize1" : null,
    "actualPickupSize2" : null,
    "actualPickupSize3" : null,
    "baselinePickupSize1" : null,
    "baselinePickupSize2" : null,
    "baselinePickupSize3" : null,
    "plannedPickupSize1" : null,
    "plannedPickupSize2" : null,
    "plannedPickupSize3" : null,
    "hasGps" : null,
    "lastUpdatedProjectedTime" : null,
    "helperAssignments" : null,
    "actualDistanceRecalculatedAt" : null,
    "size1AliasConfig" : null,
    "size2AliasConfig" : null,
    "size3AliasConfig" : null,
    "resequenceMethod" : null,
    "amountReceived" : null,
    "reopenedDate" : null,
    "reopenedBy" : null,
    "exceededLicense" : null,
    "proactiveRouteOptConfig" : null,
    "proactiveRouteOptPending" : null,
    "proactiveRouteOptApplied" : null,
    "unsuccessfulDelivery" : null,
    "proactiveRouteOptSimulation" : null,
    "proactiveRouteOptTimestamp" : null,
    "onRoute" : false
  },
  "helper" : {
    "id" : 10261,
    "login" : "6630b4b6-41f1-4eff-9",
    "email" : null,
    "enabled" : null,
    "failedAttempts" : null,
    "lockDate" : null,
    "expireDate" : null,
    "latestLogin" : null,
    "passwordExpire" : null,
    "preferedLocale" : {
      "id" : 10000,
      "parentLocale" : null,
      "key" : null,
      "language" : null,
      "country" : null,
      "description" : null,
      "dateFormat" : null,
      "timeFormat" : null,
      "currency" : null,
      "decimalSymbol" : null,
      "digitalGrouping" : null,
      "organizationId" : null
    },
    "organization" : {
      "id" : 10378,
      "creationDate" : null,
      "lastModificationDate" : null,
      "key" : "6630b4b6-41f1-4eff-9",
      "parentOrganization" : null,
      "description" : "Organization Rest Docs Desc",
      "addressLine1" : null,
      "addressLine2" : null,
      "city" : "São Paulo",
      "state" : "São Paulo",
      "zipcode" : null,
      "district" : null,
      "country" : null,
      "taxid" : null,
      "preferedLocale" : {
        "id" : 10000,
        "parentLocale" : null,
        "key" : null,
        "language" : null,
        "country" : null,
        "description" : null,
        "dateFormat" : null,
        "timeFormat" : null,
        "currency" : null,
        "decimalSymbol" : null,
        "digitalGrouping" : null,
        "organizationId" : null
      },
      "timeZone" : {
        "id" : 10096,
        "description" : null,
        "rawOffsetMinutes" : null,
        "alias" : null,
        "timezoneName" : null
      },
      "listenerOrganizations" : null,
      "unitSystem" : "METRIC",
      "dsgOrgId" : null,
      "dsgOrganizationId" : null
    },
    "timeZone" : null,
    "udfs" : null,
    "organizations" : null,
    "userAllowedEquipments" : null,
    "userAllowedDrivers" : null,
    "userAllowedTags" : null,
    "key" : "6630b4b6-41f1-4eff-9",
    "name" : "6630b4b6-41f1-4eff-9",
    "addressLine1" : null,
    "addressLine2" : null,
    "city" : null,
    "state" : null,
    "zipCode" : null,
    "district" : null,
    "country" : null,
    "longitude" : null,
    "latitude" : null,
    "geocodingQuality" : null,
    "phone1" : null,
    "phone1Type" : null,
    "phone2" : null,
    "phone2Type" : null,
    "unitSystem" : "METRIC",
    "adpFileNumber" : null,
    "ipRangeProfile" : null,
    "groups" : null,
    "ticketTypes" : null,
    "restrictEquipments" : null,
    "restrictDrivers" : null,
    "restrictTags" : null,
    "isSystem" : null,
    "defaultEncoding" : null,
    "leader" : null,
    "subordinates" : null,
    "restrictUsers" : null,
    "externalUser" : false,
    "licenseNumber" : null,
    "driverType" : "HELPER",
    "licenseExpires" : null,
    "driverProfileCost" : {
      "id" : 10065,
      "creationDate" : null,
      "lastModificationDate" : null,
      "organization" : {
        "id" : 10378,
        "creationDate" : null,
        "lastModificationDate" : null,
        "key" : "6630b4b6-41f1-4eff-9",
        "parentOrganization" : null,
        "description" : "Organization Rest Docs Desc",
        "addressLine1" : null,
        "addressLine2" : null,
        "city" : "São Paulo",
        "state" : "São Paulo",
        "zipcode" : null,
        "district" : null,
        "country" : null,
        "taxid" : null,
        "preferedLocale" : {
          "id" : 10000,
          "parentLocale" : null,
          "key" : null,
          "language" : null,
          "country" : null,
          "description" : null,
          "dateFormat" : null,
          "timeFormat" : null,
          "currency" : null,
          "decimalSymbol" : null,
          "digitalGrouping" : null,
          "organizationId" : null
        },
        "timeZone" : {
          "id" : 10096,
          "description" : null,
          "rawOffsetMinutes" : null,
          "alias" : null,
          "timezoneName" : null
        },
        "listenerOrganizations" : null,
        "unitSystem" : "METRIC",
        "dsgOrgId" : null,
        "dsgOrganizationId" : null
      },
      "description" : "6630b4b6-41f1-4eff-9_DPC Sample",
      "fixedRouteCost" : 1200,
      "costPerHour" : 15,
      "minimumTimeHours" : 8,
      "overtimeRatePerHour" : 30,
      "perDistanceRateKm" : 4,
      "minimumDistance" : 10000,
      "perSize1Rate" : 1,
      "perSize2Rate" : null,
      "perSize3Rate" : null,
      "minimumSize1" : 10,
      "minimumSize2" : null,
      "minimumSize3" : null,
      "enabled" : true,
      "regularTimeMinutes" : 10,
      "fixedStopCost" : 10,
      "udfs" : null
    },
    "lastDrugsTest" : null,
    "lastPhysicalTest" : null,
    "lastAlcoholTest" : null,
    "smartTrack" : null,
    "firstName" : "6630b4b6-41f1-4eff-9",
    "lastName" : ""
  }
}

RouteHolderMaterial

Represents returnable objects that must be in the driver’s truck at the end of the route. Example: bottles, containers.

API Entity Name : RouteHolderMaterial
Refer to the CRUD Services to see the details about the create, retrieve, update and delete API methods.

Table 92. Attributes
Path Type Description Mandatory Natural ID

route

Route

Route id. (Version not found)

Yes

Yes

sku

Sku

SKU id. (Version not found)

Yes

Yes

transport

Transport

Transport id. (Version not found)

Yes

Yes

size1Quantity

Double(22)

Quantity of size1. (Version not found)

size2Quantity

Double(22)

Quantity of size2. (Version not found)

size3Quantity

Double(22)

Quantity of size3. (Version not found)

size1Alias

SizeAlias

Size1 alias. (Version not found)

size2Alias

SizeAlias

Size2 alias. (Version not found)

size3Alias

SizeAlias

Size3 alias. (Version not found)

JSON Example
{
  "route" : {
    "id" : 10376,
    "onRoute" : false
  },
  "sku" : {
    "id" : 10229
  },
  "transport" : {
    "id" : 10020
  },
  "size1Alias" : {
    "id" : 10136
  },
  "size1Quantity" : 12.0,
  "size2Alias" : {
    "id" : 10137
  },
  "size2Quantity" : 1.0,
  "size3Alias" : {
    "id" : 10138
  },
  "size3Quantity" : 4.0
}

RouteLocationPendingPayment

Represents an outstanding balance of a location on a route.

API Entity Name : RouteLocationPendingPayment
Refer to the CRUD Services to see the details about the create, retrieve, update and delete API methods.

Table 93. Attributes
Path Type Description Mandatory Natural ID

id

Integer(22)

The entity’s auto-increment id.

documentKey

String(45)

Document key. (Version not found)

Yes

route

Route

Route id. (Version not found)

Yes

Yes

location

Location

Location id. (Version not found)

Yes

amount

Double(22)

Value of the pendency. (Version not found)

Yes

saleDate

Date

Sale date. (Version not found)

Yes

dueDate

Date

Due date of the pendency. (Version not found)

Yes

paymentDocument

String(90)

Payment Document. (Version not found)

Yes

paymentMethod

PaymentMethod

PaymentMethod id. (Version not found)

amountPayed

Double(22)

Amount Payed. (Version not found)

remark

String(45)

Observations on the pendency. (Version not found)

companyTax

String(45)

Company tax. (Version not found)

year

Integer(22)

The Year of payment pending. (Version not found)

invoice

String(45)

Invoice code. Example: 321-333213. (Version not found)

JSON Example
{
  "route" : {
    "id" : 10385,
    "onRoute" : false
  },
  "location" : {
    "id" : 10358
  },
  "amount" : 45,
  "amountPayed" : 45,
  "saleDate" : "2023-10-19T13:34:39Z",
  "dueDate" : "2023-10-19T13:34:39Z",
  "remark" : "remark",
  "documentKey" : "DocKey",
  "companyTax" : "TAX",
  "year" : 2018,
  "invoice" : "123-3232",
  "paymentDocument" : "5533612374",
  "paymentMethod" : {
    "id" : 10020
  }
}

RouteManifest

Represents a general summary of the route, containing sku information and which transport it belongs to.

API Entity Name : RouteManifest
Refer to the CRUD Services to see the details about the create, retrieve, update and delete API methods.

Table 94. Attributes
Path Type Description Mandatory Natural ID

id

Integer(22)

The entity’s auto-increment id.

route

Route

Route id. (Version not found)

Yes

Yes

sku

Sku

SKU id. (Version not found)

Yes

Yes

transport

Transport

Transport id. (Version not found)

Yes

Yes

size1

Double(22)

Size1 value. (Version not found)

size2

Double(22)

Size2 value. (Version not found)

size3

Double(22)

Size3 value. (Version not found)

udfs

RouteManifestUDF

User’s Defined Fields associated to RouteManifest.(Version not found)

size1Alias

SizeAlias

Represents the size1 associated with the RouteManifest.(Version not found)

size2Alias

SizeAlias

Represents the size2 associated with the RouteManifest.(Version not found)

size3Alias

SizeAlias

Represents the size3 associated with the RouteManifest.(Version not found)

JSON Example
{
  "route" : {
    "id" : 10396,
    "onRoute" : false
  },
  "sku" : {
    "id" : 10275
  },
  "transport" : {
    "id" : 10060
  },
  "size1" : 12.0,
  "size2" : 14.0,
  "size3" : 22.0,
  "size1Alias" : {
    "id" : 10202
  },
  "size2Alias" : {
    "id" : 10203
  },
  "size3Alias" : {
    "id" : 10204
  }
}

RouteManifestUDF

Represents a user defined filed within a RouteManifest.

API Entity Name : RouteManifestUDF
This entity is created when a RouteManifest has udfs.

The example below shows how it is included in a RouteManifest. The udfs attribute is a list of RouteManifestUDFs.
Table 95. Attributes
Path Type Description Mandatory Natural ID

id

Integer(22)

The entity’s auto-increment id.

udfs

RouteManifest

User’s Defined Fields associated to Order.

Yes

udfs.[].key

String(45)

Key of User Defined Field.

Yes

udfs.[].value

String(255)

Value of User Defined Field.

Yes

JSON Example
{
  "route" : {
    "id" : 10406,
    "onRoute" : false
  },
  "sku" : {
    "id" : 10305
  },
  "transport" : {
    "id" : 10063
  },
  "size1" : 12.0,
  "size2" : 14.0,
  "size3" : 22.0,
  "size1Alias" : {
    "id" : 10241
  },
  "size2Alias" : {
    "id" : 10242
  },
  "size3Alias" : {
    "id" : 10243
  },
  "udfs" : [ {
    "key" : "RouteManifestUDF",
    "value" : "routeManifestUDF"
  } ]
}

RouteSummary

Represents a general summary of the route.

API Entity Name : RouteSummary
This entity is created after the route is completed. Refer to the CRUD Services to see the details about the retrieve API methods.

This endpoint will be available from GMS version 6.26-rc-12XX
Table 96. Attributes
Path Type Description

id

Integer(22)

The entity’s auto-increment id.

route

<<Route>>

Route id.(Version not found)

routeAvgSpeed

Double

Represents the average speed on the route.(Version not found)

routeMaxSpeed

Double

Represents the maximum speed on the route.(Version not found)

startCoordLatitude

Double

Represents the latitude when starting the route.(Version not found)

startCoordLongitude

Double

Represents the longitude when starting the route.(Version not found)

startCoordDate

Date

Represents the start date of the route.(Version not found)

completeCoordLatitude

Double

Represents the latitude at the end of the route.(Version not found)

completeCoordLongitude

Double

Represents longitude at the end of the route.(Version not found)

completeCoordDate

Date

Represents the date of the completed route.(Version not found)

Example

Request
POST /RouteSummary/restrictions?criteria=%7B%22filters%22%3A%5B%22*%22%2C%22route.key%22%5D%7D
{
  "id" : null,
  "route" : {
    "id" : 10443,
    "creationDate" : null,
    "lastModifier" : null,
    "lastModificationDate" : null,
    "organization" : {
      "id" : 10551,
      "creationDate" : null,
      "lastModificationDate" : null,
      "key" : null,
      "parentOrganization" : null,
      "description" : null,
      "addressLine1" : null,
      "addressLine2" : null,
      "city" : null,
      "state" : null,
      "zipcode" : null,
      "district" : null,
      "country" : null,
      "taxid" : null,
      "preferedLocale" : null,
      "timeZone" : null,
      "listenerOrganizations" : null,
      "unitSystem" : null,
      "dsgOrgId" : null,
      "dsgOrganizationId" : null
    },
    "key" : "61be7527-2dec-471c-b",
    "date" : "2023-10-19",
    "description" : "Sample Route Doc",
    "origin" : {
      "id" : 10483,
      "creationDate" : null,
      "lastModifier" : null,
      "lastModificationDate" : null,
      "organization" : {
        "id" : 10551,
        "creationDate" : null,
        "lastModificationDate" : null,
        "key" : null,
        "parentOrganization" : null,
        "description" : null,
        "addressLine1" : null,
        "addressLine2" : null,
        "city" : null,
        "state" : null,
        "zipcode" : null,
        "district" : null,
        "country" : null,
        "taxid" : null,
        "preferedLocale" : null,
        "timeZone" : null,
        "listenerOrganizations" : null,
        "unitSystem" : null,
        "dsgOrgId" : null,
        "dsgOrganizationId" : null
      },
      "key" : "61be7527-2dec-471c-b_O",
      "accountType" : null,
      "locationType" : {
        "id" : 10477,
        "creationDate" : null,
        "lastModificationDate" : null,
        "organization" : {
          "id" : 10551,
          "creationDate" : null,
          "lastModificationDate" : null,
          "key" : null,
          "parentOrganization" : null,
          "description" : null,
          "addressLine1" : null,
          "addressLine2" : null,
          "city" : null,
          "state" : null,
          "zipcode" : null,
          "district" : null,
          "country" : null,
          "taxid" : null,
          "preferedLocale" : null,
          "timeZone" : null,
          "listenerOrganizations" : null,
          "unitSystem" : null,
          "dsgOrgId" : null,
          "dsgOrganizationId" : null
        },
        "key" : "61be7527-2dec-471c-b_OLocTypeDoc",
        "description" : "Sample LocationType",
        "showOnMobileCreate" : null,
        "enabled" : true
      },
      "timeWindowType" : null,
      "locationOverrideTimeWindows" : null,
      "serviceTimeType" : null,
      "udfs" : null,
      "description" : "Location - Description Sample",
      "taxID" : null,
      "addressLine1" : null,
      "addressLine2" : null,
      "city" : "FortalezaDoc",
      "state" : "Ceará",
      "zipCode" : null,
      "district" : null,
      "country" : "BR",
      "longitude" : -38.46933,
      "geocodingQuality" : null,
      "latitude" : -3.734536,
      "phone1" : "+55 (85) 9 9988-7766",
      "phone1Type" : "3",
      "phone2" : null,
      "phone2Type" : null,
      "email" : "example.greenmile@gogreen.com",
      "deliveryInstructions" : "Sample Delivery Instructions.",
      "deliveryRadius" : 20,
      "deliveryDays" : null,
      "nonHelperFixedTimeSecs" : null,
      "nonHelperVarTimeSecs" : null,
      "helperFixedTimeSecs" : null,
      "helperVarTimeSecs" : null,
      "perSize1Rate" : null,
      "fixedCost" : null,
      "consignees" : null,
      "geocodingDate" : null,
      "geocodingLastCheck" : null,
      "geocodingUser" : null,
      "timeZone" : null,
      "allowedUsers" : null,
      "enabled" : null,
      "hasGeofence" : false,
      "creditLimit" : 1000,
      "legalName" : "Location's Legal Name",
      "taxType" : null,
      "appliedTax" : null,
      "locationPaymentMethods" : null
    },
    "origLatitude" : -3.734536,
    "origLongitude" : -38.46933,
    "destination" : {
      "id" : 10484,
      "creationDate" : null,
      "lastModifier" : null,
      "lastModificationDate" : null,
      "organization" : {
        "id" : 10551,
        "creationDate" : null,
        "lastModificationDate" : null,
        "key" : null,
        "parentOrganization" : null,
        "description" : null,
        "addressLine1" : null,
        "addressLine2" : null,
        "city" : null,
        "state" : null,
        "zipcode" : null,
        "district" : null,
        "country" : null,
        "taxid" : null,
        "preferedLocale" : null,
        "timeZone" : null,
        "listenerOrganizations" : null,
        "unitSystem" : null,
        "dsgOrgId" : null,
        "dsgOrganizationId" : null
      },
      "key" : "61be7527-2dec-471c-b_D",
      "accountType" : null,
      "locationType" : {
        "id" : 10478,
        "creationDate" : null,
        "lastModificationDate" : null,
        "organization" : {
          "id" : 10551,
          "creationDate" : null,
          "lastModificationDate" : null,
          "key" : null,
          "parentOrganization" : null,
          "description" : null,
          "addressLine1" : null,
          "addressLine2" : null,
          "city" : null,
          "state" : null,
          "zipcode" : null,
          "district" : null,
          "country" : null,
          "taxid" : null,
          "preferedLocale" : null,
          "timeZone" : null,
          "listenerOrganizations" : null,
          "unitSystem" : null,
          "dsgOrgId" : null,
          "dsgOrganizationId" : null
        },
        "key" : "61be7527-2dec-471c-b_DLocTypeDoc",
        "description" : "Sample LocationType",
        "showOnMobileCreate" : null,
        "enabled" : true
      },
      "timeWindowType" : null,
      "locationOverrideTimeWindows" : null,
      "serviceTimeType" : null,
      "udfs" : null,
      "description" : "Location - Description Sample",
      "taxID" : null,
      "addressLine1" : null,
      "addressLine2" : null,
      "city" : "FortalezaDoc",
      "state" : "Ceará",
      "zipCode" : null,
      "district" : null,
      "country" : "BR",
      "longitude" : -38.46933,
      "geocodingQuality" : null,
      "latitude" : -3.734536,
      "phone1" : "+55 (85) 9 9988-7766",
      "phone1Type" : "3",
      "phone2" : null,
      "phone2Type" : null,
      "email" : "example.greenmile@gogreen.com",
      "deliveryInstructions" : "Sample Delivery Instructions.",
      "deliveryRadius" : 20,
      "deliveryDays" : null,
      "nonHelperFixedTimeSecs" : null,
      "nonHelperVarTimeSecs" : null,
      "helperFixedTimeSecs" : null,
      "helperVarTimeSecs" : null,
      "perSize1Rate" : null,
      "fixedCost" : null,
      "consignees" : null,
      "geocodingDate" : null,
      "geocodingLastCheck" : null,
      "geocodingUser" : null,
      "timeZone" : null,
      "allowedUsers" : null,
      "enabled" : null,
      "hasGeofence" : false,
      "creditLimit" : 1000,
      "legalName" : "Location's Legal Name",
      "taxType" : null,
      "appliedTax" : null,
      "locationPaymentMethods" : null
    },
    "destLatitude" : -3.734536,
    "destLongitude" : -38.46933,
    "firstStopIsOrigin" : null,
    "lastStopIsDestination" : false,
    "stops" : null,
    "extraLineItems" : null,
    "udfs" : null,
    "baseLineArrival" : null,
    "baseLineDeparture" : null,
    "plannedArrival" : 1697722857923,
    "plannedDeparture" : 1697722857923,
    "projectedArrival" : null,
    "projectedDeparture" : null,
    "actualArrival" : null,
    "actualDeparture" : null,
    "baseLineDistance" : null,
    "plannedDistance" : null,
    "projectedDistance" : null,
    "actualDistance" : null,
    "baseLineComplete" : null,
    "plannedComplete" : 1697722857923,
    "projectedComplete" : null,
    "actualComplete" : null,
    "actualStartDataQuality" : null,
    "actualDistanceDataQuality" : null,
    "actualCompleteDataQuality" : null,
    "actualDepartureDataQuality" : null,
    "baseLineCost" : null,
    "plannedCost" : null,
    "actualCost" : null,
    "baseLineStart" : null,
    "plannedStart" : 1697722857923,
    "projectedStart" : null,
    "actualStart" : null,
    "hasHelper" : false,
    "driverAssignments" : null,
    "equipmentAssignments" : null,
    "tagAssignments" : null,
    "locationPendingPayments" : null,
    "driverPendingBalances" : null,
    "additionalMaterials" : null,
    "consignedSkus" : null,
    "holderMaterials" : null,
    "manifests" : null,
    "notLoadedSkus" : null,
    "totalStops" : null,
    "canceledStops" : null,
    "undeliveredStops" : null,
    "redeliveredStops" : null,
    "actualDepartures" : null,
    "totalStopsInProgress" : null,
    "status" : null,
    "actualTravelTimeMinutes" : null,
    "plannedTravelTimeMinutes" : null,
    "baselineTravelTimeMinutes" : null,
    "hasPicture" : null,
    "actualSize1" : null,
    "actualSize2" : null,
    "actualSize3" : null,
    "baselineSize1" : null,
    "baselineSize2" : null,
    "baselineSize3" : null,
    "plannedSize1" : null,
    "plannedSize2" : null,
    "plannedSize3" : null,
    "actualPickupSize1" : null,
    "actualPickupSize2" : null,
    "actualPickupSize3" : null,
    "baselinePickupSize1" : null,
    "baselinePickupSize2" : null,
    "baselinePickupSize3" : null,
    "plannedPickupSize1" : null,
    "plannedPickupSize2" : null,
    "plannedPickupSize3" : null,
    "hasGps" : null,
    "lastUpdatedProjectedTime" : null,
    "helperAssignments" : null,
    "actualDistanceRecalculatedAt" : null,
    "size1AliasConfig" : null,
    "size2AliasConfig" : null,
    "size3AliasConfig" : null,
    "resequenceMethod" : null,
    "amountReceived" : null,
    "reopenedDate" : null,
    "reopenedBy" : null,
    "exceededLicense" : null,
    "proactiveRouteOptConfig" : null,
    "proactiveRouteOptPending" : null,
    "proactiveRouteOptApplied" : null,
    "unsuccessfulDelivery" : null,
    "proactiveRouteOptSimulation" : null,
    "proactiveRouteOptTimestamp" : null,
    "onRoute" : false
  },
  "routeAvgSpeed" : 50.0,
  "routeMaxSpeed" : 100.0,
  "startCoordLatitude" : -3.7638033,
  "startCoordLongitude" : -38.4826255,
  "startCoordDate" : 1697719258092,
  "completeCoordLatitude" : -3.7409,
  "completeCoordLongitude" : -38.456,
  "completeCoordDate" : 1697722858092,
  "routeLunchDistance" : null,
  "routeBreakDistance" : null
}
Response
{
  "id" : 10000,
  "route" : {
    "id" : 10443,
    "organization" : {
      "id" : 10551
    },
    "key" : "61be7527-2dec-471c-b",
    "date" : "2023-10-19",
    "description" : "Sample Route Doc",
    "origin" : {
      "id" : 10483,
      "organization" : {
        "id" : 10551
      },
      "key" : "61be7527-2dec-471c-b_O",
      "locationType" : {
        "id" : 10477,
        "organization" : {
          "id" : 10551
        },
        "key" : "61be7527-2dec-471c-b_OLocTypeDoc",
        "description" : "Sample LocationType",
        "enabled" : true,
        "alternativeKey" : "61be7527-2dec-471c-b_OLocTypeDoc"
      },
      "description" : "Location - Description Sample",
      "city" : "FortalezaDoc",
      "state" : "Ceará",
      "country" : "BR",
      "longitude" : -38.46933,
      "latitude" : -3.734536,
      "phone1" : "+55 (85) 9 9988-7766",
      "phone1Type" : "3",
      "email" : "example.greenmile@gogreen.com",
      "deliveryInstructions" : "Sample Delivery Instructions.",
      "deliveryRadius" : 20,
      "hasGeofence" : false,
      "creditLimit" : 1000,
      "legalName" : "Location's Legal Name",
      "alternativeKey" : "61be7527-2dec-471c-b_O61be7527-2dec-471c-b_OLocTypeDoc"
    },
    "origLatitude" : -3.734536,
    "origLongitude" : -38.46933,
    "destination" : {
      "id" : 10484,
      "organization" : {
        "id" : 10551
      },
      "key" : "61be7527-2dec-471c-b_D",
      "locationType" : {
        "id" : 10478,
        "organization" : {
          "id" : 10551
        },
        "key" : "61be7527-2dec-471c-b_DLocTypeDoc",
        "description" : "Sample LocationType",
        "enabled" : true,
        "alternativeKey" : "61be7527-2dec-471c-b_DLocTypeDoc"
      },
      "description" : "Location - Description Sample",
      "city" : "FortalezaDoc",
      "state" : "Ceará",
      "country" : "BR",
      "longitude" : -38.46933,
      "latitude" : -3.734536,
      "phone1" : "+55 (85) 9 9988-7766",
      "phone1Type" : "3",
      "email" : "example.greenmile@gogreen.com",
      "deliveryInstructions" : "Sample Delivery Instructions.",
      "deliveryRadius" : 20,
      "hasGeofence" : false,
      "creditLimit" : 1000,
      "legalName" : "Location's Legal Name",
      "alternativeKey" : "61be7527-2dec-471c-b_D61be7527-2dec-471c-b_DLocTypeDoc"
    },
    "destLatitude" : -3.734536,
    "destLongitude" : -38.46933,
    "lastStopIsDestination" : false,
    "plannedArrival" : "2023-10-19T13:40:57+0000",
    "plannedDeparture" : "2023-10-19T13:40:57+0000",
    "plannedComplete" : "2023-10-19T13:40:57+0000",
    "plannedStart" : "2023-10-19T13:40:57+0000",
    "hasHelper" : false,
    "plannedServiceTime" : 0,
    "onRoute" : false
  },
  "routeAvgSpeed" : 50.0,
  "routeMaxSpeed" : 100.0,
  "startCoordLatitude" : -3.7638033,
  "startCoordLongitude" : -38.4826255,
  "startCoordDate" : "2023-10-19T12:40:58+0000",
  "completeCoordLatitude" : -3.7409,
  "completeCoordLongitude" : -38.456,
  "completeCoordDate" : "2023-10-19T13:40:58+0000"
}

ServiceTimeType

Represents a Service Time Type.

API Entity Name : ServiceTimeType
Refer to the CRUD Services to see the details about the create, retrieve, update and delete API methods.

Beside its ID, a ServiceTimeType is also uniquely identifiable by the key attribute.
Table 97. Attributes
Path Type Description Mandatory Natural ID

id

Integer(22)

The entity’s auto-increment id.

key

String(255)

ServiceTimeType’s key. (Version not found)

Yes

Yes

organization

Organization

Indicates Organization that this ServiceTimeType relates to. (Version not found)

Yes

Yes

description

String(45)

ServiceTimeType’s description. (Version not found)

Yes

nonHelperFixedTimeSecs

Integer(22)

The amount of time associated with a delivery. (Version not found)

Yes

nonHelperVarTimeSecs

Integer(22)

The amount of time associated with each size1 quantity. (Version not found)

Yes

helperFixedTimeSecs

Integer(22)

The amount of time associated with a delivery with Helper. (Version not found)

Yes

helperVarTimeSecs

Integer(22)

The amount of time associated with each size1 quantity with Helper. (Version not found)

Yes

enabled

Boolean

This attribute describes if the Service Time Type is enabled.When a register is disabled, it is can not be associated with new entities. (Version not found)

JSON Example
{
  "organization" : {
    "id" : 10473
  },
  "key" : "f53edbe5-1321-4aef-a",
  "description" : "Sample ServiceTimeType",
  "nonHelperFixedTimeSecs" : 3,
  "nonHelperVarTimeSecs" : 2,
  "helperFixedTimeSecs" : 23,
  "helperVarTimeSecs" : 12,
  "enabled" : true
}

SizeAlias

Represents a size.

API Entity Name : SizeAlias
Refer to the CRUD Services to see the details about the create, retrieve, update and delete API methods.

Beside its ID, a ServiceTimeType is also uniquely identifiable by the key attribute.
Table 98. Attributes
Path Type Description Mandatory Natural ID

id

Integer(22)

The entity’s auto-increment id.(Version not found)

key

String(45)

The unique database key associated with the specific SizeAlias template being defined. (Version not found)

Yes

Yes

description

String(45)

Description of sizeAlias. (Version not found)

Yes

preferredSize

Char(1)

Indicates the preferred size. (Version not found)

Yes

icon

String(255)

icon representing the sizeAlias. (Version not found)

sizeDecimalPlaces

(Version not found)

JSON Example
{
  "key" : "232ede68-76d4-4200-a",
  "description" : "Sample SizeAlias",
  "icon" : "ICON",
  "preferredSize" : "1",
  "sizeDecimalPlaces" : 2
}

Sku

A representation of a product or a service (Stock Keeping Unit). In our example, our SKU is "GreenMile Juice".

sku-example

API Entity Name : Sku
Refer to the CRUD Services to see the details about the create, retrieve, update and delete API methods.

Beside its ID, a Sku is also uniquely identifiable by the key attribute.
How to use restrictions criteria /Sku/restrictions
Table 99. Attributes
Path Type Description Mandatory Natural ID

id

Integer(22)

The entity’s auto-increment id.

key

String(45)

The entity’s key. (Version not found)

Yes

Yes

organization

Organization

Organization to which the SKU belongs. (Version not found)

Yes

Yes

description

String(255)

Description of the SKU. (Version not found)

Yes

enabled

Boolean

Indicates whether it is enabled. (Version not found)

brand

String(255)

The SKU brand. (Version not found)

skuType

SkuType

Represents the type of SKU.(Version not found)

skuGroup

SkuGroup

Represents the SKU group.(Version not found)

hasSecondaryBundle

Boolean

Identifies that the same material can be delivered in a secondary "packaging".(Version not found)

hasTertiaryBundle

Boolean

Identifies that the same material can be delivered in a tertiary "packaging".(Version not found)

skuSizeConversions

SkuSizeConversion

Sku related parent-child relationships.(Version not found)

udfs

[SkuUDF]

User’s Defined Fields associated to SKU.(Version not found)

skuMeasurementUnits

SkuMeasurementUnit

Sku related measurement units and conversion(Version not found)

baseUnit

SizeAlias

It is the smallest unit of how the product can be delivered. For example, this unit may be a bottle.(Version not found)

secondaryUnit

SizeAlias

It is the second level of how the product can be delivered. For example, a box.(Version not found)

secondaryQty

Double(22)

How many units of the base unit are necessary to compose the second unit.(Version not found)

secondaryCompound

Sku

Defines the material used to group the base units. In that case, the SKU it represents.(Version not found)

secondaryCompoundQty

Double(22)

How many units of the secondary compound are necessary to compose the second unit.(Version not found)

tertiaryUnit

SizeAlias

It is the third level of how the product can be delivered. For example, a container.(Version not found)

tertiaryQty

Double(22)

How many units of the secondary unit are necessary to compose the tertiary unit.(Version not found)

tertiaryCompound

Sku

Defines the material used to group the secondary units. In that case, the SKU it represents.(Version not found)

tertiaryCompoundQty

Double(22)

How many units of the tertiary compound are necessary to compose the tertiary unit.(Version not found)

JSON Example
{
  "organization" : {
    "id" : 10538
  },
  "key" : "0861bdca-9fb1-4342-b",
  "description" : "Sample SKU - Juice",
  "enabled" : true,
  "brand" : "Amazing",
  "skuType" : {
    "id" : 10157,
    "organization" : {
      "id" : 10538
    },
    "key" : "0861bdca-9fb1-4342-b",
    "description" : "SkuType Description"
  },
  "baseUnit" : {
    "id" : 10332,
    "key" : "0861bdca-9fb1-4342-bBottle",
    "description" : "Sample SizeAlias",
    "icon" : "ICON",
    "preferredSize" : "1",
    "sizeDecimalPlaces" : 2
  },
  "secondaryUnit" : {
    "id" : 10333,
    "key" : "0861bdca-9fb1-4342-bBox",
    "description" : "Sample SizeAlias",
    "icon" : "ICON",
    "preferredSize" : "1",
    "sizeDecimalPlaces" : 2
  },
  "tertiaryUnit" : {
    "id" : 10334,
    "key" : "0861bdca-9fb1-4342-bContainer",
    "description" : "Sample SizeAlias",
    "icon" : "ICON",
    "preferredSize" : "1",
    "sizeDecimalPlaces" : 2
  },
  "secondaryQty" : 4.0,
  "tertiaryQty" : 4.0,
  "secondaryCompound" : {
    "id" : 10359,
    "organization" : {
      "id" : 10538
    },
    "key" : "0861bdca-9fb1-4342-bSkuSecondary",
    "description" : "Sample SKU",
    "enabled" : true,
    "brand" : "Docik",
    "alternativeKey" : "0861bdca-9fb1-4342-bSkuSecondarynull"
  },
  "tertiaryCompound" : {
    "id" : 10360,
    "organization" : {
      "id" : 10538
    },
    "key" : "0861bdca-9fb1-4342-bSkuTertiary",
    "description" : "Sample SKU",
    "enabled" : true,
    "brand" : "Docik",
    "alternativeKey" : "0861bdca-9fb1-4342-bSkuTertiarynull"
  },
  "secondaryCompoundQty" : 1.0,
  "tertiaryCompoundQty" : 1.0
}

SkuGroup

Allows classification of SKUs into custom groups.

API Entity Name : SkuGroup
Refer to the CRUD Services to see the details about the create, retrieve, update and delete API methods.

Beside its ID, a SkuGroup is also uniquely identifiable by the key attribute.
Table 100. Attributes
Path Type Description Mandatory Natural ID

id

Integer(22)

The entity’s auto-increment id.(Version not found)

key

String(45)

The entity’s key. (Version not found)

Yes

Yes

organization

Organization

Organization to which the SkuGroup belongs. (Version not found)

Yes

Yes

description

String(255)

Description of the SkuGroup. (Version not found)

Yes

JSON Example
{
  "organization" : {
    "id" : 10430
  },
  "key" : "Sku Group Example",
  "description" : "Sku Group Description"
}

SkuMeasurementUnit

Represents the table of unit of measure conversions for SKUs. (Ex. SKU 123 - Basic unit is bottle and, 1 box has 12 bottles).

API Entity Name : SkuMeasurementUnit
Refer to the CRUD Services to see the details about the create, retrieve, update and delete API methods.

Refer to "How to use restrictions criteria /SkuMeasurementUnit/restrictions" List by Example.
Table 101. Attributes
Path Type Description Mandatory Natural ID

id

Integer(22)

The entity’s auto-increment id.

organization

Organization

Organization to which the SkuMeasurementUnit belongs. (Version not found)

Yes

Yes

sku

Sku

SKU’s ID. Represents the SKU that is associated to the SkuMeasurementUnit. (Version not found)

Yes

Yes

baseUnit

SizeAlias

It is the smallest unit of how the product can be delivered. For example, this unit may be a bottle.(Version not found)

secondaryUnit

SizeAlias

It is the second level of how the product can be delivered. For example, a box.(Version not found)

hasSecondaryBundle

Boolean

Identifies that the same material can be delivered in a secondary "packaging". 0 or 1.(Version not found)

hasTertiaryBundle

Boolean

Identifies that the same material can be delivered in a tertiary "packaging". 0 or 1(Version not found)

defaultSecondaryUnit

Boolean

Identifies that this is the primary secondary unit for this SKU. 0 or 1.(Version not found)

secondaryUnit

SizeAlias

It is the second level of how the product can be delivered. For example, a box.(Version not found)

secondaryQty

Double(22)

How many units of the base unit are necessary to compose the second unit.(Version not found)

secondaryCompound

Sku

Defines the material used to group the base units. In that case, the SKU it represents.(Version not found)

secondaryCompoundQty

Double(22)

How many units of the secondary compound are necessary to compose the second unit.(Version not found)

tertiaryUnit

SizeAlias

It is the third level of how the product can be delivered. For example, a container.(Version not found)

tertiaryQty

Double(22)

How many units of the secondary unit are necessary to compose the tertiary unit.(Version not found)

tertiaryCompound

Sku

Defines the material used to group the secondary units. In that case, the SKU it represents.(Version not found)

tertiaryCompoundQty

Double(22)

How many units of the tertiary compound are necessary to compose the tertiary unit.(Version not found)

JSON Example
{
  "organization" : {
    "id" : 10452
  },
  "sku" : {
    "id" : 10284,
    "organization" : {
      "id" : 10452
    },
    "key" : "4b54f3e4-eff6-44db-8",
    "description" : "Sample SKU - Juice",
    "enabled" : true,
    "brand" : "Amazing",
    "skuType" : {
      "id" : 10114,
      "organization" : {
        "id" : 10452
      },
      "key" : "4b54f3e4-eff6-44db-8",
      "description" : "SkuType Description"
    },
    "baseUnit" : {
      "id" : 10220,
      "key" : "4b54f3e4-eff6-44db-8Bottle",
      "description" : "Sample SizeAlias",
      "icon" : "ICON",
      "preferredSize" : "1",
      "sizeDecimalPlaces" : 2
    },
    "secondaryUnit" : {
      "id" : 10221,
      "key" : "4b54f3e4-eff6-44db-8Box",
      "description" : "Sample SizeAlias",
      "icon" : "ICON",
      "preferredSize" : "1",
      "sizeDecimalPlaces" : 2
    },
    "tertiaryUnit" : {
      "id" : 10222,
      "key" : "4b54f3e4-eff6-44db-8Container",
      "description" : "Sample SizeAlias",
      "icon" : "ICON",
      "preferredSize" : "1",
      "sizeDecimalPlaces" : 2
    },
    "secondaryQty" : 4.0,
    "tertiaryQty" : 4.0,
    "secondaryCompound" : {
      "id" : 10282,
      "organization" : {
        "id" : 10452
      },
      "key" : "4b54f3e4-eff6-44db-8SkuSecondary",
      "description" : "Sample SKU",
      "enabled" : true,
      "brand" : "Docik",
      "alternativeKey" : "4b54f3e4-eff6-44db-8SkuSecondarynull"
    },
    "tertiaryCompound" : {
      "id" : 10283,
      "organization" : {
        "id" : 10452
      },
      "key" : "4b54f3e4-eff6-44db-8SkuTertiary",
      "description" : "Sample SKU",
      "enabled" : true,
      "brand" : "Docik",
      "alternativeKey" : "4b54f3e4-eff6-44db-8SkuTertiarynull"
    },
    "secondaryCompoundQty" : 1.0,
    "tertiaryCompoundQty" : 1.0,
    "alternativeKey" : "4b54f3e4-eff6-44db-8null"
  },
  "baseUnit" : {
    "id" : 10220,
    "key" : "4b54f3e4-eff6-44db-8Bottle",
    "description" : "Sample SizeAlias",
    "icon" : "ICON",
    "preferredSize" : "1",
    "sizeDecimalPlaces" : 2
  },
  "secondaryUnit" : {
    "id" : 10221,
    "key" : "4b54f3e4-eff6-44db-8Box",
    "description" : "Sample SizeAlias",
    "icon" : "ICON",
    "preferredSize" : "1",
    "sizeDecimalPlaces" : 2
  },
  "secondaryQty" : 30,
  "secondaryCompoundQty" : 1,
  "defaultSecondaryUnit" : true
}

SkuOrganizationPriceList

A representation of a price in a Sku.

API Entity Name : SkuOrganizationPriceList
Refer to the CRUD Services to see the details about the create, retrieve, update and delete API methods.

Table 102. Attributes
Path Type Description Mandatory Natural ID

sku

Sku

SKU’s id. (Version not found)

Yes

Yes

organization

Organization

Organization to which the SKU belongs. (Version not found)

Yes

sizeAlias

SizeAlias

Represents the sizeAlias associated with the SkuOrgPriceList. (Version not found)

Yes

price

Float(22)

SKU price. (Version not found)

Yes

tax

BigDecimal

SKU tax(Version not found)

appliedTax

BigDecimal

SKU tax applied(Version not found)

JSON Example
{
  "organization" : {
    "id" : 10489
  },
  "sku" : {
    "id" : 10322
  },
  "sizeAlias" : {
    "id" : 10264
  },
  "price" : 15,
  "tax" : 0.2,
  "appliedTax" : 5.0
}

SkuSizeConversion

This entity represents the relationship between two Sku delivered on the client.

  • sku: represents the Sku that is being delivered.

  • skuChild: represents the related Sku.

  • qty: represents the quantity of skuChild.

  • sizeAlias: represents the size associated with skuChild.

  • parentSkuSizeAlias: represents the size associated with the parent sizeAlias.

Example: GreenMile has a product called "Greenmile Juice" which is delivered to the customer with 24 bottles.

So the sku would be "Greenmile Juice", the skuChild would be "Bottle of the GreenMile", the sizeAlias ​​would be "Bottles" and the qty would be "24".

API Entity Name : SkuSizeConversion
Refer to the CRUD Services to see the details about the create, retrieve, update and delete API methods.

Table 103. Attributes
Path Type Description Mandatory Natural ID

sku

Sku

SKU’s ID. Represents the SKU that is being delivered. (Version not found)

Yes

Yes

skuChild

Sku

SkuChild’s ID. Represents the related SKU(Version not found)

Yes

Yes

sizeAlias

SizeAlias

Represents the sizeAlias associated with the SkuSizeConversion. (Version not found)

Yes

qty

Double(22)

Represents the quantity of skuChild (Version not found)

Yes

parentSkuSizeAlias

SizeAlias

Represents the size associated with the parent sizeAlias.(Version not found)

JSON Example
{
  "sku" : {
    "id" : 10211,
    "organization" : {
      "id" : 10384
    },
    "key" : "d81f94a8-242c-43d1-8GJ",
    "description" : "Sample SKU - Juice",
    "enabled" : true,
    "brand" : "Amazing",
    "skuType" : {
      "id" : 10083,
      "organization" : {
        "id" : 10384
      },
      "key" : "d81f94a8-242c-43d1-8GJ",
      "description" : "SkuType Description"
    },
    "baseUnit" : {
      "id" : 10109,
      "key" : "d81f94a8-242c-43d1-8GJBottle",
      "description" : "Sample SizeAlias",
      "icon" : "ICON",
      "preferredSize" : "1",
      "sizeDecimalPlaces" : 2
    },
    "secondaryUnit" : {
      "id" : 10110,
      "key" : "d81f94a8-242c-43d1-8GJBox",
      "description" : "Sample SizeAlias",
      "icon" : "ICON",
      "preferredSize" : "1",
      "sizeDecimalPlaces" : 2
    },
    "tertiaryUnit" : {
      "id" : 10111,
      "key" : "d81f94a8-242c-43d1-8GJContainer",
      "description" : "Sample SizeAlias",
      "icon" : "ICON",
      "preferredSize" : "1",
      "sizeDecimalPlaces" : 2
    },
    "secondaryQty" : 4.0,
    "tertiaryQty" : 4.0,
    "secondaryCompound" : {
      "id" : 10209,
      "organization" : {
        "id" : 10384
      },
      "key" : "d81f94a8-242c-43d1-8GJSkuSecondary",
      "description" : "Sample SKU",
      "enabled" : true,
      "brand" : "Docik",
      "alternativeKey" : "d81f94a8-242c-43d1-8GJSkuSecondarynull"
    },
    "tertiaryCompound" : {
      "id" : 10210,
      "organization" : {
        "id" : 10384
      },
      "key" : "d81f94a8-242c-43d1-8GJSkuTertiary",
      "description" : "Sample SKU",
      "enabled" : true,
      "brand" : "Docik",
      "alternativeKey" : "d81f94a8-242c-43d1-8GJSkuTertiarynull"
    },
    "secondaryCompoundQty" : 1.0,
    "tertiaryCompoundQty" : 1.0,
    "alternativeKey" : "d81f94a8-242c-43d1-8GJnull"
  },
  "sizeAlias" : {
    "id" : 10115,
    "key" : "d81f94a8-242c-43d1-8SizeDoc",
    "description" : "Sample SizeAlias",
    "icon" : "ICON",
    "preferredSize" : "1",
    "sizeDecimalPlaces" : 2
  },
  "skuChild" : {
    "id" : 10214,
    "organization" : {
      "id" : 10384
    },
    "key" : "d81f94a8-242c-43d1-8BG",
    "description" : "Sample SKU - Juice",
    "enabled" : true,
    "brand" : "Amazing",
    "skuType" : {
      "id" : 10084,
      "organization" : {
        "id" : 10384
      },
      "key" : "d81f94a8-242c-43d1-8BG",
      "description" : "SkuType Description"
    },
    "baseUnit" : {
      "id" : 10112,
      "key" : "d81f94a8-242c-43d1-8BGBottle",
      "description" : "Sample SizeAlias",
      "icon" : "ICON",
      "preferredSize" : "1",
      "sizeDecimalPlaces" : 2
    },
    "secondaryUnit" : {
      "id" : 10113,
      "key" : "d81f94a8-242c-43d1-8BGBox",
      "description" : "Sample SizeAlias",
      "icon" : "ICON",
      "preferredSize" : "1",
      "sizeDecimalPlaces" : 2
    },
    "tertiaryUnit" : {
      "id" : 10114,
      "key" : "d81f94a8-242c-43d1-8BGContainer",
      "description" : "Sample SizeAlias",
      "icon" : "ICON",
      "preferredSize" : "1",
      "sizeDecimalPlaces" : 2
    },
    "secondaryQty" : 4.0,
    "tertiaryQty" : 4.0,
    "secondaryCompound" : {
      "id" : 10212,
      "organization" : {
        "id" : 10384
      },
      "key" : "d81f94a8-242c-43d1-8BGSkuSecondary",
      "description" : "Sample SKU",
      "enabled" : true,
      "brand" : "Docik",
      "alternativeKey" : "d81f94a8-242c-43d1-8BGSkuSecondarynull"
    },
    "tertiaryCompound" : {
      "id" : 10213,
      "organization" : {
        "id" : 10384
      },
      "key" : "d81f94a8-242c-43d1-8BGSkuTertiary",
      "description" : "Sample SKU",
      "enabled" : true,
      "brand" : "Docik",
      "alternativeKey" : "d81f94a8-242c-43d1-8BGSkuTertiarynull"
    },
    "secondaryCompoundQty" : 1.0,
    "tertiaryCompoundQty" : 1.0
  },
  "parentSkuSizeAlias" : {
    "id" : 10116,
    "key" : "d81f94a8-242c-43d1-8SizeAlias Parent",
    "description" : "Sample SizeAlias",
    "icon" : "ICON",
    "preferredSize" : "1",
    "sizeDecimalPlaces" : 2
  },
  "qty" : 24.0
}

SkuType

Allows classification of SKUs into custom categories.

API Entity Name : SkuType
Refer to the CRUD Services to see the details about the create, retrieve, update and delete API methods.

Beside its ID, a SkuType is also uniquely identifiable by the key attribute.
Table 104. Attributes
Path Type Description Mandatory Natural ID

id

Integer(22)

The entity’s auto-increment id.

key

String

The entity’s key.(Version not found)

Yes

Yes

organization

Organization

Organization to which the SkuType belongs.(Version not found)

Yes

Yes

description

String

Description of the SkuType.(Version not found)

JSON Example
{
  "organization" : {
    "id" : 10528
  },
  "key" : "0e7b8004-d241-426f-9",
  "description" : "SkuType Description"
}

Stop

Represents a point of interest inside a Route to be serviced by the Driver and/or an Equipment.

stops-example

  • S1, S2, S3 : Represents stops within a route.

  • A : Represents the stopArrival, the time of arrival at the stop.

  • D : Represents the stopDeparture, the moment of departure of the stop.

API Entity Name : Stop
Refer to the CRUD Services to see the details about the create, retrieve, update and delete API methods.

Beside its ID, a Stop is also uniquely identifiable by the key attribute.
Table 105. Attributes
Path Type Description Mandatory Natural ID

id

Integer(22)

The entity’s auto-increment id.

key

String(45)

Stop key. (Version not found)

Yes

route

Route

The route to which the stop belongs. (Version not found)

Yes

stopType

StopType

The stop type. (Version not found)

Yes

plannedSequenceNum

Integer(22)

The planned sequence number on the route. (Version not found)

Yes

plannedArrival

Date

The planned arrival of the stop. (Version not found)

Yes

plannedDeparture

Date

The planned departure of the stop. (Version not found)

Yes

plannedService

Date

Planned service time on the stop. (Version not found)

Yes

plannedDistance

Double(22)

Planned distance to the stop. (Version not found)

Yes

orders

Order

List of orders that were made for this stop. (Version not found)

location

Location

Location of the stop. (Version not found)

udfs

[StopUDF]

User’s Defined Fields associated to StopDocument. (Version not found)

stopInvoices

[StopInvoice]

xxx(Version not found)

bulkArriveUserId

Integer

xxx(Version not found)

transport

Transport

Transportation to which the stop is part. (Version not found)

baseLineSequenceNum

Integer(22)

Sequence number initially made on the route. (Version not found)

actualSequenceNum

Integer(22)

Actual sequence number made on the route. (Version not found)

udfs

[StopUDF]

User’s Defined Fields associated to Stop.(Version not found)

tripNumber

Integer

xxx(Version not found)

baseLineArrival

Date

Date initially set for arrival at the stop. (Version not found)

originalStop

Stop

originalStop is the initial stop used to do cloning. (Version not found)

cloneDate

Date

Represents the date that the Stop was cloned. (Version not found)

plannedWaiting

Long(22)

Represents the waiting time if the Driver arrives before the service window. (Version not found)

projectedArrival

Date

Projected arrival date at the stop. (Version not found)

actualArrival

Date

Actual arrival date at the stop. (Version not found)

baseLineService

Date

Service time initially set at the stop. (Version not found)

projectedService

Date

Projected service time on the stop. (Version not found)

actualService

Date

Actual service time on the stop. (Version not found)

baseLineDeparture

Date

Date initially set for the departure of the stop. (Version not found)

projectedDeparture

Date

Projected departure date of the stop. (Version not found)

actualDeparture

Date

Actual departure date of the stop. (Version not found)

baseLineDistance

Double(22)

Trip distance set initially. (Version not found)

projectedDistance

Double(22)

Projected travel distance. (Version not found)

actualDistance

Double(22)

Actual travel distance. (Version not found)

actualArrivalDataQuality

String(20)

Identifies who informed actualArrival. (Version not found)

actualServiceDataQuality

String(20)

Identifies who informed actualService.(Version not found)

actualDepartureDataQuality

String(20)

Identifies who informed actualDeparture.(Version not found)

actualDistanceDataQuality

String(20)

Identifies who informed actualDistance.(Version not found)

actualCancelDataQuality

String(255)

Identifies who informed actualCancel.(Version not found)

baseLineSize1

Double(22)

The initial quantity of products to be delivered in size1. (Version not found)

baseLineSize2

Double(22)

The initial quantity of products to be delivered in size2. (Version not found)

baseLineSize3

Double(22)

The initial quantity of products to be delivered in size3. (Version not found)

plannedSize1

Double(22)

The planned amount of products that will be delivered in size1. (Version not found)

plannedSize2

Double(22)

The planned amount of products that will be delivered in size2. (Version not found)

plannedSize3

Double(22)

The planned amount of products that will be delivered in size3. (Version not found)

actualSize1

Double(22)

The actual amount of products that will be delivered in size1. (Version not found)

actualSize2

Double(22)

The actual amount of products that will be delivered in size2. (Version not found)

actualSize3

Double(22)

The actual amount of products that will be delivered in size3. (Version not found)

baseLinePickupSize1

Double(22)

The initial amount of withdrawal size for size1. (Version not found)

baseLinePickupSize2

Double(22)

The initial amount of withdrawal size for size2. (Version not found)

baseLinePickupSize3

Double(22)

The initial amount of withdrawal size for size3. (Version not found)

plannedPickupSize1

Double(22)

Planned pickup size for size1. (Version not found)

plannedPickupSize2

Double(22)

Planned pickup size for size2. (Version not found)

plannedPickupSize3

Double(22)

Planned pickup size for size3. (Version not found)

actualPickupSize1

Double(22)

The actual amount of withdrawal size for size 1. (Version not found)

actualPickupSize2

Double(22)

The actual amount of withdrawal size for size 2. (Version not found)

actualPickupSize3

Double(22)

The actual amount of withdrawal size for size 3. (Version not found)

damagedSize1

Double(22)

Quantity of damaged products for size1. (Version not found)

damagedSize2

Double(22)

Quantity of damaged products for size2. (Version not found)

damagedSize3

Double(22)

Quantity of damaged products for size3. (Version not found)

instructions

String(4000)

Instructions for the stop. (Version not found)

bulkArriveGroup

Integer(22)

BulkArrival identifier made at that stop. (Version not found)

deliveryReasonCode

ReasonCode

Displays a reason for delivery to the GreenMile driver while stopped. (Version not found)

overReasonCode

ReasonCode

Displays a positive amount of product and be displayed as an overage in the system. (Version not found)

shortReasonCode

ReasonCode

Displays a negative amount of product and be displayed as a short in the system. (Version not found)

damagedReasonCode

ReasonCode

Displays a negative amount of product and be displayed as a damaged amount in the system. (Version not found)

pickupReasonCode

ReasonCode

Displays a positive amount of product and be displayed as a pickup in the system. (Version not found)

cancelCode

CancelCode

Stop cancelCode(Version not found)

undeliverableCode

UndeliverableCode

Used to describe the reason for an undeliverable Stop. (Version not found)

redeliveryStop

Stop

Indicates the stop that was not previously performed. (Version not found)

arrivalLatitude

Double(22)

Indicates latitude of arrival at stop. (Version not found)

arrivalLongitude

Double(22)

Indicates longitude of arrival at stop. (Version not found)

arrivalMobileGpsProvider

String(10)

Indicates the GPS provider of the mobile device arriving at the stop. (Version not found)

arrivalAccuracyMeters

Integer(22)

Indicates the accuracy in meters of arrival at the stop. (Version not found)

arrivedInTimeWindow

Boolean

Indicates if arrived in the time window. (Version not found)

serviceLatitude

Double(22)

Indicates latitude of service at the stop. (Version not found)

serviceLongitude

Double(22)

Indicates longitude of service at the stop. (Version not found)

serviceMobileGPSProvider

String(10)

Indicates the mobile GPS provider of the service. (Version not found)

serviceAccuracyMeters

Integer(22)

Indicates the accuracy in meters of service in the stop. (Version not found)

hasPicture

Boolean

Indicates if the Stop has any photos. (Version not found)

hasSignature

Boolean

Indicates if the Stop has any signed. (Version not found)

signatureFilePath

String(255)

Signature file path(Version not found)

longitude

Double(22)

Longitude of the stop. (Version not found)

latitude

Double(22)

Latitude of the stop. (Version not found)

actualCancel

Date

Actual cancellation information. (Version not found)

baselineTimeWindowOpen

String(255)

The stop’s baseline time window opening. (Version not found)

baselineTimeWindowClose

String(255)

The stop’s baseline time window closing. (Version not found)

baselineTimeWindowDay

String(255)

The stop’s basilne time window day. (Version not found)

plannedTimeWindowOpen

String(255)

The stop’s planned time window opening. (Version not found)

plannedTimeWindowClose

String(255)

The stop’s planned time window closing. (Version not found)

plannedTimeWindowDay

String(255)

The stop’s planned time window day. (Version not found)

actualTimeWindowOpen

String(255)

The stop’s actual time window opening. (Version not found)

actualTimeWindowClose

String(255)

The stop’s actual time window closing. (Version not found)

actualTimeWindowDay

String(255)

The stop’s actual time window day. (Version not found)

projectedMissedTWMinutes

Integer(22)

It refers to the projected time for the missing of the time window in minutes. (Version not found)

stopEtaListeners

Stop

Represents a list of stops, making it easy for merchandisers to know when drivers will arrive at the stops. (Version not found)

reprocessedAt

Date

The time on which the stop times were reprocessed. (Version not found)

arrivalDistance

Double(22)

It refers to the distance from the arrival coordinate to the location registered coordinate. (Version not found)

stopDocuments

StopDocument

List of stops documents. (Version not found)

size1AliasConfig

SizeAlias

Represents the size1 associated with the stop. (Version not found)

size2AliasConfig

SizeAlias

Represents the size2 associated with the stop. (Version not found)

size3AliasConfig

SizeAlias

Represents the size3 associated with the stop. (Version not found)

signatureConformity

Conformity

It indicates if the signature’s geocoding collected was captured out of a predetermined range for the planned location of the stop. (Version not found)

arrivalConformity

Conformity

It indicates if the arrival’s geocoding collected was captured out of a predetermined range for the planned location of the stop. (Version not found)

inSequence

Boolean

Indicates whether the stop occurred in the expected sequence. (Version not found)

allowShort

Boolean

If the stop accepts partial deliveries. (Version not found)

departureLatitude

Double(22)

Indicates latitude of departure at the stop. (Version not found)

departureLongitude

Double(22)

Indicates longitude of departure at the stop. (Version not found)

departureMobileGpsProvider

String(10)

Indicates the mobile GPS provider of the departure. (Version not found)

departureAccuracyMeters

Integer(22)

Indicates the accuracy in meters of departure at the stop. (Version not found)

departureConformity

Conformity

It indicates if the departure’s geocoding collected was captured out of a predetermined range for the planned location of the stop. (Version not found)

departureDistance

Double(22)

It refers to the distance from the departure coordinate to the location registered coordinate. (Version not found)

stopSignatures

StopSignature

List of signatures contained in the Stop.(Version not found)

suggestedTimeWindowOpen

String

Suggested time window open for the stop.(Version not found)

suggestedTimeWindowClose

String

Suggested time window close for the stop.(Version not found)

redeliveryTimes

Integer

Indicates the number of times the stop has already been redelivered.(Version not found)

confirmedAsNextStop

Date

The date when it was confirmed as the next Stop(Version not found)

deliveryStatus

DeliveryStatus

Informs the delivery status. (PENDING, PARTIALLY_DELIVERED, DELIVERED).(Version not found)

firstStop

Boolean

Indicates if it is the first stop.(Version not found)

lastModifier

[LastModifier]

Last User who changed the entity. (Version not found)

creatorDataQuality

DataQuality

Says the creator of dataquality(Version not found)

signatureReasonCode

ReasonCode

Code that says why it was signed(Version not found)

cancelLatitude

Double

Latitude from where the cancellation was made(Version not found)

cancelLongitude

Double

Longitude from where the cancellation was made(Version not found)

cancelMobileGPSProvider

MobileGPSProvider

The type of provider that provides the coordinates for the cancellation(Version not found)

cancelAccuracyMeters

Integer

Accuracy of cancellation coordinates(Version not found)

cancelConformity

Conformity

If the cancellation happened within the radius or geofence of the stop(Version not found)

cancelDistance

Double

Distance to latitude and longitude of canceled stop(Version not found)

payments

[Payment]

Tells you what type of payout was used for that stop.(Version not found)

bulkArriveCanceled

Boolean

Indicates if bulk arrive was canceled.(Version not found)

JSON Example
{
  "id" : null,
  "creationDate" : null,
  "lastModifier" : null,
  "lastModificationDate" : null,
  "key" : "56d6978e-b8ef-4027-aStopDoc",
  "route" : {
    "id" : 10399,
    "organization" : {
      "id" : 10445
    },
    "key" : "56d6978e-b8ef-4027-aStopDoc",
    "date" : "2023-10-19",
    "description" : "Sample Route Doc",
    "origin" : {
      "id" : 10395,
      "organization" : {
        "id" : 10445
      },
      "key" : "56d6978e-b8ef-4027-aStopDoc_O",
      "locationType" : {
        "id" : 10395,
        "organization" : {
          "id" : 10445
        },
        "key" : "56d6978e-b8ef-4027-aStopDoc_OLocTypeDoc",
        "description" : "Sample LocationType",
        "enabled" : true
      },
      "description" : "Location - Description Sample",
      "city" : "FortalezaDoc",
      "state" : "Ceará",
      "country" : "BR",
      "longitude" : -38.46933,
      "latitude" : -3.734536,
      "phone1" : "+55 (85) 9 9988-7766",
      "phone1Type" : "3",
      "email" : "example.greenmile@gogreen.com",
      "deliveryInstructions" : "Sample Delivery Instructions.",
      "deliveryRadius" : 20,
      "hasGeofence" : false,
      "creditLimit" : 1000,
      "legalName" : "Location's Legal Name"
    },
    "origLatitude" : -3.734536,
    "origLongitude" : -38.46933,
    "destination" : {
      "id" : 10396,
      "organization" : {
        "id" : 10445
      },
      "key" : "56d6978e-b8ef-4027-aStopDoc_D",
      "locationType" : {
        "id" : 10396,
        "organization" : {
          "id" : 10445
        },
        "key" : "56d6978e-b8ef-4027-aStopDoc_DLocTypeDoc",
        "description" : "Sample LocationType",
        "enabled" : true
      },
      "description" : "Location - Description Sample",
      "city" : "FortalezaDoc",
      "state" : "Ceará",
      "country" : "BR",
      "longitude" : -38.46933,
      "latitude" : -3.734536,
      "phone1" : "+55 (85) 9 9988-7766",
      "phone1Type" : "3",
      "email" : "example.greenmile@gogreen.com",
      "deliveryInstructions" : "Sample Delivery Instructions.",
      "deliveryRadius" : 20,
      "hasGeofence" : false,
      "creditLimit" : 1000,
      "legalName" : "Location's Legal Name"
    },
    "destLatitude" : -3.734536,
    "destLongitude" : -38.46933,
    "lastStopIsDestination" : false,
    "plannedArrival" : "2023-10-19T13:36:15+0000",
    "plannedDeparture" : "2023-10-19T13:36:15+0000",
    "plannedComplete" : "2023-10-19T13:36:15+0000",
    "plannedStart" : "2023-10-19T13:36:15+0000",
    "hasHelper" : false,
    "plannedServiceTime" : 0,
    "onRoute" : false
  },
  "orders" : null,
  "stopInvoices" : null,
  "stopDocuments" : null,
  "location" : null,
  "baseLineSequenceNum" : null,
  "plannedSequenceNum" : 1,
  "actualSequenceNum" : null,
  "stopType" : {
    "id" : 10340,
    "creationDate" : null,
    "lastModificationDate" : null,
    "organization" : null,
    "key" : null,
    "description" : null,
    "type" : null,
    "locationRequired" : null
  },
  "transport" : null,
  "udfs" : null,
  "stopSignatures" : null,
  "baseLineArrival" : 1697722575365,
  "plannedWaiting" : null,
  "plannedArrival" : 1697722575365,
  "projectedArrival" : 1697722575365,
  "actualArrival" : null,
  "baseLineService" : null,
  "plannedService" : 1697722575365,
  "projectedService" : 1697722575365,
  "actualService" : null,
  "baseLineDeparture" : 1697722575365,
  "plannedDeparture" : 1697722575365,
  "projectedDeparture" : 1697722575365,
  "actualDeparture" : null,
  "baseLineDistance" : null,
  "plannedDistance" : 1234567.0,
  "projectedDistance" : 1234567.0,
  "actualDistance" : null,
  "actualArrivalDataQuality" : null,
  "actualServiceDataQuality" : null,
  "actualDepartureDataQuality" : null,
  "actualDistanceDataQuality" : null,
  "actualCancelDataQuality" : null,
  "creatorDataQuality" : null,
  "baseLineSize1" : null,
  "baseLineSize2" : null,
  "baseLineSize3" : null,
  "plannedSize1" : null,
  "plannedSize2" : null,
  "plannedSize3" : null,
  "actualSize1" : null,
  "actualSize2" : null,
  "actualSize3" : null,
  "plannedPickupSize1" : null,
  "plannedPickupSize2" : null,
  "plannedPickupSize3" : null,
  "baseLinePickupSize1" : null,
  "baseLinePickupSize2" : null,
  "baseLinePickupSize3" : null,
  "actualPickupSize1" : null,
  "actualPickupSize2" : null,
  "actualPickupSize3" : null,
  "damagedSize1" : null,
  "damagedSize2" : null,
  "damagedSize3" : null,
  "instructions" : "Stop instructions",
  "bulkArriveGroup" : null,
  "bulkArriveUserId" : null,
  "bulkArriveCanceled" : false,
  "deliveryReasonCode" : null,
  "overReasonCode" : null,
  "shortReasonCode" : null,
  "damagedReasonCode" : null,
  "pickupReasonCode" : null,
  "signatureReasonCode" : null,
  "cancelCode" : null,
  "undeliverableCode" : null,
  "redeliveryStop" : null,
  "redeliveryTimes" : null,
  "arrivalLatitude" : null,
  "arrivalLongitude" : null,
  "departureLatitude" : null,
  "departureLongitude" : null,
  "arrivalMobileGpsProvider" : null,
  "departureMobileGpsProvider" : null,
  "arrivalAccuracyMeters" : null,
  "departureAccuracyMeters" : null,
  "arrivedInTimeWindow" : null,
  "serviceLatitude" : null,
  "serviceAccuracyMeters" : null,
  "serviceMobileGPSProvider" : null,
  "serviceLongitude" : null,
  "cancelLatitude" : null,
  "cancelLongitude" : null,
  "cancelMobileGPSProvider" : null,
  "cancelAccuracyMeters" : null,
  "cancelConformity" : null,
  "cancelDistance" : null,
  "hasPicture" : null,
  "hasSignature" : null,
  "signatureFilePath" : null,
  "signatureConformity" : null,
  "arrivalConformity" : null,
  "departureConformity" : null,
  "longitude" : null,
  "latitude" : null,
  "actualCancel" : null,
  "baselineTimeWindowOpen" : null,
  "baselineTimeWindowClose" : null,
  "baselineTimeWindowDay" : null,
  "plannedTimeWindowOpen" : null,
  "plannedTimeWindowClose" : null,
  "plannedTimeWindowDay" : null,
  "actualTimeWindowOpen" : null,
  "actualTimeWindowClose" : null,
  "suggestedTimeWindowOpen" : null,
  "suggestedTimeWindowClose" : null,
  "actualTimeWindowDay" : null,
  "projectedMissedTWMinutes" : null,
  "stopEtaListeners" : null,
  "reprocessedAt" : null,
  "arrivalDistance" : null,
  "departureDistance" : null,
  "size1AliasConfig" : null,
  "size2AliasConfig" : null,
  "size3AliasConfig" : null,
  "allowShort" : null,
  "originalStop" : null,
  "cloneDate" : null,
  "inSequence" : null,
  "confirmedAsNextStop" : null,
  "firstStop" : null,
  "deliveryStatus" : null,
  "payments" : null,
  "tripNumber" : null
}

StopDocument

Represents a document in a Stop, this is not an attribute, but an entity.

API Entity Name : StopDocument

The example below shows how it is included in a Stop. The stopDocuments attribute is a list of StopDocuments.+ How to use restrictions criteria /StopDocument/restrictions List by Example.
Table 106. Attributes
Path Type Description

id

Integer(22)

The entity’s auto-increment id.(Version not found)

documentNumber

String(45)

The stop document number. (Version not found)

documentDescription

String(45)

Description of the stop document.(Version not found)

remarks

String(255)

Comments on the document.(Version not found)

delivered

Boolean

Indicates whether the stopDocument has been delivered.(Version not found)

udfs

<<StopDocumentUDF>>

User’s Defined Fields associated to StopDocument.(Version not found)

JSON Example
{
  "key" : "fc9fb8c8-910f-40a3-aStopDoc",
  "route" : {
    "id" : 10379,
    "onRoute" : false
  },
  "stopDocuments" : [ {
    "documentDescription" : "A Stop Document.",
    "documentNumber" : "123593",
    "remarks" : "Document remarks. fc9fb8c8-910f-40a3-aStopDoc",
    "delivered" : false
  } ],
  "plannedSequenceNum" : 1,
  "stopType" : {
    "id" : 10320
  },
  "baseLineArrival" : "2023-10-19T13:34:01Z",
  "plannedArrival" : "2023-10-19T13:34:01Z",
  "projectedArrival" : "2023-10-19T13:34:01Z",
  "plannedService" : "2023-10-19T13:34:01Z",
  "projectedService" : "2023-10-19T13:34:01Z",
  "baseLineDeparture" : "2023-10-19T13:34:01Z",
  "plannedDeparture" : "2023-10-19T13:34:01Z",
  "projectedDeparture" : "2023-10-19T13:34:01Z",
  "plannedDistance" : 1234567.0,
  "projectedDistance" : 1234567.0,
  "instructions" : "Stop instructions",
  "bulkArriveCanceled" : false,
  "plannedServiceTime" : 0
}

StopSignature

Represents a list of stop signatures. It is responsible for storing the location (lat/long) and signatures made during stops.

API Entity Name : StopSignature

The example below shows how it is included in a Stop. The stopDocuments attribute is a list of StopDocuments.
Table 107. Attributes

Path

Type

Description

Mandatory

Natural ID

name

String

Represents the name of the stop signature.

Yes

stop

Stop

Represents the stop at which the subscription was made

Yes

hashCode

String(255)

Represents the signature hashCode (sha256)

Yes

rating

Integer(22)

Represents the rating at the time of signing

comment

String

Comment related to StopSignature

latitude

Double(22)

Indicates the stopSignature’s latitude.

longitude

Double(22)

Indicates the stopSignature’s longitude.

accuracyMeters

Float(22)

Indicates the accuracy in meters of the stop signature

ratingUserId

Integer(22)

Indicates the user who rated it

mobileGpsProvider

String(20)

Indicates the mobile GPS provider of the service. (GPS, NETWORK, FUSED, PASSIVE)

evaluationDataQuality

String(20)

UNKNOWN, DRIVER_ENTERED, DISPATCHER_ENTERED, GEO_COMPUTED,SERVER_INFERRED,AUTO_CAPTURED, SALES_ENTERED, MERCHANDISER_ENTERED, MANAGER_ENTERED, CONFIGURED_ACTION, MY_ORDER_ENTERED, EVENT_ACTION_INFERRED

stopSignatureRatingTypes

List<StopSignatureRatingType>

Represents a list of rating types

StopType

Represents a Type of Stop. A stop contains several types: NONE, STOP, PAID_BREAK, UNPAID_BREAK, PAID_WAIT, UNPAID_WAIT, PAID_OVERNIGHT, UNPAID_OVERNIGHT and DEPOT.

API Entity Name : StopType
Refer to the CRUD Services to see the details about the create, retrieve, update and delete API methods.

Beside its ID, a StopType is also uniquely identifiable by the key attribute.
Table 108. Attributes
Path Type Description Mandatory Natural ID

id

Integer(22)

The entity’s auto-increment id.

key

String(45)

StopType’s key(Version not found)

Yes

Yes

organization

Organization

Indicates Organization that this StopType relates to.(Version not found)

Yes

Yes

description

String(45)

StopType’s description.(Version not found)

Yes

type

Type

StopType’s Type.(Version not found)

Yes

locationRequired

Boolean

Indicates if StopType’s requires a Location. (Version not found)

JSON Example
{
  "organization" : {
    "id" : 10449
  },
  "key" : "050cb98e-5e72-4560-8",
  "description" : "Sample StopType",
  "type" : "STOP",
  "locationRequired" : false
}

Survey

Represents a Survey.

API Entity Name : Survey
Refer to the CRUD Services to see the details about the create, retrieve, update and delete API methods.

Table 109. Attributes
Path Type Description Mandatory Natural ID

title

String(255)

Title of the survey.(Version not found)

Yes

description

String(255)

Description of the survey(Version not found)

Yes

organization

Organization

The organization to which the current survey template will apply.(Version not found)

Yes

surveyApplyRules

[SurveyApplyRule]

Rules applied to this survey.(Version not found)

Yes

surveySections

[SurveySection]

Section in the survey.(Version not found)

JSON Example
{
  "description" : "Check List",
  "organization" : {
    "id" : 10546
  },
  "surveyApplyRules" : [ {
    "jsonRule" : "[]",
    "surveyType" : "ROUTE_START_ROUTE"
  } ],
  "surveySections" : [ {
    "key" : "fd986940-1322-11e8-8902-9d1e12858287",
    "sectionOrder" : 2,
    "surveyQuestions" : [ {
      "defaultAnswer" : "false",
      "finishSurvey" : false,
      "key" : "180ba6c0-1323-11e8-8902-9d1e12858287",
      "loopQuestion" : false,
      "requirePhoto" : false,
      "mandatory" : false,
      "nextQuestion" : {
        "key" : "39139d50-1323-11e8-8902-9d1e12858287",
        "surveySection" : {
          "key" : "fd986940-1322-11e8-8902-9d1e12858287"
        }
      },
      "question" : "Traffic cones",
      "questionOrder" : 1,
      "type" : "CHECKBOX"
    }, {
      "defaultAnswer" : "false",
      "finishSurvey" : false,
      "key" : "39139d50-1323-11e8-8902-9d1e12858287",
      "loopQuestion" : false,
      "requirePhoto" : false,
      "mandatory" : true,
      "nextQuestion" : {
        "key" : "5136d050-1323-11e8-8902-9d1e12858287",
        "surveySection" : {
          "key" : "fd986940-1322-11e8-8902-9d1e12858287"
        }
      },
      "question" : "Extinguisher",
      "questionOrder" : 2,
      "type" : "CHECKBOX"
    }, {
      "defaultAnswer" : "false",
      "finishSurvey" : false,
      "key" : "5136d050-1323-11e8-8902-9d1e12858287",
      "loopQuestion" : false,
      "requirePhoto" : false,
      "mandatory" : true,
      "nextQuestion" : {
        "key" : "6b69d080-1323-11e8-8902-9d1e12858287",
        "surveySection" : {
          "key" : "fd986940-1322-11e8-8902-9d1e12858287"
        }
      },
      "question" : "Seat belts",
      "questionOrder" : 3,
      "type" : "CHECKBOX"
    }, {
      "defaultAnswer" : "",
      "finishSurvey" : false,
      "key" : "6b69d080-1323-11e8-8902-9d1e12858287",
      "loopQuestion" : false,
      "requirePhoto" : false,
      "mandatory" : false,
      "question" : "Fuel Level",
      "questionOrder" : 4,
      "surveyQuestionDomain" : [ {
        "surveyQuestionDomainOrder" : 0,
        "value" : "Full"
      }, {
        "surveyQuestionDomainOrder" : 1,
        "value" : "Half"
      }, {
        "surveyQuestionDomainOrder" : 2,
        "value" : "Empty"
      } ],
      "type" : "PICKLIST_MULTISELECT"
    } ],
    "title" : "Check List"
  } ],
  "title" : "Check List"
}

Tag

Represents a Tag.

API Entity Name : Tag
Refer to the CRUD Services to see the details about the create, retrieve, update and delete API methods.

Beside its ID, a Tag is also uniquely identifiable by the key attribute.
Table 110. Attributes
Path Type Description Mandatory Natural ID

id

Integer(22)

The entity’s auto-increment id.

id

Integer(22)

The entity’s auto-increment id.

organization

Organization

Indicates the Organization to which the Tag belongs.(Version not found)

description

String

Represents the description of the tag.(Version not found)

tagWhen

When

Indicates when to tag. (START_ROUTE, DEPART_ORIGIN, ARRIVE_STOP, DEPART_STOP, CANCEL_STOP, UNDELIVERABLE_STOP, REDELIVERY, ARRIVE_DESTINATION, COMPLETE_ROUTE, CREATE_ROUTE)(Version not found)

unTagWhen

When

Indicates when to untag.(START_ROUTE, DEPART_ORIGIN, ARRIVE_STOP, DEPART_STOP, CANCEL_STOP, UNDELIVERABLE_STOP, REDELIVERY, ARRIVE_DESTINATION, COMPLETE_ROUTE, CREATE_ROUTE)(Version not found)

jsonParameter

String

Indicates the json parameter.(Version not found)

enabled

Boolean

Indicates whether the tag is active.(Version not found)

tagType

TagType

Represents the tag type (ROUTE, EQUIPMENT, GEOFENCE).(Version not found)

untagAlso

Tag

Indicates a list of tags when to untag as well.(Version not found)

tagColor

String

Represents the color of the tag.(Version not found)

JSON Example
{
  "organization" : {
    "id" : 10436
  },
  "description" : "2f988b08-b062-4c1e-8TagAssignmentDoc",
  "enabled" : true,
  "tagType" : "ROUTE"
}

TimeWindowType

Represents a Time Window Type.

API Entity Name : TimeWindowType
Refer to the CRUD Services to see the details about the create, retrieve, update and delete API methods.

Beside its ID, a TimeWindowType is also uniquely identifiable by the key attribute.
Table 111. Attributes
Path Type Description Mandatory Natural ID

id

Integer(22)

The entity’s auto-increment id.

key

String(255)

TimeWindowType’s key(Version not found)

Yes

Yes

organization

Organization

Indicates Organization that this TimeWindowType relates to.(Version not found)

Yes

Yes

description

String(45)

TimeWindowType’s description.(Version not found)

Yes

enabled

Boolean

Shows if enabled.(Version not found)

timeWindowTypeDays

[TimeWindowTypeDays]

XXX(Version not found)

JSON Example
{
  "organization" : {
    "id" : 10404
  },
  "key" : "19a3d165-76c6-45c2-8",
  "description" : "Sample TimeWindowType",
  "enabled" : true
}

TimeZone

Represents a time zone, default is +0000.

API Entity Name : TimeZone
Refer to the CRUD Services to see the details about the create, retrieve, update and delete API methods.

Beside its ID, a TimeZone is also uniquely identifiable by the timezoneName attribute.
Table 112. Attributes
Path Type Description

id

Integer(22)

The entity’s auto-increment id.(Version not found)

timezoneName

String(45)

TimeZone’s name.(Version not found)

description

String(255)

TimeZone’s description.(Version not found)

rawOffsetMinutes

Integer(22)

TimeZone’s raw off set Minutes.(Version not found)

JSON Example
{
  "id" : 10096,
  "description" : "GMT+0",
  "rawOffsetMinutes" : 0,
  "timezoneName" : "GMT+0"
}

Transport

Move the largest number of goods with the least cost and least time possible. Therefore, as a basic definition, is to transport goods ensuring the integrity of the cargo, within the agreed term and at low cost.
transport-example

API Entity Name : Transport
Refer to the CRUD Services to see the details about the create, retrieve, update and delete API methods.

Beside its ID, a Transport is also uniquely identifiable by the key attribute.
Table 113. Attributes
Path Type Description Mandatory Natural ID

id

Integer(22)

The entity’s auto-increment id.

key

String(45)

Transport key(Version not found)

Yes

Yes

organization

Organization

Indicates Organization that this Transport relates to.(Version not found)

Yes

Yes

status

TransportStatus

Delivery status made by transport.(Version not found)

Yes

Yes

date

Date

Transport description.(Version not found)

Yes

Yes

stops

Stop

xxx(Version not found)

Yes

Yes

description

String

xxx(Version not found)

Yes

Yes

JSON Example
{
  "organization" : {
    "id" : 10407,
    "key" : "b98e662e-17d6-4958-8O",
    "description" : "Organization Rest Docs Desc",
    "city" : "São Paulo",
    "state" : "São Paulo",
    "preferedLocale" : {
      "id" : 10000
    },
    "timeZone" : {
      "id" : 10096
    },
    "unitSystem" : "METRIC"
  },
  "key" : "b98e662e-17d6-4958-8T_TDoc",
  "date" : "2023-10-19"
}

UndeliverableCode

Represents an UndeliverableCode. Used to describe the reason for an undeliverable Stop.

API Entity Name : UndeliverableCode
Refer to the CRUD Services to see the details about the create, retrieve, update and delete API methods.

Beside its ID, an UndeliverableCode is also uniquely identifiable by the key attribute.
Table 114. Attributes
Path Type Description Mandatory Natural ID

id

Integer(22)

The entity’s auto-increment id.

key

String(45)

UndeliverableCode’s Key.(Version not found)

Yes

Yes

organization

Organization

The organization to which the undeliverable code belongs.(Version not found)

Yes

Yes

description

String(45)

Description of undeliverable code.(Version not found)

Yes

enabled

Boolean

Indicates whether it is enabled.(Version not found)

Yes

type

Character(1)

Type of Undelivereable Code. Valid values are: 'L', 'U' or 'B' L: BACK LATTER U: UNSUCCESSFULL B: BOTH(Version not found)

Yes

udfs

[UndeliverableCodeUDF]

User’s Defined Fields associated to UndeliverableCode.(Version not found)

JSON Example
{
  "organization" : {
    "id" : 10394
  },
  "key" : "f858bb70-3458-4ba4-a",
  "description" : "Sample Undeliverable Code",
  "enabled" : true,
  "type" : "U"
}

UserDefinedField

Represents an udf, that can be a personalized for some entities.

API Entity Name : UserDefinedField

User Defined Field is an attribute (you can have more than one) that can be personalized according to the needs of the customer. In the example below, sender is sending .

List of entities that include UDFs:

CancelCode, DriverProfileCost, Equipment, EquipmentType, Location, Order, ReasonCode, Route, Stop, UndeliverableCode, User, UserDefinedField.

Table 115. Attributes
Path Type Description Mandatory Natural ID

key

String(45)

Key of User Defined Field.(Version not found)

value

String(255)

Value of User Defined Field.(Version not found)

JSON Example
{
  "stop" : {
    "id" : 10403,
    "key" : "64b78c38-cf2c-48a2-b",
    "route" : {
      "id" : 10441,
      "organization" : {
        "id" : 10544
      },
      "key" : "64b78c38-cf2c-48a2-b",
      "date" : "2023-10-19",
      "description" : "Sample Route Doc",
      "origin" : {
        "id" : 10479,
        "organization" : {
          "id" : 10544
        },
        "key" : "64b78c38-cf2c-48a2-b_O",
        "locationType" : {
          "id" : 10473,
          "organization" : {
            "id" : 10544
          },
          "key" : "64b78c38-cf2c-48a2-b_OLocTypeDoc",
          "description" : "Sample LocationType",
          "enabled" : true
        },
        "description" : "Location - Description Sample",
        "city" : "FortalezaDoc",
        "state" : "Ceará",
        "country" : "BR",
        "longitude" : -38.46933,
        "latitude" : -3.734536,
        "phone1" : "+55 (85) 9 9988-7766",
        "phone1Type" : "3",
        "email" : "example.greenmile@gogreen.com",
        "deliveryInstructions" : "Sample Delivery Instructions.",
        "deliveryRadius" : 20,
        "hasGeofence" : false,
        "creditLimit" : 1000,
        "legalName" : "Location's Legal Name"
      },
      "origLatitude" : -3.734536,
      "origLongitude" : -38.46933,
      "destination" : {
        "id" : 10480,
        "organization" : {
          "id" : 10544
        },
        "key" : "64b78c38-cf2c-48a2-b_D",
        "locationType" : {
          "id" : 10474,
          "organization" : {
            "id" : 10544
          },
          "key" : "64b78c38-cf2c-48a2-b_DLocTypeDoc",
          "description" : "Sample LocationType",
          "enabled" : true
        },
        "description" : "Location - Description Sample",
        "city" : "FortalezaDoc",
        "state" : "Ceará",
        "country" : "BR",
        "longitude" : -38.46933,
        "latitude" : -3.734536,
        "phone1" : "+55 (85) 9 9988-7766",
        "phone1Type" : "3",
        "email" : "example.greenmile@gogreen.com",
        "deliveryInstructions" : "Sample Delivery Instructions.",
        "deliveryRadius" : 20,
        "hasGeofence" : false,
        "creditLimit" : 1000,
        "legalName" : "Location's Legal Name"
      },
      "destLatitude" : -3.734536,
      "destLongitude" : -38.46933,
      "lastStopIsDestination" : false,
      "plannedArrival" : "2023-10-19T13:40:43+0000",
      "plannedDeparture" : "2023-10-19T13:40:43+0000",
      "plannedComplete" : "2023-10-19T13:40:43+0000",
      "plannedStart" : "2023-10-19T13:40:43+0000",
      "hasHelper" : false,
      "plannedServiceTime" : 0,
      "onRoute" : false
    },
    "plannedSequenceNum" : 1,
    "stopType" : {
      "id" : 10383
    },
    "baseLineArrival" : "2023-10-19T13:40:42Z",
    "plannedArrival" : "2023-10-19T13:40:42Z",
    "projectedArrival" : "2023-10-19T13:40:42Z",
    "plannedService" : "2023-10-19T13:40:42Z",
    "projectedService" : "2023-10-19T13:40:42Z",
    "baseLineDeparture" : "2023-10-19T13:40:42Z",
    "plannedDeparture" : "2023-10-19T13:40:42Z",
    "projectedDeparture" : "2023-10-19T13:40:42Z",
    "plannedDistance" : 1234567.0,
    "projectedDistance" : 1234567.0,
    "instructions" : "Stop instructions",
    "bulkArriveCanceled" : false,
    "plannedServiceTime" : 0
  },
  "number" : "64b78c38-cf2c-48a2-b",
  "plannedSize1" : 11.2,
  "plannedSize2" : 14.6,
  "plannedSize3" : 37.5,
  "baselineSize1" : 3.4,
  "baselineSize2" : 6.9,
  "baselineSize3" : 34.5,
  "actualSize1" : 23.2,
  "actualSize2" : 26.2,
  "actualSize3" : 21.2,
  "plannedPickupSize1" : 12.3,
  "plannedPickupSize2" : 11.2,
  "plannedPickupSize3" : 34.2,
  "actualPickupSize1" : 12.3,
  "actualPickupSize2" : 11.2,
  "actualPickupSize3" : 34.2,
  "damagedSize1" : 1.4,
  "damagedSize2" : 4.2,
  "damagedSize3" : 5.7,
  "specialInstructions" : "Special Instructions Sample.",
  "beginDate" : "2023-10-19T13:40:43Z",
  "endDate" : "2023-10-19T13:40:43Z",
  "udfs" : [ {
    "key" : "OrderNum",
    "value" : "1520394"
  } ],
  "hasPicture" : false,
  "allowShort" : false,
  "newOrder" : false
}

…​

Open Api

We have included a set of files with the Open Api v3 and v2 specification for Greenmile API.

Here are the files: