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.

SiteURL
Productionhttps://api.trackonline.comopen in new window

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.

  1. Open the cogwheel menu, and navigate to administration settings.
  2. Navigate to API setting option.
  3. Give your API key a name and press create.

Create-ApiKey

This generated API key can be used in the header of the request, or in the querystring.

TypeValueExample
HeaderX-ApiKeyX-ApiKey:xxx.xxxx.xxx
Querystringapikeyhttps://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.

  1. 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.
  2. 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.
  3. 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:

  1. Status
    • GET API status
  2. IoT
    • GET IoT item(s)
    • GET IoT item measurement(s)
  3. Item definition
    • GET item definition(s)
    • GET result of saved item definition(s)
  4. Item configuration
    • GET item configuration(s)
    • GET result of saved item configuration(s)
  5. Unique item
    • GET unique item(s)
    • GET result of saved unique item(s)
  6. Location
    • GET location(s)
    • GET result of savedlLocation(s)
  7. Transaction
    • GET transaction(s)
    • GET result of saved transaction(s)
  8. Balance
    • GET balance(s)
    • GET counterpart balance(s)
  9. 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:

  1. Item definition
    • POST item definition(s)
  2. Item configuration
    • POST item configuration(s)
  3. Unique item
    • POST unique item(s)
  4. Location
    • POST location(s)
  5. 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):

ParameterTypeInformation
idstring($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*integerGets 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 ]
gS1Codestring
maxLength: 50
Gets or sets the GS1(Global Standards One) code of an item definition.
basePricenumber($double)Gets or sets the base price of an item definition.
lengthnumber($double)
max: 9999.99
min: 0
pattern: ^\d+.?\d{0,2}$
Gets or sets the length of an item definition.
widthnumber($double)
max: 9999.99
min: 0
pattern: ^\d+.?\d{0,2}$
Gets or sets the width of an item definition.
heightnumber($double)
max: 9999.99
min: 0
pattern: ^\d+.?\d{0,2}$
Gets or sets the height of an item definition.
weightnumber($double)
max: 9999.99
min: 0
pattern: ^\d+.?\d{0,2}$
Gets or sets the weight of an item definition.
volumenumber($double)
max: 9999.99
min: 0
pattern: ^\d+.?\d{0,2}$
Gets or sets the volume of an item definition.
numberOfTruckSpacesinteger($int32)Gets or sets the total floor spaces in a truck/trailer that the item uses.
maxStackHeightinteger($int32)Gets or sets the maximum height of a stack of the items per truck/trailer.
maxTruckLoadinteger($int32)Gets or sets the maximum items that fit a truck/trailer load.
standardOrderQuantityinteger($int32)Gets or sets the standard Order quantity to use as transaction quantity (or its multiplication)
isEnabledbooleanGets or sets a value indicating whether this item definition is enabled.
createdOnstring($date-time)Gets the date this item definition was created.
Note: Only returned on a fetch, not used when saving an item definition.
modifiedOnstring($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.

ParameterTypeInformation
IdstringThe 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 ].
NumberstringThe exact number of the item definition.
NamestringPart of the name and / or the code of the item definition.
GS1CodestringThe exact GS1 code of the item definition.
EnabledbooleanFilter on enabled or disabled item definitions. Default: true.
PageintegerThe 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):

ParameterTypeInformation
idstring($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.

ParameterTypeInformation
IdstringThe GUID of the item configuration.
NamestringPart of the name of item configuration
PageintegerThe 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):

