External API access
Introduction
For external access to your TrackOnline data you can use the external REST Api. Access/authentication is done with an API key. The REST API is accessible via the following website.
Site | URL |
---|---|
Production | https://api.trackonline.com |
This production site stores the data that it receives.
Generate an API Key
Before you can get access to the external api you will have to generate an API key in your TrackOnline environment.
- Open the cogwheel menu, and navigate to administration settings.
- Navigate to API setting option.
- Give your API key a name and press create.
This generated API key can be used in the header of the request, or in the querystring.
Type | Value | Example |
---|---|---|
Header | X-ApiKey | X-ApiKey:xxx.xxxx.xxx |
Querystring | apikey | https://api.trackonline.com/api/v1/iot/item?apikey=xxx.xxxx.xxx |
Example with curl and a query string:
curl -X GET "https://api.trackonline.com/api/v1/iot/item?includeDeleted=false&page=1&apikey=xxx.xxxx.xxx" -H "accept: application/json"
Example with curl and a header:
curl -X GET "https://api.trackonline.com/api/v1/iot/item?includeDeleted=false&page=1" -H "accept: application/json" -H "X-ApiKey: xxxx.xxxx.xxx"
API rate limits
The rate limits below will limit the number of requests that your app is permitted to send during a time window. These limits are depending on your license type.
- START and PRO
- Minutely limit: your app can make 60 API calls, per administration, per minute.
- Daily limit: your app can make 1000 API calls, per administration, per day.
- PRO PLUS
- Minutely limit: your app can make 60 API calls, per administration, per minute.
- Daily limit: your app can make 5000 API calls, per administration, per day.
- ENTERPRISE
- Minutely limit: your app can make 1000 API calls, per administration, per minute.
- Daily limit: your app can make 10000 API calls, per administration, per day.
If your app exceeds this limit, you will receive a response with HTTP status code 429
for every request. This response will also include the Retry-After
header, which indicates how long your app should wait before making a follow-up request.
Available API calls
For GET among others the following calls are available per category in the API:
- Status
- GET API status
- IoT
- GET IoT item(s)
- GET IoT item measurement(s)
- Item definition
- GET item definition(s)
- GET result of saved item definition(s)
- Item configuration
- GET item configuration(s)
- GET result of saved item configuration(s)
- Unique item
- GET unique item(s)
- GET result of saved unique item(s)
- Location
- GET location(s)
- GET result of savedlLocation(s)
- Transaction
- GET transaction(s)
- GET result of saved transaction(s)
- Balance
- GET balance(s)
- GET counterpart balance(s)
- Batch calculation
- GET batch calculation(s)
- GET a download file of the batch calculation result
- GET document(s) for batch calculation(s)
- GET a download file of a batch calculation result document
For POST among others the following calls are available per category in the API:
- Item definition
- POST item definition(s)
- Item configuration
- POST item configuration(s)
- Unique item
- POST unique item(s)
- Location
- POST location(s)
- Transaction
- POST transaction(s)
Batches
Please note that for POST transaction you have the ability to save these per batch (maximum of 50 per batch)!
Item definition
The data model for the item definition GET or POST calls consists of the following (marked with * are required fields):
Parameter | Type | Information |
---|---|---|
id | string($uuid) | Gets or sets the GUID of an item definition to filter on save. |
number* | string maxLength: 25 | Gets or sets the number of an item definition. |
name* | string maxLength: 50 | Gets or sets the name of an item definition. |
code* | string maxLength: 6 | Gets or sets the code of an item definition. |
type* | integer | Gets or sets the type of an item definition. Enum: [ 0=Unknown, 1=Tray, 2=Box, 3=Interior, 4=Container, 5=LoadCarrier, 6=Crate, 7=Pallet, 8=Lockingplate, 9=Lid, 10=Bulk, 11=Tote, 99=Other ] |
gS1Code | string maxLength: 50 | Gets or sets the GS1(Global Standards One) code of an item definition. |
basePrice | number($double) | Gets or sets the base price of an item definition. |
length | number($double) max: 9999.99 min: 0 pattern: ^\d+.?\d{0,2}$ | Gets or sets the length of an item definition. |
width | number($double) max: 9999.99 min: 0 pattern: ^\d+.?\d{0,2}$ | Gets or sets the width of an item definition. |
height | number($double) max: 9999.99 min: 0 pattern: ^\d+.?\d{0,2}$ | Gets or sets the height of an item definition. |
weight | number($double) max: 9999.99 min: 0 pattern: ^\d+.?\d{0,2}$ | Gets or sets the weight of an item definition. |
volume | number($double) max: 9999.99 min: 0 pattern: ^\d+.?\d{0,2}$ | Gets or sets the volume of an item definition. |
numberOfTruckSpaces | integer($int32) | Gets or sets the total floor spaces in a truck/trailer that the item uses. |
maxStackHeight | integer($int32) | Gets or sets the maximum height of a stack of the items per truck/trailer. |
maxTruckLoad | integer($int32) | Gets or sets the maximum items that fit a truck/trailer load. |
standardOrderQuantity | integer($int32) | Gets or sets the standard Order quantity to use as transaction quantity (or its multiplication) |
isEnabled | boolean | Gets or sets a value indicating whether this item definition is enabled. |
createdOn | string($date-time) | Gets the date this item definition was created. Note: Only returned on a fetch, not used when saving an item definition. |
modifiedOn | string($date-time) | Gets the date this item definition was last modified. Note: Only returned on a fetch, not used when saving an item definition. |
externalNumbers | [Object] | Array of objects to associate identification numbers from external sources. source (string) - max 30 characters number (string) - max. 30 characters |
GET parameters
The GET parameters are the parameters you can pass in to filter the item definitions when fetching item definitions. An example is available in the next section.
Parameter | Type | Information |
---|---|---|
Id | string | The GUID of the item definition. |
TypeCodes | [integer] | Array of item type codes within [ 0=Unknown, 1=Tray, 2=Box, 3=Interior, 4=Container, 5=LoadCarrier, 6=Crate, 7=Pallet, 8=Lockingplate, 9=Lid, 10=Bulk, 11=Tote, 99=Other ]. |
Number | string | The exact number of the item definition. |
Name | string | Part of the name and / or the code of the item definition. |
GS1Code | string | The exact GS1 code of the item definition. |
Enabled | boolean | Filter on enabled or disabled item definitions. Default: true. |
Page | integer | The page to fetch among all the results (based on 50 results per page). Default: 1. |
Example calls
In this example we are going to make a POST of an item definition for the CC TAG5 load carrier with only the mandatory info.
[
{
"number": "CC TAG5",
"name": "CC TAG 5",
"code": "TAG5",
"type": "LoadCarrier"
}
]
In this example we are going to make a POST of an item definition for the CC TAG5 load carrier including measurements and the weight.
[
{
"number": "CC TAG5",
"name": "CC TAG 5",
"code": "TAG5",
"type": "LoadCarrier",
"basePrice": 250,
"length": 1.4,
"width": 0.6,
"height": 2.0,
"weight": 50
}
]
When fetching your item definitions, you can also use the parameters explained in the section GET parameters to filter. For example, this is the URL for fetching the first page of results corresponding to the item definitions with "box" in their name:
https://api.trackonline.com/api/v1/itemdefinition?Name=box&page=1&apikey=xxx
Of course, you can add as many parameters as you want in the URL. Therefor, add &filter=value
in the URL where filter
is the name of the filter and value
is the value you want to filter on. Now if you want to filter item definitions with "box" in their name AND with the number 10, this is what the URL looks like:
https://api.trackonline.com/api/v1/itemdefinition?Number=10&Name=box&page=1&apikey=xxx
Item configuration
The data model for the item configuration GET or POST calls consists of the following (marked with * are required fields):
Parameter | Type | Information |
---|---|---|
id | string($uuid) | Gets or sets the GUID of an item configuration to filter on save. |
name* | string maxLength: 50 | Gets or sets the name of an itemconfiguration. |
members* | [Object] | Array of item definitions |
itemDefinitionId* - See item definition data model for reference.
name - Gets the name of an item definition
number - Gets the number of an item definition
type - Gets the type of an item definition
position - Gets or sets the position of a members
maximumBalance - Gets or sets the maximum balance of a member
minimumBalance - Gets or sets the minimum balance of a member
minimumStockCollection - Gets or sets the minimum stock collection of a member
maximumFlowIn - Gets or sets the maximum flow in of a member
minimumFlowIn"- Gets or sets the minimum flow in of a member
maximumFlowOut - Gets or sets the maximum flow out of a member
minimumFlowOut - Gets or sets the minimum flow out of a member
contractCycleTime - Gets or sets the contractCycleTime of a member
leadTime - Gets or sets the leadTime of a member
activeFrom - Gets or sets the activeFrom date(Default: Today)
activeTo - Gets or sets the activeTo date (always )
Note: name, number and type are not used for saving
GET parameters
The GET parameters are the parameters you can pass in to filter the item configurations while fetching item configurations. An example is available in the next section.
Parameter | Type | Information |
---|---|---|
Id | string | The GUID of the item configuration. |
Name | string | Part of the name of item configuration |
Page | integer | The page to fetch among all the results (based on 50 results per page). Default: 1. |
Example calls
In this example we are going to make a POST of an item configuration using item definition "ID123" with only the mandatory info.
[
{
"name": "Config123",
"members": [
{
"itemDefinitionId": "A7B8AF3F-4C16-492E-A3B7-451E8E096D30",
"number": "ID123"
}
]
}
]
In this example we are going to make a POST of an item configuration for the Config123 including members information.
[
{
"name": "Config123",
"members": [
{
"itemDefinitionId": "A7B8AF3F-4C16-492E-A3B7-451E8E096D30",
"name": "ID_123",
"number": "ID123",
"type": 0,
"position": 1,
"maximumBalance": 60,
"minimumBalance": 15,
"minimumStockCollection": 10,
"maximumFlowIn": 30,
"minimumFlowIn": 1,
"maximumFlowOut": 50,
"minimumFlowOut": 2,
"contractCycleTime": 3,
"leadTime": 2,
"activeFrom":"2022-01-01T00:00:00.0000000+00:00",
"activeTo":"2022-02-01T00:00:00.0000000+00:00"
}
]
}
]
When fetching your item configurations, you can also use the parameters explained in the section GET parameters to filter. For example, this is the URL for fetching the first page of results corresponding to the item configuration with "Config123" in their name:
https://api.trackonline.com/api/v1/itemconfiguration?Name=Config123&page=1&apikey=xxx
Of course, you can add as many parameters as you want in the URL. Therefor, add &filter=value in the URL where filter is the name of the filter and value is the value you want to filter on. Now if you want to filter item configuration with "Config123" in their name AND with the Id "B7B8AF3F-5C16-492E-A3B9-452E8E096D31", this is what the URL looks like:
https://api.trackonline.com/api/v1/itemconfiguration?Number=B7B8AF3F-5C16-492E-A3B9-452E8E096D31&Name=Config123&page=1&apikey=xxx
Unique item
The data model for the unique item GET or POST calls consists of the following (marked with * are required fields):
Parameter | Type | Information |
---|---|---|
id | string($uuid) | Gets or sets the Guid of the item to filter on. |
number * | string maxLengte: 100 | Gets or sets the number of a unique item. |
barCode | string maxLengte: 100 | Gets or sets the Barcode of a unique item. |
epcCode | string maxLengte: 100 | Gets or sets the EPC code of a unique item. |
bleCode | string maxLengte: 100 | Gets or sets the BLE code of a unique item. |
itemDefinition * | Object | Gets or sets the related item definition. See the item definition data model for reference. |
deviceIds | [Object] | Array of objects of associated device ID's (IoT sensors). deviceId (string) - max. 200 characters. |
lastKnownPosition | Object | Gets the last known position. Note: Only returned on a fetch, not used when saving an unique item. |
lastKnownLocation | Object | Gets or sets the last known location. See the location data model for reference. |
lastKnownTemperature | number($double) max: 9999,99 min: 0 patroon: ^\d+.?\d{0,2}$ | Gets the last known temperature. Note: Only returned on a fetch, not used when saving an unique item. |
lastKnownTransactionId | string($uuid) | Gets the last known transaction ID (GUID). Note: Only returned on a fetch, not used when saving an unique item. |
firstSeen | string($date-time) | Gets or sets the date of first seen. |
lastSeen | string($date-time) | Gets or sets the date of last seen. |
createdOn | string($date-time) | Gets the date this item definition was created. Note: Only returned on a fetch, not used when saving an unique item. |
notes | string | Gets or sets the notes. |
isDeleted | boolean | Indicator for being deleted. Note: Only returned on a fetch, not used when saving an unique item. |
GET parameters
The GET parameters are the parameters you can pass in to filter the unique items when fetching unique items. An example is available in the next section.
Parameter | Type | Information |
---|---|---|
ItemNumber | [string] | Array of unique item numbers. |
Id | [string] | Array of GUIDs of unique items. |
ItemDefinitionId | [string] | Array of GUIDs of item definitions. |
LocationId | [string] | Array of GUIDs of locations. |
BarCode | [string] | Array of barcodes of unique items. |
EpcCode | [string] | Array of EPC codes of unique items. |
BleCode | [string] | Array of BLE codes of unique items. |
IncludeDeleted | boolean | Filter if deleted unique items need to be added to the search result. Default: false. |
Page | integer | The page to fetch among all the results (based on 50 results per page). Default: 1. |
Example calls
In this example we are going to make a POST of an unique item for item definition CC TAG5.
[
{
"number": "123",
"barcode": "bc123",
"itemDefinition": {
"number": "CC TAG5"
},
"deviceIds": {
"deviceId": "d123"
}
}
]
When fetching your unique items, you can also use the parameters explained in the section GET parameters to filter. For example, this is the URL for fetching the first page of results corresponding to the unique item with number "123":
https://api.trackonline.com/api/v1/uniqueitem?ItemNumber=123&page=1&apikey=xxx
Of course, you can add as many parameters as you want in the URL. Therefor, add &filter=value
in the URL where filter
is the name of the filter and value
is the value you want to filter on.
Location
The data model for the location GET or POST calls consists of the following (marked with * are required fields):
Parameter | Type | Information |
---|---|---|
id | string($uuid) | Gets or sets the GUID of a location to filter on/ save. |
number* | string maxLength: 25 | Gets or sets the number of a location. |
name* | string maxLength: 50 | Gets or sets the name of a location. |
nameShort | string maxLength: 15 | Gets or sets the short name of a location. |
type* | integer | Gets or sets The type of a location.(e.g. customer, supplier, auction) Enum: [ 0=Unknown, 1=Customer, 2=Supplier, 3=Auction, 4=Carrier, 5=CompanyLocation, 6=Manufacturer, 7=ServiceCenter, 8=Retail, 9=RollingStock, 10=Administrative, 11=CrossDock, 12=Storage ] |
hierarchyLevel | integer | Gets the hierarchical level of the location. (e.g. headquarters, branch, store) Note: Only returned on a fetch, not used when saving a location. Enum: [ 1=HeadOffice, 2=BranchOffice, 3=Location, 4=SubLocation ] |
parentNumber | string maxLength: 25 | Gets the number of the parent location. Note: Only returned on a fetch, not used when saving a location. |
parentName | string | Gets the name of the parent location. Note: Only returned on a fetch, not used when saving a location. |
addressLine | string maxLength: 100 | Gets or sets the address line of a location. |
postalCode | string maxLength: 15 | Gets or sets the postal code of a location. |
city | string maxLength: 30 | Gets or sets the city of a location. |
stateOrProvince | string maxLength: 30 | Gets or sets the state or province of a location. |
country | string maxLength: 50 | Gets or sets the country of a location. |
telephone | string maxLength: 30 | Gets or sets the telephone of a location. |
mobile | string maxLength: 30 | Gets or sets the mobile of a location. |
emailAddress | string maxLength: 200 | Gets or sets the email address of a location. |
globalLocationNumber | string maxLength: 50 | Gets or sets the global location number of a location (unique number assigned to a location). |
chamberOfCommerceNumber | string maxLength: 50 | Gets or sets the chamber of commerce number. |
vatNumber | string maxLength: 50 | Gets or sets the vat number. |
legalEntityIdentifier | string maxLength: 50 | Gets or sets the legal entity identifier. |
gps | Object | latitude number($double) - max: 90 - min: -90 Gets or sets the latitude. longitude number($double) - max: 180- min: -180 Gets or sets the longitude. radius integer($int32) Gets or sets the radius (in meters). |
languageId | integer | Gets or sets the language of a location. Enum: [ 0=Unknown, 1=Dutch, 2=English, 3=German, 4=Swedish, 5=Spanish, 6=French, 7=Norwegian, 8=Russian ] |
geofence | integer($int32) | Gets or sets a radius in meters you can set around the gps location of the location. |
balanceOperationMode | integer | Gets or sets the balance operation mode. Enum: [ 0=NoRestriction, 10=ExchangeOnly, 20=BalanceRestriction ] |
isEnabled | boolean | Gets or sets a value indicating whether this location is active. |
createdOn | string($date-time) | Gets the date this location was created. Note: Only returned on a fetch, not used when saving a location. |
modifiedOn | string($date-time) | Gets the date this location was last modified. Only returned on a fetch, not used when saving a location. |
tags | [string] | Gets or sets the tags of a location. |
websiteUrl | string | Gets or sets the url of this location. |
externalNumbers | [Object] | Array of objects to associate identification numbers from external sources. source (string) - max 30 characters number (string) - max. 30 characters |
GET parameters
The GET parameters are the parameters you can pass in to filter the locations when fetching them. An example is available in the next section.
Parameter | Type | Information |
---|---|---|
Id | string | The GUID of the location. |
TypeCodes | [integer] | Array of locations type codes within [0=Unknown, 1=Customer, 2=Supplier, 3=Auction, 4=Carrier, 5=CompanyLocation, 6=Manufacturer, 7=ServiceCenter, 8=Retail, 9=RollingStock, 10=Administrative, 11=CrossDock, 12=Storage]. |
HierarchyLevels | [integer] | Array of hierarchy levels codes within [1=HeadOffice, 2=BranchOffice, 3=Location, 4=SubLocation]. |
Number | string | The exact number of the location. |
Name | string | Part of the name and / or the shortname of the location. |
ParentNumber | string | The exact number of the parent location. |
Enabled | boolean | Filter on enabled or disabled locations. Default: true. |
Page | integer | The page to fetch among all the results (based on 50 results per page). Default: 1. |
Example calls
In this example we are going to make a POST of a new location called From Location
with only the mandatory info.
[
{
"number": "123",
"name": "From Location",
"type": "CompanyLocation"
}
]
In this example we are going to make a POST of a new location called From Location
with some additional info.
[
{
"number": "456",
"name": "To Location",
"nameShort": "ToLoc",
"type": "Customer",
"addressLine": "123 Customer street",
"postalCode": "12345",
"city": "Customerville",
"stateOrProvince": "CUS",
"country": "Customerland",
"emailAddress": "info@customer.com",
"languageId": "English",
"balanceOperationMode": "NoRestriction",
"tags": ["Customer", "CUS", "Customerville"]
}
]
When fetching your locations, you can also use the parameters explained in the section GET parameters to filter. For example, this is the URL for fetching the first page of results corresponding to the locations with hierarchy level 1 AND a name or shortname containing "customer"0:
https://api.trackonline.com/api/v1/location?HierarchyLevels=1&Name=customer&page=1&apikey=xxx
Of course, you can add as many parameters as you want in the URL. Therefor, add &filter=value
in the URL where filter
is the name of the filter and value
is the value you want to filter on.
Packaging Label
The data model for the packaging label GET or POST calls consists of the following (marked with * are required fields):
Parameter | Type | Information |
---|---|---|
id | string($uuid) | Gets or sets the GUID of a packaging label to filter on save. |
number* | string maxLength: 30 | Gets or sets the number of a packaging label. |
expirationOn* | string($date-time) | Gets or sets the expiration date from when a packaging label will be inactive. |
type | integer | Gets or sets the type of a packaging label. Enum: [ 0=Undefined, 1=Sscc] |
isEnabled | boolean | Gets or sets a value indicating whether this packaging label is enabled/active. |
createdOn | string($date-time) | Gets the date this packaging label was created. Note: Only returned on a fetch, not used when saving a packaging label. |
modifiedOn | string($date-time) | Gets the date this packaging label was last modified. Note: Only returned on a fetch, not used when saving a packaging label. |
packagingNonSerializedItems | Object | itemDefinition - See item definition data model for reference. quantity - integer($int32) - Gets or sets the quantity. createdOn - string($date-time) - Gets the createdOn date. |
packagingSerializedItems | Object | uniqueItem - See unique item data model for reference. createdOn - string($date-time) - Gets the createdOn date. |
GET parameters
The GET parameters are the parameters you can pass in to filter the packaging labels when fetching them. An example is available in the next section.
Parameter | Type | Information |
---|---|---|
Id | string | The GUID of the packaging label. |
TypeCodes | [integer] | Array of packaging label type codes within [ 0=Undefined, 1=Sscc ]. |
Number | string | The exact number of the packaging label. |
IncludeInactive | boolean | Filter on enabled(active) or disabled(inactive) packaging labels. Default: false. |
Page | integer | The page to fetch among all the results (based on 50 results per page). Default: 1. |
Example calls
In this example we are going to make a POST of a packaging label with number PL0123456789
for type Sscc and expiration on 25-01-2028 with only the mandatory info. This packaging label DOESN'T have any non-serialized and serialized items.
[
{
"number": "PL0123456789",
"expirationOn": "2028-01-25T00:00:00.000Z",
"type": "Sscc"
}
]
In this example we are going to make a POST of a packaging label with number PL9876543210
for type Sscc and expiration on 26-03-2028, including non-serialized and serialized items. This packaging label includes 25 items of item definition 'CC Tag5' (non-serialized items) AND 2 unique items 'UI01' and 'UI02' (serialized items).
[
{
"number": "PL9876543210",
"expirationOn": "2028-03-26T00:00:00.000Z",
"type": "Sscc",
"packagingNonSerializedItems": [
{
"itemDefinition": {
"number": "CC TAG5",
"name": "CC TAG5",
"code": "TAG5",
"type": "LoadCarrier"
},
"quantity": "25"
}
],
"packagingSerializedItems": [
{
"item": {
"number": "UI01",
"barcode": "123456",
"itemDefinition": {
"number": "CC TAG5",
"name": "CC TAG5",
"code": "TAG5",
"type": "LoadCarrier"
}
},
"item": {
"number": "UI02",
"barcode": "789012",
"itemDefinition": {
"number": "CC TAG5",
"name": "CC TAG5",
"code": "TAG5",
"type": "LoadCarrier"
}
}
}
]
}
]
When fetching your packaging labels, you can also use the parameters explained in the section GET parameters to filter. For example, this is the URL for fetching the first page of results corresponding to the packaging labels with the letters "PL" in the number:
https://api.trackonline.com/api/v1/packaginglabel?Number=PL&page=1&apikey=xxx
Of course, you can add as many parameters as you want in the URL. Therefor, add &filter=value
in the URL where filter
is the name of the filter and value
is the value you want to filter on. Now if you want to filter packaging labels with the letters "PL" in the number AND of type "SScc" (typecode = 1) AND include the inactive (disabled) packaging labels, this is what the URL looks like:
https://api.trackonline.com/api/v1/packaginglabel?Number=PL&TypeCodes=1&IncludeInactive=true&page=1&apikey=xxx
Transaction
The data model for the transaction GET or POST calls consists of the following:
Parameter | Type | Information |
---|---|---|
id | string($uuid) | Gets or sets the Guid of the transaction to filter on. |
statusCode | integer($int32) | Gets or sets the Status-codes to filter on / or save to a transaction. See the TrackOnline configuration. [ New=0, Planned=5, Declined=10, Shipped=11, Confirmed=16, Cancelled=20, In progress=30, Executed=33, Processed=35 ] |
status | string | Gets the status of a transaction. (e.g. new, in progress, processed) Note: Only returned on a fetch, not used when saving a transaction. |
typeCode | integer($int32) | Gets or sets the type code of a transaction. See the TrackOnline configuration. [ Correction=5, Transfer=15, Scraps=20, Damaged=25, Lost=30, Found=35, Order=50, Collection=55, Declare=60, Return=65, Return delivered=67, Inter depot transfer=70, Intra depot transfer=75, Exchange=80 (NOT allowed for POST), Cross dock=85, Purchase=90, Sale=95, Unknown=99 ] |
type | string | Gets the type of a transaction. Note: Only returned on a fetch, not used when saving a transaction. |
transactionNumber | string maxLength: 50 | Gets or sets the number of the transaction, generated by TrackOnline when it is empty. |
documentNumber | string | Gets or sets the document number used for CMR’s. |
referenceNumber | string | Gets or sets the reference number, used for internal numbers. |
fromLocation | Object | See the location data model for reference. |
toLocation | Object | See the location data model for reference. |
dateTransaction | string($date-time) | Gets or sets the expected ‘load/shipping’ date of a transaction. |
dateTransactionCounterpart | string($date-time) | Gets or sets the ‘deliver’ date of a transaction. The expected or real delivery date of a transaction. If it is empty the transaction date is used, If it is before the transaction date the transaction will not be saved. |
contractor | Object | See the location data model for reference. |
carrier | Object | See the location data model for reference. |
licensePlate | string | Gets or sets the license plate. |
trailerNumber | string | Gets or sets the trailer number. |
transactionTripNumber | string | Gets or sets the transactiontrip number. |
dockNumber | string | Gets or sets the dock number. |
area | string | Gets or sets the area. |
notes | string | Gets or sets the notes. |
internalNotes | string | Gets or sets the internal notes. |
transactionItems | Object | itemDefinition - See item definition data model for reference. quantity - integer($int32) - Gets or sets the quantity. quantityPlanned - integer($int32) - Gets or sets the planned quantity. itemConditionType - integer($int32) - Gets or sets the item condition. Enum: [ 0=Unknown, 1=Clean, 2=Dirty, 3=Polluted, 4=Damaged, 5=Scrap ] |
transactionDocuments | Object | Gets or sets the list of public documents (url) related to the transaction. See transactionDocument data model for reference. |
createdOn | string($date-time) | Gets the created on. Note: Generated by Trackonline, not used for saving. |
modifiedOn | string($date-time) | Gets the modified on date, when the last change was done to the transaction. Note: Generated by Trackonline, not used for saving. |
processedOn | string($date-time) | Gets the date that a transaction was processed to its final readonly state. Note: Generated by Trackonline, not used for saving. |
isDeleted | boolean | Indicator for being deleted |
scannedItems | Object | Gets or sets the scanned item codes, which will be translated by TrackOnline to items with a quantity. type - integer($int32) - Gets or sets the type of code which was scanned. Enum: [ 0=Unknown, 10=BarCode, 20=EpcCode ] code - string - Gets or sets scanned item code. |
packagingLabelNumbers | Object | Gets or sets the packaging label numbers, which will be translated by TrackOnline to items with a quantity. Number - string - Gets or sets packaging label numbers. |
No date
When you don’t give in a date filter, the API will filter the transactions automatically from 7 days back until now.
GET parameters
The GET parameters are the parameters you can pass in to filter the transactions when fetching them. An example is available in the next section.
Parameter | Type | Information |
---|---|---|
Id | string | The GUID of the transaction. |
StatusCode | [integer] | Array of transaction status codes within [New=0, Planned=5, Declined=10, Shipped=11, Confirmed=16, Cancelled=20, In progress=30, Executed=33, Processed=35]. |
TypeCodes | [integer] | Array of transaction type codes within [Start balance=0, External start balance=1, Correction=5, Audit=10, Transfer=15, Agreement=16, Scraps=20, Damaged=25, Lost=30, Found=35, Order=50, Collection=55, Declare=60, Return=65, Return delivered=67, Inter depot transfer=70, Intra depot transfer=75, Exchange=80, Cross dock=85, Purchase=90, Sale=95, Unkonwn=99]. |
OnlyProcessed | boolean | Filter all transactions or only processed ones. |
TransactionDateFrom | string | The "date" field of the transaction. Default: 7 days back. Syntax: yyyy-MM-ddThh:mm:ss.msZ |
TransactionDateTo | string | The "date counterpart" field of the transaction. Default: now. |
CreatedDateFrom | string | The beginning of the range on the transaction creation date. |
CreatedDateTo | string | The end of the range on the transaction creation date. |
TransactionNumber | string | The number of the transaction. |
ReferenceNumber | string | The reference number of the transaction. |
DocumentNumber | string | The document number of the transaction. |
FromLocations | [string] | Array of the numbers of transactions from locations. |
ToLocations | [string] | Array of the numbers of transactions to locations. |
Carriers | [string] | Array of the numbers of the transactions carriers. |
Page | integer | The page to fetch among all the results (based on 50 results per page). Default: 1. |
Example calls
In this example we are going to make a POST of a transaction from “From Location” to “To Location” containing 25 pieces of the CC TAG5 load carrier. This is an example without unique items.
[
{
"statusCode": 0,
"typeCode": 60,
"transactionNumber": "1234567890",
"fromLocation": {
"number": "123",
"name": "From Location",
"type": "Customer"
},
"toLocation": {
"number": "456",
"name": "To Location",
"type": "Customer",
"tags": []
},
"dateTransaction": "2020-01-01T00:00:00.000Z",
"dateTransactionCounterpart": "2020-01-01T00:00:00.000Z",
"transactionItems": [
{
"itemDefinition": {
"number": "CC TAG5",
"name": "CC TAG5",
"code": "TAG5",
"type": "LoadCarrier"
},
"quantity": "25"
}
]
}
]
In this example we are going to make a POST of a transaction from “From Location” to “To Location” containing 3 unique items that are containing a barcode.
[
{
"statusCode": 35,
"typeCode": 15,
"transactionNumber": "1234567890",
"fromLocation": {
"number": "123",
"name": "From Location"
},
"toLocation": {
"number": "456",
"name": "To Location"
},
"dateTransaction": "2020-01-01T00:00:00.0000000+00:00",
"scannedItems": [
{
"type": "BarCode",
"code": "0000001"
},
{
"type": "BarCode",
"code": "0000002"
},
{
"type": "BarCode",
"code": "0000003"
}
]
}
]
When fetching your transactions, you can also use the parameters explained in the section GET parameters to filter. For example, this is the URL for fetching the first page of results corresponding to the transactions created between the 1st and the 31st of May with the carriers 001 or 002:
https://api.trackonline.com/api/v1/transaction?CreatedDateFrom=2020-05-01T00%3A00%3A00.000Z&CreatedDateTo=2020-05-31T23%3A59%3A59.000Z&Carriers=001&Carriers=002&page=1&apikey=xxx
Of course, you can add as many parameters as you want in the URL. Therefor, add &filter=value
in the URL where filter
is the name of the filter and value
is the value you want to filter on.
Character encoding
In URLs, some characters need to be encoded, it is the case of the colon ":", this is why you can see "%3A" instead of ":" in the dates.
Transaction Trip
You can set a trip to the next status. Therefor you need to send the entityguid of the trip you would like to set to the next status. A trip in the status new
is set to the status in progress
. A trip in the status in progress
is set to the status processed
.
Transactions to status processed
If a trip is set to the status 'processed', all transactions within this trip will alsow be set on the status 'processed'. These transactions can not be modified anymore.
Below an example call is shown.
Example call
In this example we are going to set the status of trip with guid (id) A7B8AF3F-4C16-492E-A3B7-451E8E096D30
to the next status.
[
{
"id": "A7B8AF3F-4C16-492E-A3B7-451E8E096D30"
}
]
IoT device
GET IoT Device
The data model for the IoT GET call consists of the following:
Parameter | Type | Information |
---|---|---|
itemNumber | [string] | The unique item numbers to filter. |
itemDefinitionId | [string] | The item definition identifiers to filter. |
locationId | [string] | The location identifiers to filter. |
includeDeleted | boolean | If set to {true}, include deleted unique items. Default value: false. |
page | integer | The page to fetch based on a page size is of 50. Default value: 1. |
GET IoT Device history
Furthermore, it is possible to fetch the history of locations for an IoT device as explained below. The GET parameters are the parameters you can pass in to filter the transactions when fetching them. An example is available in the next section.
Parameter | Type | Information |
---|---|---|
item | string | The unique item number/barcode/rfid to filter. |
deviceId | string | The item device id to filter. |
dateFrom | string | The from date to filter (default: 14 days back). |
dateTo | string | The to date to filter (default: now). |
Example calls
Let's say you need to find the IoT devices attached to items with item definition ID b2ccd1e4-e30f-4473-862f-28eb69238f65. This is how the URL looks like.
https://api.trackonline.com/api/v1/iot/item?itemDefinitionId=b2ccd1e4-e30f-4473-862f-28eb69238f65&page=1&apikey=xxx
ID information
The ID used here is the unique ID that you can find when fetching the item definitions from the API, not the item definition number that you see in the TrackOnline interface.
Now, if you want to views the history of one specific IoT device, let's say 00EDBED7, you can do the following:
https://api.trackonline.com/api/v1/iot/item/measurement?deviceId=00EDBED7&apikey=xxx
Default period
Remember, if you don't specify the start and end dates like in this example, the API gives you the history for the last 14 days by default.
Of course, you can add as many parameters as you want in the URL. Therefor, add &filter=value
in the URL where filter
is the name of the filter and value
is the value you want to filter on.
Balance
You can either get the regular balance of a location or the balance by counterpart whether you specify a counterpart or not. The data model for the balance GET calls consists of the following:
Parameter | Type | Information |
---|---|---|
date | string | The date and time to filter the balance on. |
locations | [string] | Array of locations numbers. |
onlyProcessed | boolean | Calculate the balance only for processed transactions. |
excludeZeroBalance | boolean | Exclude 0 balances from the data. |
counterparts | [string] | Array of locations numbers. Only for /api/v1/balance/counterpart |
Example calls
This first example is for fetching the balance for locations A and B, excluding ongoing transactions and empty balances:
https://api.trackonline.com/api/v1/balance?locations=A&locations=B&onlyProcessed=true&excludeZeroBalance=true&apikey=xxx
Now let's imagine you don't want the balance that you have with A and B but rather the balance that A has with B. Therefor, you need to use the URL /api/v1/balance/counterpart like this:
https://api.trackonline.com/api/v1/balance/counterpart?location=A&counterparts=B&onlyProcessed=true&excludeZeroBalance=true&apikey=xxx
Batch calculation
GET Batch calculation(s)
To get a filtered list of batch calculations, the following parameters can be used:
Parameter | Type | Information |
---|---|---|
id | [string($uuid)] | Array of batch calculation IDs to filter. |
number | [string] | Array of batch calculation numbers to filter. |
page | integer | The page to fetch based on a page size is of 50. Default value: 1. |
GET Download batch calculation result
Furthermore, it is possible to download the complete batch calculation result.
Parameter | Type | Information |
---|---|---|
id | string($uuid) | The batch calculation ID. |
outputType | integer | The content-type of the downloaded file (0 = Json, 1 = Xml, 2 = EOLFinLogisticExport (Csv), 3 = EOLLogInvoiceExport (Csv)). |
GET Document(s) for batch calculation(s)
To get a filtered list of batch calculation documents, the following parameters can be used:
Parameter | Type | Information |
---|---|---|
id | [string($uuid)] | Array of batch calculation ids to filter. |
number | [string] | Array of batch calculation numbers to filter. |
page | integer | The page to fetch based on a page size is of 50. Default value: 1. |
GET Download batch calculation result document
Furthermore, it is possible to download a single batch calculation result document.
Parameter | Type | Information |
---|---|---|
id | string($uuid) | The document ID. |
API responses
Below are the possible responses for the calls above.
Response | Information |
---|---|
200 | The result of the data save batch. Data are successfully received. A message ID is added to the response which can be used for polling for the save result. The list of data for the current filters. |
202 | Data save process not finished. |
204 | No data found for the current filters. |
400 | One or more received data are incorrect. |
401 | Unauthorized. |
404 | The message ID of the result was not found. |
410 | The message ID of the result is outdated. |
429 | maximum requests from your ip or API key reached, check “Retry-After” header when to retry this request. |
500 | Unhandled error. See API log for more information. |
If you need further data such as specific models that are not explained above, please refer to the following section.
Online API documentation
For online documentation of the different methods that can be used visit the following link: Online API documentation
In the online API documentation you can use your API key to authorize your request by pressing the authorize button and enter your API key string.
Extra information about the parameters and models of the methods can also be found on this page. In the example below we explain where you can find this information.
Information about methods and parameters
First click on one of the methods. In this example we click on the POST
Method of the 'item definition' controller. See the image below.
POST method of the item definition controller
This opens the POST method. Now you can see the name and description of the parameters and the responses.
Second, to see the description of each parameter, click on Model
(next to 'Example value') as shown in the image below.
Model of the item defintion controller
Third click on one of the model links. In this case only one link is shown, the ItemDefinitionDto link. See the image below.
Model link
The link unfolds and all the parameters of the model are now shown. In the column 'The item definition', you can find a description of each parameter. Also the type, maximum and minimum and more details are described here.