Create a tracking for handling units with same document reference.

POST /track-document

Sample request:

POST /track-document

application/json

Body

Information of new tracking.

  • way string

    Customs indicators

    Values are Unknown, Import, Export, Transit, Transhipment, DomesticIn, DomesticOut, or DomesticTranshipment.

  • place string | null

    Event location.

    Maximum length is 20.

  • agentCode string | null

    Agent code.

    Maximum length is 64.

  • url string

    Webhook URL endpoint to receive tracking events' notifications.

    Minimum length is 1. Format should match the following pattern: ^(https?:\/\/)?([\da-z\.-]+)\.([a-z\.]{2,6})([\/\w \.-]*)*\/?$.

  • documentReference string Required

    Reference of the announcement document

    Minimum length is 1.

Responses

  • 201 application/json

    Created.

    API will return the functional ID of Tracking.

    Hide response attributes Show response attributes object
    • trackingId string | null

      Functional ID of the tracking

    • trackedHandlingUnits array[object] | null

      List tracked handling unit

      Tracked handling unit minimal information

      Hide trackedHandlingUnits attributes Show trackedHandlingUnits attributes object
      • spi string | null

        Handling unit SPI

      • reference string | null

        Handling unit reference

  • 400 application/json

    Bad Request

    Hide response attributes Show response attributes object
    • status string | null

      Error status.

    • timestamp string(date-time)

      Error timestamp.

    • code string | null

      Error code.

    • message string | null

      Error message.

    • subErrors array[object] | null

      Error details.

      Error message details.

      Hide subErrors attributes Show subErrors attributes object
      • section string | null

        Error object.

      • field string | null

        Error attribute.

      • rejectedValue string | null

        Rejection code.

      • message string | null

        Error message.

  • 401 application/json

    Unauthorized

    Hide response attributes Show response attributes object
    • status string | null

      Error status.

    • timestamp string(date-time)

      Error timestamp.

    • code string | null

      Error code.

    • message string | null

      Error message.

    • subErrors array[object] | null

      Error details.

      Error message details.

      Hide subErrors attributes Show subErrors attributes object
      • section string | null

        Error object.

      • field string | null

        Error attribute.

      • rejectedValue string | null

        Rejection code.

      • message string | null

        Error message.

POST /track-document
curl \
 --request POST 'https://soget-api-integration.azure-api.net/api-tracking-code-in-mass/v1/track-document' \
 --header "Content-Type: application/json" \
 --data '{"url":"https://my-webhook-endpoints.com","way":"Import","place":"MTDF","agentCode":"CCGM","documentReference":"3714238101"}'
Request example
{
  "url": "https://my-webhook-endpoints.com",
  "way": "Import",
  "place": "MTDF",
  "agentCode": "CCGM",
  "documentReference": "3714238101"
}
Response examples (201)
{
  "trackingId": "TRK0000000001",
  "trackedHandlingUnits": [
    {
      "spi": "CNI0000000001",
      "reference": "CGMU0000001"
    },
    {
      "spi": "CNI0000000002",
      "reference": "CGMU0000002"
    }
  ]
}
Response examples (400)
{
  "status": "string",
  "timestamp": "2025-05-04T09:42:00Z",
  "code": "string",
  "message": "string",
  "subErrors": [
    {
      "section": "string",
      "field": "string",
      "rejectedValue": "string",
      "message": "string"
    }
  ]
}
Response examples (401)
{
  "status": "string",
  "timestamp": "2025-05-04T09:42:00Z",
  "code": "string",
  "message": "string",
  "subErrors": [
    {
      "section": "string",
      "field": "string",
      "rejectedValue": "string",
      "message": "string"
    }
  ]
}