ParameterTypeInformation
idstring($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.
barCodestring
maxLengte: 100
Gets or sets the Barcode of a unique item.
epcCodestring
maxLengte: 100
Gets or sets the EPC code of a unique item.
bleCodestring
maxLengte: 100
Gets or sets the BLE code of a unique item.
itemDefinition *ObjectGets 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.
lastKnownPositionObjectGets the last known position.
Note: Only returned on a fetch, not used when saving an unique item.
lastKnownLocationObjectGets or sets the last known location. See the location data model for reference.
lastKnownTemperaturenumber($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.
lastKnownTransactionIdstring($uuid)Gets the last known transaction ID (GUID).
Note: Only returned on a fetch, not used when saving an unique item.
firstSeenstring($date-time)Gets or sets the date of first seen.
lastSeenstring($date-time)Gets or sets the date of last seen.
createdOnstring($date-time)Gets the date this item definition was created.
Note: Only returned on a fetch, not used when saving an unique item.
notesstringGets or sets the notes.
isDeletedbooleanIndicator 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.

ParameterTypeInformation
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.
IncludeDeletedbooleanFilter if deleted unique items need to be added to the search result. Default: false.
PageintegerThe 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):

ParameterTypeInformation
idstring($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.
nameShortstring
maxLength: 15
Gets or sets the short name of a location.
type*integerGets 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 ]
hierarchyLevelintegerGets 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 ]
parentNumberstring
maxLength: 25
Gets the number of the parent location.
Note: Only returned on a fetch, not used when saving a location.
parentNamestringGets the name of the parent location.
Note: Only returned on a fetch, not used when saving a location.
addressLinestring
maxLength: 100
Gets or sets the address line of a location.
postalCodestring
maxLength: 15
Gets or sets the postal code of a location.
citystring
maxLength: 30
Gets or sets the city of a location.
stateOrProvincestring
maxLength: 30
Gets or sets the state or province of a location.
countrystring
maxLength: 50
Gets or sets the country of a location.
telephonestring
maxLength: 30
Gets or sets the telephone of a location.
mobilestring
maxLength: 30
Gets or sets the mobile of a location.
emailAddressstring
maxLength: 200
Gets or sets the email address of a location.
globalLocationNumberstring
maxLength: 50
Gets or sets the global location number of a location (unique number assigned to a location).
chamberOfCommerceNumberstring
maxLength: 50
Gets or sets the chamber of commerce number.
vatNumberstring
maxLength: 50
Gets or sets the vat number.
legalEntityIdentifierstring
maxLength: 50
Gets or sets the legal entity identifier.
gpsObjectlatitude 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).
languageIdintegerGets 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 ]
geofenceinteger($int32)Gets or sets a radius in meters you can set around the gps location of the location.
balanceOperationModeintegerGets or sets the balance operation mode.
Enum: [ 0=NoRestriction, 10=ExchangeOnly, 20=BalanceRestriction ]
isEnabledbooleanGets or sets a value indicating whether this location is active.
createdOnstring($date-time)Gets the date this location was created.
Note: Only returned on a fetch, not used when saving a location.
modifiedOnstring($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.
websiteUrlstringGets 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.

ParameterTypeInformation
IdstringThe 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].
NumberstringThe exact number of the location.
NamestringPart of the name and / or the shortname of the location.
ParentNumberstringThe exact number of the parent location.
EnabledbooleanFilter on enabled or disabled locations. Default: true.
PageintegerThe 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):

