Customer links

Create a tracking link for one of your customers

Use this when an order is confirmed or a delivery note is printed, to get a tracking link carrying the customer's own order number. It is idempotent by customer_reference: if the shipment already has an active link for the same reference (compared after trimming and collapsing spaces, case-sensitive) that link is returned with a 200 and left unchanged (the label is not updated, even if the retry sends a different or too long one), so a retry never makes a second one. A new link is a 201. Needs the write scope. Refused with not_shareable (400) unless the organization has public tracking pages switched on and the shipment is live and shared publicly. Recorded in the audit log as made through the API.

post/shipments/{shipment_id}/share_links

Request

  • Base URL: https://trackberry.com/api/v1
  • URL: https://trackberry.com/api/v1/shipments/{shipment_id}/share_links
  • Auth: HTTP bearer

Path parameters

shipment_idstring required

The shipment id (shp_ prefix). An id from another organization, or with another prefix, is a 404.

Headers

Trackberry-Versionstring

The API version to build this response for, for example 2026-10-01. Optional: without it the organization's pinned version is used (and the organization is pinned to the latest version on its first request without the header). Applies to this request only. An unpublished version is a 400 with code invalid_version.

Request body

customer_referencestring required

The customer's own reference for this order, such as a purchase order or sales order number. Shown to the customer on the tracking page.

labelstring

A note to tell your links apart. Only your team sees it; the customer never does.

Response

The shipment already had an active link for this customer_reference; it is returned unchanged.

object'share_link' required

Always share_link.

idstring required

The customer link id.

shipment_idstring required

The shipment the link opens.

customer_referencestring required

The customer's own reference for the order, as shown to the customer.

labelstring nullable required

Your own note to tell links apart. Never shown to the customer. Null when none was given.

urlstring nullable required

The link to give the customer. The secret part of the link is only ever inside this URL. Null once the link is revoked.

activeboolean required

False once the link has been revoked.

revoked_atstring date-time nullable required

When the link was revoked. Null while it is active.

created_atstring date-time required

When the link was created.

Changes

No recorded changes to this operation across all 1 revision of this API.