Duplicate prevention

Why duplicates are allowed and what you can do to handle or prevent them

When using Vizion's Container Tracking API to create a reference, it's possible to create multiple references that are tracking the same container ID, bill of lading, or booking number. These are known as duplicates.

It's important to distinguish that each reference will have its own unique reference ID, but the details of that container will be the same values.

Here's an example of what creating duplicate references might look like:

Example A

Input:

{
  "container_id":"CAXU9928302",
  "carrier_code":"MSCU"
}

Output (truncated):

{
    "message": "Reference created successfully.",
    "reference": {
        "id": "7c732b69-cb1c-43b6-8747-70a59d309492",
        "container_id": "CAXU9928302",
        "bill_of_lading": null,
        "booking_number": null,
        "carrier_scac": "MSCU",
        ...

Example B

Input:

{
  "container_id":"CAXU9928302",
  "carrier_code":"MSCU"
}

Output (truncated):

{
    "message": "Reference created successfully.",
    "reference": {
        "id": "9506c503-fd84-4da0-86ec-cbd9a1601ea9",
        "container_id": "CAXU9928302",
        "bill_of_lading": null,
        "booking_number": null,
        "carrier_scac": "MSCU",
        ...

Notice that both input request bodies above are exactly the same, but the reference object in the output shows two unique ID numbers which are shown in bold.

This means that there are now two active references tracking container CAXU9928302 with MSCU.

Why duplicates are allowed

The Vizion API allows for duplicates in order to provide flexibility in terms of integration. For a user that does not wish to create duplicates, there exists another user who requires the ability to create duplicates.

If multiple users using the same integration wish to separately track the same container, the API does not block this action.

Prevent duplicates

If you would like to prevent duplicates and avoid unintentionally creating multiple references using the same data, please contact support. With duplicate preventation enabled, if you attempt to create a duplicate reference, you will see an error message like:

{"error":"Duplicate Reference. Unsubscribe cd76fc01-ba19-4b44-9f50-657b3a257e72 to proceed. If you believe this is an error, please contact support at [email protected]."}

Notes

A few important things to note about duplication prevention:

  • Each input field must be distinct to be considered a duplicate. All of the following input examples are considered unique:
    • TCLU1746543 (container ID)
    • TCLU1746543, MAEU (container ID and carrier code)
    • TCLU1746543, MAEU, 273843382 (container ID, carrier code, and bill of lading)
  • If the callback URL value is different from an existing reference when attempting to create a duplicate, the duplicate will be created in this instance to allow updates to be delivered to the provided URL.
  • Child references created when tracking via bill of lading are included in duplicate prevention
  • Duplicate prevention only considers active references
  • Creating references using Automatic Carrier Identification (ACI) by supplying only the container ID is not protected by duplicate prevention as the carrier code is required for prevention of all types. We recommend exercising caution when subscribing by ID alone to avoid duplication.