Skip to content

SaveSeqData

Saves the values and remarks of events and data fields on work orders: for example the date and time a container was gated in, or a customer’s reference. Each item is checked as if a user saved it on the work order’s Events or Data tab, and is saved or refused on its own. The response gives the result of each item.

To read the current values, use GetSeqData. For a large batch, SaveSeqDataAsync takes the same items, answers at once and posts the results to your own URL when it has finished.

How to sign in and read the response: Authentication, Responses.

POST /api/v1/SaveSeqData
Token: your-token
Content-Type: application/json
[
{ "WOID": 48211, "Code": "GATEIN", "Value": "2026-10-20T09:30:00", "Remarks": "Gate 3" },
{ "WOID": 48211, "Code": "CUSTREF", "Value": "PO-77310" },
{ "WOID": 48212, "Code": "ETA", "Value": "TBA", "Remarks": "Vessel delayed" }
]

The body is a JSON array of 1 to 999 items. Each item sets one event or data field of one work order:

Field Required Meaning
WOID Yes The work order’s ID.
Code Yes The code of the event or data field, as the work order shows it with Show Codes. Not case-sensitive.
Value Yes The new value, as text: see Values. An empty string clears the field. To change only the remarks, send the current value again.
Remarks No The remarks. Leaving it out, or sending an empty string, clears the remarks the field has.
UpdatedBy No The token of the TrakIT user who made the change, as Login returned it for that user. The change is then recorded under that user, and that user’s permissions apply: see Rules. Without it, the change is recorded under the API user. If you use it, give it on every item of the request.

Field names are not case-sensitive. The other fields that GetSeqData returns (Type, FullName, ValueID, UpdatedOn) are ignored if you send them.

Send each value as text, in the form its type needs:

Type Send
Event, Date The date and time in UTC, as yyyy-MM-ddTHH:mm:ss or yyyy-MM-dd HH:mm, without a time zone suffix; yyyy-MM-dd alone means midnight. TrakIT keeps the minutes, not the seconds. Or NA (not applicable) or TBA (to be advised), if the field allows them. See Dates.
Number A number, with . for decimals. TrakIT rounds it to the field’s decimal precision.
Currency An amount, with . for decimals. TrakIT keeps two decimals.
Text Any text; TrakIT keeps the first 800 characters. For a field with an item list, an item of the list, or for several items, the items separated by line breaks (\n). The field’s Data Option applies, for example Force Upper Case.
Hyperlink A web address, or an email address starting with mailto:. TrakIT adds http:// to an address with no scheme.
Phone Up to 15 characters: digits, an optional leading +, and an area code in brackets if needed.
Geo Data The exact name or code of one location, of the field’s Geo Data Type. See Geo data. TrakIT stores the text you send, so send the location’s name.
Entity The exact name, code or registration number of one entity of the field’s Entity Type. If no entity matches it exactly, TrakIT looks for entities whose name or code contains it, so send a value that matches exactly one entity. TrakIT stores the text you send: send the entity’s name as TrakIT shows it.
Computed Do not send: TrakIT works out computed values and recalculates them after each save.
Google Place Cannot be set with the API: a place must be picked from Google’s suggestions in TrakIT.

The field types are described under Event and data definitions.

TrakIT first checks the request as a whole:

Rule Info when it fails
The body is a JSON array of items. No data supplied or json is malformed
It has at most 999 items. Count of data supplied must be less than 1000

Then it checks and saves each item on its own, in the order sent. An item that fails does not stop the others. These checks, in this order, give the item’s Info in the response:

