ExecuteMove
Records a move of a container that is in a container yard, as carried out now: into a zone and
stack position, onto a truck, or out of the yard. A yard system, such as a terminal or gate system,
uses it so that TrakIT’s yard inventory follows the containers as they
move. To check where a container is first, use
GetContainerPosition.
The new move carries on from the container’s last move in the yard: it takes that move’s work order, vehicle, seal and other details, with the move type, zone, position, remarks and location you send. It then appears on Yard moves like any other move, with System as the user.
How to send the key and read the response: API keys, Responses.
POST /api/public/ExecuteMoveAuthorization: Bearer your-api-keyContent-Type: application/json{ "WHKey": "your-yard-key", "Cont": "ABCU1234560", "MoveType": 2, "Zone": "BLKA", "Bay": 4, "Row": 2, "Tier": 1, "Remarks": "Reach stacker RS-03", "Latitude": 5.6312, "Longitude": -0.0174}Send the key in an Authorization header with the Bearer scheme. The key must be allowed to
execute yard moves (yard.execute); TrakIT Support sets this up. Without the header, or with
another scheme, TrakIT answers HTTP 401 with no body.
The field names are case-sensitive: write them exactly as below.
| Field | Required | Meaning |
|---|---|---|
WHKey |
Yes | The yard’s key, which TrakIT Support gives you with the API key. |
Cont |
Yes | The container number. Capitals don’t matter. |
MoveType |
Yes | The move, as a whole number: see Move types. |
Zone |
For an In-Stack move | The zone to put the container in: its code, its name, or both as CODE - Name. Read for In-Stack moves only. |
Bay, Row, Tier |
For an In-Stack move into a zone with stack positions | The stack position, as whole numbers from 1. Send all three; leave them out for a zone with No Positioning. See Positions. |
Remarks |
No | Remarks for the move, up to 500 characters: longer remarks are cut short. |
Latitude, Longitude |
No | Where the move was made, in decimal degrees: a latitude from -80 to 80 and a longitude from -180 to 180. Send both or neither. TrakIT shows the place on a map: see Move location. |
Move types
Section titled “Move types”MoveType |
Move | What it records |
|---|---|---|
2 |
In-Stack | The container is put in Zone, at the stack position Bay, Row, Tier, or in the zone without a position if it has No Positioning. |
3 |
On-Truck | The container is taken out of its stack position onto a truck. It stays in its zone. |
1 |
Gate-Out | The container leaves the yard. The move takes its vehicle number from the container’s last move. |
This endpoint records moves of containers that are already in the yard: use it for these three move types. Gate-ins and the other moves are recorded in TrakIT or with the Device app.
Positions
Section titled “Positions”How a container is put in a zone depends on how the yard and zone are set up: see Warehouses and yards for Validate Position and Default Zone, and zones for No Positioning.
- If the zone has no such position, or the position is disabled, TrakIT still records the move, in
the zone without a position, and adds
No such position in zone ...with the position to the move’s remarks and toInfo. - If the position holds another container and the yard has a Default Zone, TrakIT takes the
other container out of the position, leaving it in its zone without a position, puts yours in, and
says so in
Info. If the other container can’t be taken out, for example because one is stacked on it, yours goes into the zone without a position. In a yard without a default zone, the move is refused withPosition already occupied. - If the container is already at that position, nothing is recorded, and the answer is a success
with
InfoContainer is already in position. - If the yard has Validate Position set to Yes, the stacking rules apply, for example a 20-foot container above the ground needs a 20-foot container under it. See the Rules for the messages.
| Rule | Info when it fails |
|---|---|
| The body is JSON. | Incorrect Json syntax or move missing |
The request has an Authorization: Bearer header. |
No Info: HTTP 401 with no body. |
| The key is active and allowed to execute yard moves. | Key is disabled, not recognized or permission denied |
WHKey is a yard’s key. |
WHKey is missing or invalid |
Cont is given. |
Cont is required |
| TrakIT knows the container: it is on Container master. | Container not found |
| The container is in a yard. | Container not in yard |
| The container is in this yard. | Container is in another yard: ..., with the yard’s name |
| The container has a move carried out in this yard. | Could not retrieve last executed move |
In-Stack: Zone is given. |
Zone is required |
In-Stack: Zone is a zone of this yard, and only one. |
Invalid Zone: ..., More than one records found for Zone: ... |
In-Stack without Bay, Row and Tier: the zone has No Positioning. |
Zone ... requires a position. |
Latitude and Longitude are sent together. |
Both Latitude and Longitude must be provided together |
| They are in range. | Latitude must be between -80.0 and +80.0, Longitude must be between -180.0 and +180.0 |
| Your company’s own validations for executed yard moves, if it has any. | Their own messages |
| Gate-Out: the container’s last move has a vehicle number. | Vehicle Number is required |
| The container’s last move is not a gate-out, or the container has a stack position. | Container not found in yard |
| Gate-Out: the container is not blocked. | Container is blocked: ..., with the reason |
| On some installations, In-Stack and On-Truck: the zone takes the container’s full or empty state. | Zone ... accepts empty containers only. A full container cannot be placed in it., Zone ... accepts full containers only. An empty container cannot be placed in it. |
| With Validate Position set to Yes: no container is stacked on the one you move out of its position. | Cannot remove container under another |
| In-Stack: the position is free, or the yard has a Default Zone. | Position already occupied |
| In-Stack with Validate Position set to Yes: the container can be stacked at the position. | Position blocked by 40', Position blocked by 40' under, Requires 20' container under, Require 2x20' under, Position under empty or disabled, Cannot stack on unknown container size, Adjacent Position is occupied, Adjacent Position is disabled, Cannot place 40' here |
Response
Section titled “Response”On success, Code is 1. Info is empty, or holds a note:
Move executed successfully.followed by what TrakIT changed: the position did not exist (No such position in zone ...), or another container was taken out of it (... was occupied by ..., which was moved to zone ... without a position.);Container is already in position: no move was recorded.
The response does not give the new move’s ID: Identity is 0.
{ "Code": 1, "Info": "", "RetInfo": null, "RowsAffected": 1, "Scalar": null, "Identity": 0}- The move is recorded as carried out when TrakIT receives the request.
- The request you sent is kept on the new move’s Action Log tab, as API Payload - ExecuteMove.
- The move is handled like one recorded in TrakIT: your company’s actions for executed yard moves run, and when the move is linked to a work order, the workflow’s yard move triggers fill in its events.
- Each successful call records a new move, except an In-Stack move to the position the container is
already in. If a call timed out, check the container with
GetContainerPositionbefore you send it again.

