Get Full Product Unit

Returns everything Sodtrack knows about one product unit, located either by its Sodtrack id or by its serial number.

GET/api/integration/product-unit

Request

cURL
curl -X GET "https://dev.integration.cl.sodtrack-shared.sodtrack.com/api/integration/product-unit" \
  -H "Authorization: Bearer $SODTRACK_TOKEN"

Base URL: https://dev.integration.cl.sodtrack-shared.sodtrack.com · other environments

Responses

Get Product Unit By Id
{
  "id": 83,
  "serialNumber": "SN-0001-A",
  "status": "in_use",
  "type": "product",
  "entryDate": "2026-08-09T00:19:48.979Z",
  "cost": null,
  "product": {
    "id": 990001,
    "name": "Water heater 80L",
    "sku": "WH-80L"
  },
  "lastMovement": {
    "id": 75,
    "createdDate": "2026-08-29T00:19:48.984Z",
    "fromLocationType": "warehouse",
    "fromId": "1",
    "fromName": "Central warehouse",
    "fromAddress": null,
    "toLocationType": "customer",
    "toId": "32841",
    "toName": "María González",
    "toAddress": {
      "id": 13,
      "formattedAddress": "Av. Corrientes 1234, Buenos Aires",
      "extraInfo": "Floor 3, Apt B"
    }
  },
  "firstWarehouse": {
    "id": 1,
    "name": "Central warehouse"
  },
  "acquisitions": [
    {
      "id": "73521",
      "reference": "ACQ-2026-0001",
      "acquisitionDate": "2026-08-09T03:00:00.000Z",
      "customer": {
        "id": 32841,
        "reference": "CUST-00123",
        "name": "María",
        "lastname": "González",
        "createdDate": "2026-08-31T20:23:12.693Z"
      }
    }
  ],
  "warranties": [
    {
      "id": "60511",
      "validityStartDate": "2026-08-09T03:00:00.000Z",
      "warranty": {
        "id": "990001",
        "name": "Base warranty 12 months",
        "externalReference": "W-BASE-12",
        "type": "BASE",
        "durationValue": 12,
        "durationMetric": {
          "id": 990003,
          "name": "Months"
        }
      }
    },
    {
      "id": "60512",
      "validityStartDate": "2027-08-09T03:00:00.000Z",
      "warranty": {
        "id": "990002",
        "name": "Extended warranty 24 months",
        "externalReference": "W-EXT-24",
        "type": "EXTENDED",
        "durationValue": 24,
        "durationMetric": {
          "id": 990003,
          "name": "Months"
        }
      }
    }
  ],
  "movements": [
    {
      "id": 75,
      "createdDate": "2026-08-29T00:19:48.984Z",
      "fromLocationType": "warehouse",
      "fromId": "1",
      "fromName": "Central warehouse",
      "fromAddress": null,
      "toLocationType": "customer",
      "toId": "32841",
      "toName": "María González",
      "toAddress": {
        "id": 13,
        "formattedAddress": "Av. Corrientes 1234, Buenos Aires",
        "extraInfo": "Floor 3, Apt B"
      }
    },
    {
      "id": 43,
      "createdDate": "2026-08-09T03:19:48.000Z",
      "fromLocationType": "warehouse",
      "fromId": "2",
      "fromName": "Regional warehouse",
      "fromAddress": null,
      "toLocationType": "warehouse",
      "toId": "1",
      "toName": "Central warehouse",
      "toAddress": null
    }
  ],
  "bookings": [
    {
      "id": 13,
      "reference": "BK-2026-0456",
      "status": "accepted",
      "scheduledDate": "2026-08-26T04:22:29.911Z",
      "quantity": 1,
      "totalDurationMinutes": 60,
      "doneDate": null,
      "createdDate": "2026-08-26T04:22:29.911Z",
      "customer": {
        "id": 32841,
        "reference": "CUST-00123"
      },
      "stakeholder": null,
      "service": {
        "id": 1,
        "name": "Water heater installation"
      },
      "variant": {
        "id": 1,
        "name": "Standard installation",
        "type": "execution",
        "skus": []
      },
      "category": {
        "id": 1,
        "name": "Installations"
      },
      "address": {
        "formattedAddress": "Av. Corrientes 1234, Buenos Aires",
        "coordinates": null
      },
      "originAddress": null,
      "saleChannel": null,
      "project": null,
      "lead": null,
      "provider": {
        "id": 19,
        "reference": null,
        "name": "Carlos",
        "lastname": "Muñoz",
        "email": "carlos.munoz@example.com",
        "phone": "+56972345678",
        "identificationNumber": null,
        "assignedTo": null
      },
      "bookingBundle": null,
      "price": 0,
      "cost": 0,
      "bookingAddOns": [],
      "products": [
        {
          "id": 5,
          "name": "Water heater 80L",
          "sku": "WH-80L",
          "productType": "product",
          "quantity": 1,
          "serialNumber": "SN-0001-A",
          "pricing": {
            "price": 39999,
            "cost": 25000,
            "currency": {
              "id": 3,
              "name": "MXN",
              "symbol": "$"
            }
          }
        }
      ],
      "incidents": [],
      "alerts": [],
      "notes": [],
      "dynamicFormSnapshotFields": []
    }
  ],
  "workOrders": [
    {
      "id": 990005,
      "createdDate": "2026-07-08T13:40:30.755Z",
      "service": {
        "id": 2,
        "name": "General inspection"
      },
      "provider": {
        "id": 9,
        "reference": "PROV-001",
        "name": "Ava",
        "lastname": "Provider",
        "email": "ava.provider@example.com",
        "phone": null,
        "identificationNumber": null,
        "assignedTo": null
      }
    }
  ]
}