Rule Item Info when it fails
The work order has an event or data field with this code. No Data Found
The work order is active or abandoned, not closed or cancelled. Cannot modify closed or cancelled Work Order
UpdatedBy, if given, is a token of an existing user who is not locked. Impersonated user token is not valid, No such user, Impersonated user ... is locked
The value or the remarks differ from what is saved. Unchanged
The user may update events and data. With UpdatedBy, that user’s role needs Update Events & Data, and, unless the user is a system administrator, update access to the field. Permission Denied
A unique field’s value is not used on another work order. Value is not unique
The value matches the field’s pattern, if TrakIT Support set one. The pattern’s own message
The value does not start with =, + or @ (a phone number can start with +), and has no < followed by a letter. Value contains possible html tag
A number or an amount is a number of at most 18 characters. Value must be numeric, Value too big
An event or a date is a date and time, NA or TBA, as the field allows. An event is not before 2018, a date not before 1900. Invalid Date/Time, 'NA' not allowed, 'TBA' not allowed, Invalid Date
An event is within the field’s Allowed Offset of the current time. Allowed Offset: ... mins
An event is at most 5 minutes in the future, unless it is for information only. Future Time/Date
With the workflow’s Enforce Chronological Order, the event is not before an earlier event or the work order’s creation. Information-only events are not checked. Chronological order
Unless the workflow has Ignore Event Sequence, the earlier events of the work order have a value. Information-only events are not checked. Out of sequence
A hyperlink is a valid http, https, ftp or mailto address. Not a hyperlink
A location or an entity is found. ID is missing
A phone number has at most 15 characters, of the form above. Phone number is too long, Not a phone number
A field with an item list gets items of the list, no more than the field allows. Value not from list, Value '...' not from list, Max ... items only
Unless the workflow has Ignore Event Sequence, an event is cleared only if no later event has a value. Empty not accepted
A mandatory field is not cleared. Field is mandatory
Remarks are given if the field requires them. Remarks are required
The remarks do not start with =, + or @, and have no < followed by a letter. Remarks contains possible html tags or disallowed text
What the field Requires has a value other than TBA on the work order. Missing ..., Required field '...' missing.
The value passes the field’s validation expression, if TrakIT Support set one. The expression’s own message, or Validation Expression Error

The checks are those of the app: see When a value is not saved, the field settings in Event and data definitions and the workflow’s Operations settings. The custom validations that TrakIT Support may set for Save WO Events/Data on Validations & actions do not run for this endpoint.

Code is 1 if at least one item was saved, and 0 if none was. RowsAffected is the number of items saved, and RetInfo has one result for each item, in the order sent. Info, Identity and Scalar are not used.

{
"Code": 1,
"Info": null,
"RetInfo": [
{ "WOID": 48211, "Code": "GATEIN", "Result": 1, "Info": "Success" },
{ "WOID": 48211, "Code": "CUSTREF", "Result": 0, "Info": "Unchanged" },
{ "WOID": 48212, "Code": "ETA", "Result": 0, "Info": "'TBA' not allowed" }
],
"RowsAffected": 1,
"Scalar": null,
"Identity": 0
}
Field Meaning
WOID, Code The item’s work order and code, as sent.
Result 1: saved. 0: not saved. -1: not saved because of an unexpected error.
Info Success when saved; otherwise why not, from the rules. Unchanged means the value and remarks were already saved.
  • One work order per item. A value is saved on the work order you name, even for a field that applies to the whole job: to set it on each work order of the job, send one item for each.
  • What follows a save. Right after the request, TrakIT recalculates the work order’s computed fields and updates its status: when all its required events and data have a value other than TBA, the work order closes, as in the app. If the event is the workflow’s revenue/expense recognition event, the job’s recognition date is updated.
  • Actions. The actions of the events and data you change, such as emails, messages or updates of other fields, do not run during the request. TrakIT runs them with its regular check, every 30 minutes, so they can follow up to about 30 minutes later. Notifications to subscribed users, workflow instructions and delay tracking follow a few minutes later, as for a change made in the app.
  • Audit log. Each change is recorded in the work order’s audit log, under the API user or the UpdatedBy user.
  • Retries. Sending an item again with the same value and remarks returns Unchanged and changes nothing, so you can safely send a batch again after a timeout.
  • Large batches. The response comes when all items have been processed. If a batch is too slow for your timeout, send smaller batches or use SaveSeqDataAsync.