ParameterTypeInformation
idstring($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.
typeintegerGets or sets the type of a packaging label.
Enum: [ 0=Undefined, 1=Sscc]
isEnabledbooleanGets or sets a value indicating whether this packaging label is enabled/active.
createdOnstring($date-time)Gets the date this packaging label was created.
Note: Only returned on a fetch, not used when saving a packaging label.
modifiedOnstring($date-time)Gets the date this packaging label was last modified.
Note: Only returned on a fetch, not used when saving a packaging label.
packagingNonSerializedItemsObjectitemDefinition - See item definition data model for reference.

quantity - integer($int32) - Gets or sets the quantity.

createdOn - string($date-time) - Gets the createdOn date.
packagingSerializedItemsObjectuniqueItem - 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.

ParameterTypeInformation
IdstringThe GUID of the packaging label.
TypeCodes[integer]Array of packaging label type codes within [ 0=Undefined, 1=Sscc ].
NumberstringThe exact number of the packaging label.
IncludeInactivebooleanFilter on enabled(active) or disabled(inactive) packaging labels. Default: false.
PageintegerThe 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:

ParameterTypeInformation
idstring($uuid)Gets or sets the Guid of the transaction to filter on.
statusCodeinteger($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 ]
statusstringGets the status of a transaction. (e.g. new, in progress, processed)
Note: Only returned on a fetch, not used when saving a transaction.
typeCodeinteger($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 ]
typestringGets the type of a transaction.
Note: Only returned on a fetch, not used when saving a transaction.
transactionNumberstring
maxLength: 50
Gets or sets the number of the transaction, generated by TrackOnline when it is empty.
documentNumberstringGets or sets the document number used for CMR’s.
referenceNumberstringGets or sets the reference number, used for internal numbers.
fromLocationObjectSee the location data model for reference.
toLocationObjectSee the location data model for reference.
dateTransactionstring($date-time)Gets or sets the expected ‘load/shipping’ date of a transaction.
dateTransactionCounterpartstring($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.
contractorObjectSee the location data model for reference.
carrierObjectSee the location data model for reference.
licensePlatestringGets or sets the license plate.
trailerNumberstringGets or sets the trailer number.
transactionTripNumberstringGets or sets the transactiontrip number.
dockNumberstringGets or sets the dock number.
areastringGets or sets the area.
notesstringGets or sets the notes.
internalNotesstringGets or sets the internal notes.
transactionItemsObjectitemDefinition - 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 ]
transactionDocumentsObjectGets or sets the list of public documents (url) related to the transaction. See transactionDocument data model for reference.
createdOnstring($date-time)Gets the created on.
Note: Generated by Trackonline, not used for saving.
modifiedOnstring($date-time)Gets the modified on date, when the last change was done to the transaction.
Note: Generated by Trackonline, not used for saving.
processedOnstring($date-time)Gets the date that a transaction was processed to its final readonly state.
Note: Generated by Trackonline, not used for saving.
isDeletedbooleanIndicator for being deleted
scannedItemsObjectGets 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.
packagingLabelNumbersObjectGets 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.

ParameterTypeInformation
IdstringThe 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].
OnlyProcessedbooleanFilter all transactions or only processed ones.
TransactionDateFromstringThe "date" field of the transaction. Default: 7 days back. Syntax: yyyy-MM-ddThh:mm:ss.msZ
TransactionDateTostringThe "date counterpart" field of the transaction. Default: now.
CreatedDateFromstringThe beginning of the range on the transaction creation date.
CreatedDateTostringThe end of the range on the transaction creation date.
TransactionNumberstringThe number of the transaction.
ReferenceNumberstringThe reference number of the transaction.
DocumentNumberstringThe 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.
PageintegerThe 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:

ParameterTypeInformation
itemNumber[string]The unique item numbers to filter.
itemDefinitionId[string]The item definition identifiers to filter.
locationId[string]The location identifiers to filter.
includeDeletedbooleanIf set to {true}, include deleted unique items.
Default value: false.
pageintegerThe 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.

ParameterTypeInformation
itemstringThe unique item number/barcode/rfid to filter.
deviceIdstringThe item device id to filter.
dateFromstringThe from date to filter (default: 14 days back).
dateTostringThe 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:

ParameterTypeInformation
datestringThe date and time to filter the balance on.
locations[string]Array of locations numbers.
onlyProcessedbooleanCalculate the balance only for processed transactions.
excludeZeroBalancebooleanExclude 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:

ParameterTypeInformation
id[string($uuid)]Array of batch calculation IDs to filter.
number[string]Array of batch calculation numbers to filter.
pageintegerThe 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.

ParameterTypeInformation
idstring($uuid)The batch calculation ID.
outputTypeintegerThe 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:

ParameterTypeInformation
id[string($uuid)]Array of batch calculation ids to filter.
number[string]Array of batch calculation numbers to filter.
pageintegerThe 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.

ParameterTypeInformation
idstring($uuid)The document ID.

API responses

Below are the possible responses for the calls above.

ResponseInformation
200The 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.
202Data save process not finished.
204No data found for the current filters.
400One or more received data are incorrect.
401Unauthorized.
404The message ID of the result was not found.
410The message ID of the result is outdated.
429maximum requests from your ip or API key reached, check “Retry-After” header when to retry this request.
500Unhandled 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 documentationopen in new window

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

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

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.

Parameter names and descriptions

Parameter names and descriptions