Error responses for this endpoint follow the shared error reference.

Purpose

Returns everything Sodtrack knows about one product unit, located either by its Sodtrack id or by its serial number.

Send exactly one of the two identifiers. Use id when you hold the Sodtrack id (for example from the customer product units endpoint); use serialNumber when you only know the physical unit.

The response combines, in a single call:

  • The unit itself: serial number, status, type, parent product, the warehouse it entered through and the movement that brought it to its current location.
  • The acquisitions it belongs to and the customer of each one.
  • The warranties in force for the unit, base and extended.
  • Its full movement history, including origin and destination names and addresses.
  • The bookings (service history) in which the unit took part.
  • The work orders associated to the unit.

Authentication

HeaderRequiredDescription
x-api-keySodtrack inbound integration API key.

The endpoint is restricted to Sodtrack's private integration network. Requests from unauthorized origins are rejected.


Endpoint

GET /api/integration/product-unit


Field Definitions

📦 Unit identifier (query parameters)

Exactly one of the two must be sent.

FieldTypeRequiredDescription
idnumber✅ when serialNumber is absentSodtrack product unit id. Integer, minimum 1.
serialNumberstring✅ when id is absentSerial number of the unit. Leading and trailing spaces are ignored; otherwise matched exactly, case-sensitive. URL-encode it if it contains reserved characters.

No other parameter is accepted; any other query parameter is ignored.


Example Request

By Sodtrack id:

code
GET /api/integration/product-unit?id=83

By serial number:

code
GET /api/integration/product-unit?serialNumber=SN-0001-A

Response Example

