Updated: 2026-11-30

Inventory movements

A movement is one order line that moves stock: a lot of a SKU going in to or out of a location on an order. Purchase orders, sales orders, production, transforms, adjustments and the other order types all create movements.

Use GET /movements to read movements into another system, for example a BI tool, a data warehouse or a stock ledger in your ERP.

There are two ways to use it:

  • List movements: fetch a page of movements, newest first by default. You can narrow it by date, order, product, lot, location or quantity, which makes it useful for questions like “what moved out of this warehouse last week?” or for syncing changes since the last check.
  • Get one movement: fetch the details of a single movement.

Either way, you can also pull in related information, such as the order, product or lot, in the same request.

Prerequisites

Reference

Movements of a SKU in a period

Get every movement of one SKU that affects stock in November 2026.

Endpoint

1
GET /movements

Request parameters (query)

key value type description
sku[eq] be3233c4-c0a2-4f47-a62a-303492c20ba6 UUID Movements of this SKU. Use sku[in] with comma separated UUIDs for several SKUs
stock_movement_date[gte] 2026-11-01 date Movements that affect stock on or after this date
stock_movement_date[lte] 2026-11-30 date Movements that affect stock on or before this date
sortBy stock_movement_date string Sort by the date the movement affects stock
sortDirection asc string Oldest first
include lot,order,partner_location Comma separated strings Include the lot, order and location of each movement

Optionally narrow the result further:

key value type description
partner_location[eq] 47aeed88-c455-4907-bf81-347c70cd9b71 UUID Movements at this location. partner_location[in] takes comma separated UUIDs
order_type[in] sales,purchase Comma separated strings Movements on these order types: sales, purchase, warehouse, return, supplierreturn, production, transform, adjustment. order_type[ne] excludes one type
section[eq] outbound string inbound for stock going in, outbound for stock going out
lot[eq] c2417d56-4751-4a1e-8fb9-21223cc0a8a8 UUID Movements of one lot (batch). lot[in] takes comma separated UUIDs
order[eq] 9d1f4b2a-6c3e-4f8a-b7d5-2e0a1c9f3b64 UUID Movements on one order. order[in] takes comma separated UUIDs

Movements example curl request

1
2
3
4
curl -X 'GET' \
  'https://app.tracezilla.com/api/v1/example-company/movements?sku%5Beq%5D=be3233c4-c0a2-4f47-a62a-303492c20ba6&stock_movement_date%5Bgte%5D=2026-11-01&stock_movement_date%5Blte%5D=2026-11-30&sortBy=stock_movement_date&sortDirection=asc&include=lot%2Corder%2Cpartner_location' \
  -H 'accept: application/json' \
  -H 'Authorization: Bearer {yourBearerToken}'

GET /movements response sample:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
{
  "data": [
    {
      "id": "3f6a9c1e-8b2d-4e7f-a5c0-1d9e4b7a2c38",
      "section": "inbound",
      "sku_id": "be3233c4-c0a2-4f47-a62a-303492c20ba6",
      "lot_id": "c2417d56-4751-4a1e-8fb9-21223cc0a8a8",
      "order_id": "9d1f4b2a-6c3e-4f8a-b7d5-2e0a1c9f3b64",
      "partner_location_id": "47aeed88-c455-4907-bf81-347c70cd9b71",
      "stock_movement_date": "2026-11-03",
      "quantity": 1200,
      "quantity_expected": 1200,
      "quantity_floor": 1200,
      "quantity_dispatched": 1200,
      "quantity_delivered": 1200,
      "quantity_invoiced": 0,
      "unit": "kg",
      "traceable": true,
      "created_at": "2026-10-28T09:14:02Z",
      "updated_at": "2026-11-03T12:40:51Z",
      ...
    },
    ...
  ],
  "links": { ... },
  "meta": {
    "current_page": 1,
    "last_page": 3,
    "per_page": 25,
    "total": 61,
    ...
  }
}

Reading the response

  • section tells the direction: inbound adds stock to the location, outbound takes stock from it.
  • quantity is the quantity moved, in the unit of the order line. uom_conversion converts it to the unit of measurement of the SKU.
  • quantity_expected, quantity_floor, quantity_dispatched, quantity_delivered and quantity_invoiced show how far the movement has progressed. For outbound movements quantity_floor is the picked quantity. For inbound movements it is the quantity on the arrival space.
  • stock_movement_date is the date the movement affects stock levels. Filter on it for stock reports. created_at and updated_at are when the record was created and last changed.
  • traceable is false for lines that don’t move traceable stock. Add traceable[eq]=1 to leave them out.

Pagination

The response holds 25 movements per page by default. Set perPage up to 1000, and read the next pages with page=2, page=3 and so on until page is meta.last_page, or follow links.next until it is null.

Keep another system up to date

To copy movements into another system, poll GET /movements for movements changed since your last poll instead of reading everything every time.

  1. Store the time you start the poll.
  2. Request movements with updated_at[gt] set to the time you stored at the previous poll.
  3. Read all pages. Upsert each movement in your system by id.

Request parameters (query)

key value type description
updated_at[gt] 2026-11-29T06:00:00Z UTC date & time Movements created or changed after your previous poll
sortBy updated_at string Sort by when the movement was last changed
sortDirection asc string Oldest change first
perPage 1000 integer The maximum page size

Changed movements example curl request

1
2
3
4
curl -X 'GET' \
  'https://app.tracezilla.com/api/v1/example-company/movements?updated_at%5Bgt%5D=2026-11-29T06%3A00%3A00Z&sortBy=updated_at&sortDirection=asc&perPage=1000' \
  -H 'accept: application/json' \
  -H 'Authorization: Bearer {yourBearerToken}'

Notice a movement keeps changing while the order progresses, for example when it is picked, dispatched, delivered and invoiced. The same movement can come back on several polls. Upsert by id, don’t insert.

Get one movement

If you already have the id of a movement, for example from an earlier GET /movements, get it with GET /movements/{orderLotId}. The id of a movement is the id of the order lot.

Endpoint

Replace {orderLotId} including the curly brackets with the id of the movement

1
GET /movements/{orderLotId}

Request parameters (query)

key value type description
include sku,lot Comma separated strings Any of sku, lot, order and partner_location

One movement example curl request

1
2
3
4
curl -X 'GET' \
  'https://app.tracezilla.com/api/v1/example-company/movements/3f6a9c1e-8b2d-4e7f-a5c0-1d9e4b7a2c38?include=sku%2Clot' \
  -H 'accept: application/json' \
  -H 'Authorization: Bearer {yourBearerToken}'

The response holds the same fields as one movement in GET /movements.