json
{
  "id": 83,
  "serialNumber": "SN-0001-A",
  "status": "in_use",
  "type": "product",
  "entryDate": "2026-08-09T00:19:48.979Z",
  "cost": null,
  "product": {
    "id": 990001,
    "name": "Water heater 80L",
    "sku": "WH-80L"
  },
  "lastMovement": {
    "id": 75,
    "createdDate": "2026-08-29T00:19:48.984Z",
    "fromLocationType": "warehouse",
    "fromId": "1",
    "fromName": "Central warehouse",
    "fromAddress": null,
    "toLocationType": "customer",
    "toId": "32841",
    "toName": "María González",
    "toAddress": {
      "id": 13,
      "formattedAddress": "Av. Corrientes 1234, Buenos Aires",
      "extraInfo": "Floor 3, Apt B"
    }
  },
  "firstWarehouse": {
    "id": 1,
    "name": "Central warehouse"
  },
  "acquisitions": [
    {
      "id": "73521",
      "reference": "ACQ-2026-0001",
      "acquisitionDate": "2026-08-09T03:00:00.000Z",
      "customer": {
        "id": 32841,
        "reference": "CUST-00123",
        "name": "María",
        "lastname": "González",
        "createdDate": "2026-08-31T20:23:12.693Z"
      }
    }
  ],
  "warranties": [
    {
      "id": "60511",
      "validityStartDate": "2026-08-09T03:00:00.000Z",
      "warranty": {
        "id": "990001",
        "name": "Base warranty 12 months",
        "externalReference": "W-BASE-12",
        "type": "BASE",
        "durationValue": 12,
        "durationMetric": {
          "id": 990003,
          "name": "Months"
        }
      }
    },
    {
      "id": "60512",
      "validityStartDate": "2027-08-09T03:00:00.000Z",
      "warranty": {
        "id": "990002",
        "name": "Extended warranty 24 months",
        "externalReference": "W-EXT-24",
        "type": "EXTENDED",
        "durationValue": 24,
        "durationMetric": {
          "id": 990003,
          "name": "Months"
        }
      }
    }
  ],
  "movements": [
    {
      "id": 75,
      "createdDate": "2026-08-29T00:19:48.984Z",
      "fromLocationType": "warehouse",
      "fromId": "1",
      "fromName": "Central warehouse",
      "fromAddress": null,
      "toLocationType": "customer",
      "toId": "32841",
      "toName": "María González",
      "toAddress": {
        "id": 13,
        "formattedAddress": "Av. Corrientes 1234, Buenos Aires",
        "extraInfo": "Floor 3, Apt B"
      }
    },
    {
      "id": 43,
      "createdDate": "2026-08-09T03:19:48.000Z",
      "fromLocationType": "warehouse",
      "fromId": "2",
      "fromName": "Regional warehouse",
      "fromAddress": null,
      "toLocationType": "warehouse",
      "toId": "1",
      "toName": "Central warehouse",
      "toAddress": null
    }
  ],
  "bookings": [
    {
      "id": 13,
      "reference": "BK-2026-0456",
      "status": "accepted",
      "scheduledDate": "2026-08-26T04:22:29.911Z",
      "quantity": 1,
      "totalDurationMinutes": 60,
      "doneDate": null,
      "createdDate": "2026-08-26T04:22:29.911Z",
      "customer": {
        "id": 32841,
        "reference": "CUST-00123"
      },
      "stakeholder": null,
      "service": {
        "id": 1,
        "name": "Water heater installation"
      },
      "variant": {
        "id": 1,
        "name": "Standard installation",
        "type": "execution",
        "skus": []
      },
      "category": {
        "id": 1,
        "name": "Installations"
      },
      "address": {
        "formattedAddress": "Av. Corrientes 1234, Buenos Aires",
        "coordinates": null
      },
      "originAddress": null,
      "saleChannel": null,
      "project": null,
      "lead": null,
      "provider": {
        "id": 19,
        "reference": null,
        "name": "Carlos",
        "lastname": "Muñoz",
        "email": "carlos.munoz@example.com",
        "phone": "+56972345678",
        "identificationNumber": null,
        "assignedTo": null
      },
      "bookingBundle": null,
      "price": 0,
      "cost": 0,
      "bookingAddOns": [],
      "products": [
        {
          "id": 5,
          "name": "Water heater 80L",
          "sku": "WH-80L",
          "productType": "product",
          "quantity": 1,
          "serialNumber": "SN-0001-A",
          "pricing": {
            "price": 39999,
            "cost": 25000,
            "currency": {
              "id": 3,
              "name": "MXN",
              "symbol": "$"
            }
          }
        }
      ],
      "incidents": [],
      "alerts": [],
      "notes": [],
      "dynamicFormSnapshotFields": []
    }
  ],
  "workOrders": [
    {
      "id": 990005,
      "createdDate": "2026-07-08T13:40:30.755Z",
      "service": {
        "id": 2,
        "name": "General inspection"
      },
      "provider": {
        "id": 9,
        "reference": "PROV-001",
        "name": "Ava",
        "lastname": "Provider",
        "email": "ava.provider@example.com",
        "phone": null,
        "identificationNumber": null,
        "assignedTo": null
      }
    }
  ]
}

Response Fields

📦 Product unit
FieldTypeDescription
idnumberSodtrack product unit id.
serialNumber`stringnull`
statusstringOne of: "available", "not_available", "committed", "in_use", "potential_conflict", "movement_request".
typestring"product" or "component".
entryDate`string (datetime)null`
cost`numbernull`
productobjectParent product.
product.idnumberSodtrack product id.
product.namestringProduct name.
product.skustringProduct SKU.
lastMovement`objectnull`
firstWarehouse`objectnull`
firstWarehouse.idnumberSodtrack warehouse id.
firstWarehouse.namestringWarehouse name.
🧾 Acquisitions (acquisitions[])
FieldTypeDescription
acquisitions[].idstringSodtrack acquisition id.
acquisitions[].reference`stringnull`
acquisitions[].acquisitionDatestring (datetime)Acquisition date.
acquisitions[].customer`objectnull`
acquisitions[].customer.idnumberSodtrack customer id.
acquisitions[].customer.reference`stringnull`
acquisitions[].customer.name`stringnull`
acquisitions[].customer.lastname`stringnull`
acquisitions[].customer.createdDatestring (datetime)When the customer was created in Sodtrack.
🛡️ Warranties (warranties[])
FieldTypeDescription
warranties[].idstringId of the warranty in force for this unit.
warranties[].validityStartDate`string (datetime)null`
warranties[].warrantyobjectThe warranty definition.
warranties[].warranty.idstringSodtrack warranty id.
warranties[].warranty.namestringWarranty name.
warranties[].warranty.externalReference`stringnull`
warranties[].warranty.typestring"BASE" or "EXTENDED".
warranties[].warranty.durationValue`numbernull`
warranties[].warranty.durationMetric`objectnull`
warranties[].warranty.durationMetric.idnumberSodtrack metric id.
warranties[].warranty.durationMetric.namestringMetric name, for example months or usage hours.
🚚 Movements (movements[])
FieldTypeDescription
movements[].idnumberMovement id.
movements[].createdDate`string (datetime)null`
movements[].fromLocationType`stringnull`
movements[].fromId`stringnull`
movements[].fromName`stringnull`
movements[].fromAddress`objectnull`
movements[].toLocationTypestringDestination type: "warehouse", "customer" or "provider".
movements[].toIdstringId of the destination warehouse or customer, according to toLocationType.
movements[].toName`stringnull`
movements[].toAddress`objectnull`
movements[].toAddress.idnumberSodtrack address id.
movements[].toAddress.formattedAddressstringFull formatted address.
movements[].toAddress.extraInfo`stringnull`
🧩 Bookings (bookings[])

Each entry is a full Sodtrack booking, in the same shape returned by the booking endpoints of the integration API.

FieldTypeDescription
bookings[].idnumberSodtrack booking id.
bookings[].reference`stringnull`
bookings[].statusstringBooking status. One of: "created", "searching", "accepted", "on_my_way_to_origin", "arrived_to_origin", "on_my_way_to_destination", "arrived_to_destination", "left_destination", "done", "cancelled", "waiting_customer_to_set_date", "waiting_scheduling_mechanism", "waiting_assignment_mechanism", "waiting_provider_to_propose_date", "waiting_customer_to_accept_proposed_date".
bookings[].scheduledDate`string (datetime)null`
bookings[].quantitynumberQuantity booked.
bookings[].totalDurationMinutes`numbernull`
bookings[].doneDate`string (datetime)null`
bookings[].createdDatestring (datetime)When the booking was created.
bookings[].customer`objectnull`
bookings[].stakeholder`objectnull`
bookings[].service`objectnull`
bookings[].variant`objectnull`
bookings[].category`objectnull`
bookings[].address`objectnull`
bookings[].originAddress`objectnull`
bookings[].saleChannel`objectnull`
bookings[].project`objectnull`
bookings[].lead`objectnull`
bookings[].provider`objectnull`
bookings[].bookingBundle`objectnull`
bookings[].price`numbernull`
bookings[].cost`numbernull`
bookings[].bookingAddOns[]arrayAdd-ons: id, name, reference.
bookings[].products[]arrayProducts in the booking: id, name, sku, productType ("product" or "component"), quantity, serialNumber and pricing (price, cost, currency with id, name, symbol).
bookings[].incidents[]arrayIncidents: id and reference.
bookings[].alerts[]arrayAlerts: id and reference.
bookings[].notes[]arrayNotes: id, note, reference.
bookings[].dynamicFormSnapshotFields[]arrayDynamic form answers captured during the booking: id, reference, value, secondaryValue, type, snapshotId.
🛠️ Work orders (workOrders[])
FieldTypeDescription
workOrders[].idnumberSodtrack work order id.
workOrders[].createdDatestring (datetime)When the work order was created.
workOrders[].service`objectnull`
workOrders[].provider`objectnull`

Error Responses

HTTP StatusErrorDescription
400 Bad RequestProvide exactly one of \id` or `serialNumber``Neither identifier was sent, or both were.
400 Bad Requestid is not a positive integer, or serialNumber is empty.
401 UnauthorizedMissing or invalid x-api-key, or the request does not come from an authorized origin.
404 Not FoundPRODUCT_UNIT_NOT_FOUND: {identifier}No product unit exists with that id or serial number. The message echoes the identifier sent.
503 Service UnavailablePRODUCT_MODULE_UNAVAILABLESodtrack's product inventory service could not be reached. Retry later.
500 Internal Server ErrorUnexpected server error. Contact Sodtrack support.

Business Rules & Constraints

One identifier at a time

id and serialNumber are two ways of pointing at the same unit, not filters to combine. Sending both, or none, is rejected with 400 Bad Request before any lookup.

RequestBehavior
?id=83Returns the unit with id 83.
?serialNumber=SN-0001-AReturns the unit whose serial number is exactly SN-0001-A.
?id=83&serialNumber=SN-0001-A400 Bad Request.
no parameters400 Bad Request.

Serial number matching

Leading and trailing spaces are removed from serialNumber before matching; internal spaces and letter case must match the value registered in Sodtrack. Serial numbers are expected to be unique; if the same value were registered on more than one unit, the first registered one is returned.

Lists are complete

acquisitions, warranties, movements, bookings and workOrders are returned in full. There is no pagination on this endpoint. An empty array means the unit has no records of that kind.

Ordering of each list

ListOrder
movementsNewest first. The first entry is always lastMovement.
bookingsNewest first, by Sodtrack booking id.
workOrdersBy execution date, earliest first; work orders without an execution date come last. Ties by creation date.
acquisitionsNo guaranteed order.
warrantiesNo guaranteed order.

Only active acquisitions are returned

Acquisitions that were voided are not included in acquisitions, even if the unit was part of them.

Location names and addresses are resolved when possible

fromName, toName, fromAddress and toAddress in each movement are resolved from the warehouse or customer referenced by the movement. If that warehouse or customer no longer exists, the name or address comes back as null while the raw fromId / toId is still returned.

First warehouse

firstWarehouse is the destination of the earliest movement of the unit whose destination is a warehouse. A unit registered directly at a customer, with no warehouse in its history, returns null.

Bookings and work orders are matched by the unit

bookings contains the bookings in which this specific unit was part of the products serviced. workOrders contains the work orders explicitly associated to this unit. Bookings or work orders created for the parent product without naming a unit are not included.