Getting Data Out

Building an ERP Integration

For ERP vendors and integrators. Read confirmed shipments from the Trackberry API, import them into the ERP, and report the result back.

31 min read

Published

Goal

This page is for the developers at an ERP vendor, or an integrator, who connect a customer’s ERP to Trackberry. It assumes you know HTTP and JSON, and nothing about Trackberry or fresh produce.

Trackberry reads the shipping documents a fruit and vegetable importer receives: packing lists, invoices, bills of lading. It turns them into structured shipments, checks them, and tracks the containers. Your integration reads those shipments from the Trackberry API and creates the matching records in the ERP, such as a purchase receipt or a goods-in record, so nobody types a packing list in by hand.

If you are the importer and want to know what an integration is and how to ask for one, read Exporting Data & ERP Integration instead.

What the integration does

A person at the importer checks a shipment in Trackberry until it is Ready for ERP: its documents are read, the checks the customer marked as blocking pass and, if the customer wants it, an admin has confirmed the figures (see Document Checks). Your integration then reads its header and its lines, creates its record in the ERP, and tells Trackberry it did. If the ERP refuses the shipment, the integration reports why, line by line, and people fix it in Trackberry. After the import, Trackberry keeps offering the shipment when it changes: first new dates and ports while the ship sails, then corrected figures if a document is fixed.

How a shipment moves between Trackberry and the ERPThe integration lists the shipments that are ready, reads the header and the lines, creates the ERP record and records the import, or reports a failed import that people fix in Trackberry. After the import, Trackberry offers the shipment again when its dates, ports or figures change.Go to the section about this call: List shipments by ERP statusGET /shipments?erp_status=readyGo to the section about this call: Read the shipment headerGET /shipments/{id}Go to the section about this call: Read the linesGET /shipments/{id}/erp_consignmentGo to the section about this call: Record the importPOST /shipments/{id}/erp_exportGo to the section about this call: Report a failed importPOST /shipments/{id}/erp_import_failedGo to the section about this call: List shipments by ERP statusGET /shipments?erp_status=exportedGo to the section about this call: List shipments by ERP statusGET /shipments?erp_status=changed_since_exportGo to the section about this call: Read the linesGET /shipments/{id}/erp_consignmentGo to the section about this call: Record the importPOST /shipments/{id}/erp_export
Diagram as text
sequenceDiagram
    accTitle: How a shipment moves between Trackberry and the ERP
    accDescr: The integration lists the shipments that are ready, reads the header and the lines, creates the ERP record and records the import, or reports a failed import that people fix in Trackberry. After the import, Trackberry offers the shipment again when its dates, ports or figures change.
    participant T as Trackberry
    participant I as Your integration / ERP
    Note over T: Shipment checked, Ready for ERP<br/>erp_status = ready
    I->>T: GET /shipments?erp_status=ready
    I->>T: GET /shipments/{id}
    I->>T: GET /shipments/{id}/erp_consignment
    T-->>I: lines and figures_version
    Note over I: Keep the figures_version<br/>The ERP creates its record
    alt The ERP accepts it
        I->>T: POST /shipments/{id}/erp_export<br/>with the figures_version you read
        Note over T: erp_status = exported
    else The ERP refuses it
        I->>T: POST /shipments/{id}/erp_import_failed
        Note over T: erp_status = erp_failed<br/>People fix the lines<br/>or press “Retry ERP import”<br/>erp_status = ready
        Note over I: Read and import again
    end
    Note over T,I: Later, after the import
    opt ETA, ETD or ports change
        Note over T: erp_status stays exported
        I->>T: GET /shipments?erp_status=exported
        Note over I: Update dates and ports
    end
    opt Figures are corrected
        Note over T: erp_status = changed_since_export
        I->>T: GET /shipments?<br/>erp_status=changed_since_export
        I->>T: GET /shipments/{id}/erp_consignment
        Note over I: Apply changes_since_export
        I->>T: POST /shipments/{id}/erp_export<br/>with the new figures_version
    end

Four produce terms appear throughout the data:

  • Box (colli): the unit the fruit is packed and sold in, for example a 4 kg carton of avocados. Quantities in the data are box counts.
  • Pallet: a stack of boxes with its own number. A mixed pallet carries boxes of more than one kind.
  • Calibre: the size grade of the fruit, such as 18 (fruits per box) or 70/75 (millimeters).
  • GGN: the GLOBALG.A.P. Number, a 13-digit code that identifies the certified producer.

Before you start

You need three things from the customer:

  • A token. Someone at the customer creates an API token under Organization settings → API & webhooks, with the access Read and write, and gives it to you. A read-only token can read everything below but not record an import or report a failure. A token belongs to one organization, so one customer is one token. While you build, ask for a token made in the customer’s ERP sandbox instead (see The ERP sandbox below).
  • The base URL and the rules of the API. Every call goes to https://trackberry.com/api/v1 with the header Authorization: Bearer tb_.... The API is versioned by date, and the customer’s organization is pinned to one version. Each token can make 600 requests every 5 minutes. All of this is in The Trackberry API, which this page does not repeat.
  • The settings agreed during onboarding. These differ from one customer to the next, and you agree them with the customer before you write code:
    • how the ERP numbers its articles: one level, or an article with sub-articles (see Article numbers below);
    • which buying company in the ERP a shipment belongs to, when the ERP holds several (some ERPs call it a mandant);
    • how Trackberry’s suppliers map to the ERP’s supplier numbers;
    • which warehouse the goods go to;
    • how the ERP marks a mixed pallet.

The full reference for every endpoint, parameter and field is the OpenAPI file at https://trackberry.com/api/v1/openapi.json. It needs no token. This page shows the calls in the order an integration makes them.

Polling or webhooks

You can ask Trackberry every few minutes what changed, or have Trackberry call you. Most integrations poll, and add webhooks only to react faster.

Poll when the ERP runs on a schedule, sits behind a firewall, or cannot receive HTTPS calls from the internet. Every few minutes, list the shipments that changed since your last call:

Three rules make polling safe:

  • Overlap the windows. Set updated_after to the time of your previous call minus 5 minutes. A shipment’s updated_at is stamped just before the change is saved, and clocks differ, so a window that starts exactly at your last call can miss a shipment.
  • Skip by updated_at, not by id. The overlap means a shipment can come back twice. Skip it only when its updated_at is the same as when you last processed it. Never skip a shipment just because you have seen its id: an imported shipment comes back as exported or changed_since_export each time it changes.
  • Expect repeats. updated_at moves on any write to the shipment, including the regular tracking updates, so an exported shipment comes back in most polls while it sails. Compare the fields you keep, such as the ETA, ETD, ports and vessel, and do nothing when they are the same.

Use webhooks when the ERP can receive HTTPS calls and you want to act within seconds. An admin at the customer adds your endpoint under Organization settings → API & webhooks. The events an ERP integration needs are:

Event What it means for you
shipment.confirmed The shipment is Ready for ERP: import it when review_status is ready. Also sent when an imported shipment is back to exported: after your own erp_export of a changed shipment, when its figures return to what you imported, or when a blocking check is accepted. Then there is nothing to do
shipment.confirmation_revoked The shipment went back to review in Trackberry. Before the import, leave it alone. After the import, its figures or checks changed
shipment.eta_changed The shipment’s own eta changed. Changes to effective_eta send nothing
shipment.erp_import_failed Your integration reported a failed import. Useful when several systems need to know

The two Ready for ERP events, shipment.confirmed and shipment.confirmation_revoked, are sent only when the customer uses the Ready for ERP gate: at least one check set to Block, or explicit sign-off by an admin. Ask the customer which they use. shipment.erp_import_failed is sent whatever the gate, except for a report that repeats the errors already open.

Webhooks can arrive twice or out of order, and an event is not sent for every change: an ETD or a port of discharge changing sends nothing. Treat a webhook as a reason to read the shipment again, and keep a poll running, for example every hour, to catch anything missed. Signatures, retries and the full payloads are in Webhooks.

curl
curl "https://trackberry.com/api/v1/shipments?erp_status=ready,exported,changed_since_export&updated_after=2026-12-04T08:55:00Z" \
  -H "Authorization: Bearer tb_your_token"
C#
using System.Net.Http.Headers;

using var client = new HttpClient();
using var request = new HttpRequestMessage(HttpMethod.Get, "https://trackberry.com/api/v1/shipments?erp_status=ready,exported,changed_since_export&updated_after=2026-12-04T08:55:00Z");
request.Headers.Authorization = new AuthenticationHeaderValue("Bearer", "tb_your_token");

using var response = await client.SendAsync(request);
response.EnsureSuccessStatusCode();
Console.WriteLine(await response.Content.ReadAsStringAsync());
Java
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;

public class Main {
    public static void main(String[] args) throws Exception {
        HttpRequest request = HttpRequest.newBuilder(URI.create("https://trackberry.com/api/v1/shipments?erp_status=ready,exported,changed_since_export&updated_after=2026-12-04T08:55:00Z"))
            .header("Authorization", "Bearer tb_your_token")
            .GET()
            .build();

        HttpResponse<String> response = HttpClient.newHttpClient()
            .send(request, HttpResponse.BodyHandlers.ofString());
        System.out.println(response.statusCode() + " " + response.body());
    }
}
Python
import requests

response = requests.get(
    "https://trackberry.com/api/v1/shipments",
    params={
        "erp_status": "ready,exported,changed_since_export",
        "updated_after": "2026-12-04T08:55:00Z",
    },
    headers={"Authorization": "Bearer tb_your_token"},
)
response.raise_for_status()
print(response.json())

The calls

List shipments by ERP status

GET /shipments with erp_status returns the shipments in those ERP states, newest first, 25 to a page (up to 100 with limit). Each item is the full shipment, the same as the next call.

erp_status Meaning What you do
ready Checked in Trackberry and waiting for the ERP Import it
exported Already imported. It comes back each time the shipment is written to, tracking updates included Update the dates and ports if they changed
changed_since_export Already imported, and its figures changed since Read the changes and apply them
needs_review People in Trackberry are still checking it Nothing. Don’t poll for it
erp_failed The ERP refused it and people are fixing it Nothing. It comes back as ready, or as changed_since_export if you had imported it before

Page with starting_after (the id of the last shipment you received) until has_more is false. The shipment object carries no ERP status field. erp_consignment, below, gives it as review_status.

Read the shipment header

GET /shipments/{id} returns one shipment. The fields an ERP usually needs:

The real response has more fields; this example shows only some of them.

  • id is the Trackberry shipment id. Store it on the record you create in the ERP (see Error handling).
  • erp_reference is the ERP’s own reference, once you have sent one with erp_export. It can also hold a purchase order number that people typed in.
  • supplier and customer are companies, each with erp_code, the code the customer keeps for it in the ERP. Use it for the supplier number and the buying company, as agreed during onboarding.
  • A supplier can have several codes, for example one ERP record per currency. The supplier’s erp_code is the one that applies to this shipment: the code someone chose for it, or else the supplier’s default. erp_code_id and currency belong to that code. Trackberry never picks the code from the invoice currency. See Supplier codes below.
  • effective_eta is the best arrival estimate. eta is the one from the carrier or the documents. The API page explains how they differ.
  • updated_at is what you compare when you skip shipments you already processed.
json
{
  "object": "shipment",
  "id": "shp_812",
  "reference": "SHIP-20261120-K7QX",
  "erp_reference": null,
  "transport_reference": "MSCU1234567",
  "transport_type": "ocean",
  "status": "in_transit",
  "origin": { "location": "Callao", "country": "Peru", "timezone": "-05:00", "code": "PECLL" },
  "destination": { "location": "Rotterdam", "country": "Netherlands", "timezone": "+01:00", "code": "NLRTM" },
  "etd": "2026-11-20T18:00:00Z",
  "eta": "2026-12-15T06:00:00Z",
  "effective_eta": "2026-12-15T06:00:00Z",
  "supplier": { "id": "cmp_41", "name": "Agro Andes SAC", "erp_code": "72605", "erp_code_id": "erc_8", "currency": "USD" },
  "customer": { "id": "cmp_57", "name": "Fresh Imports Ltd", "erp_code": "K-200" },
  "warehouse": { "id": "whs_3", "name": "Rotterdam cold store", "source": "manual", "automation": null },
  "cargo": { "pallets": 20, "boxes": 4000, "net_weight_kg": 16000.0, "gross_weight_kg": 17200.0 },
  "updated_at": "2026-12-04T09:02:11Z"
}

Read the lines

GET /shipments/{id}/erp_consignment returns the shipment’s packing list as flat lines: one line per kind of box on each pallet, with its pallet and container. It is not paged.

  • review_status is the shipment’s ERP status. Create the ERP record only when it is ready.
  • figures_version names the figures in this response. Keep it with the record you create, and send it back when you record the import. Don’t parse it: the same figures always give the same version, and any change gives another.
  • packing_line_id (prefix pln_) identifies the line. Keep it: you send it back when you report an error about the line.
  • article_code and sub_article_code say which article of the customer’s catalogue the line is. They are null when Trackberry does not know. See Article numbers below.
  • produce_name, variety, calibre, quality_category (the grade, such as Class I), pack_format (the box: its weight or its contents) and brand describe the fruit as the packing list does.
  • box_count is the boxes of this line. pallet_box_count is the boxes on the whole pallet. When the two differ, the pallet is a mixed pallet. Both lines above sit on pallet 000123, so it is mixed: 120 boxes of Hass and 80 of Fuerte make its 200.
  • Weights are always kilograms.
  • changes_since_export, exported_at and import_errors are explained in the sections below.
json
{
  "object": "erp_consignment",
  "shipment_id": "shp_812",
  "erp_reference": null,
  "review_status": "ready",
  "exported_at": null,
  "figures_version": "9f2c4e1a7b3d5f6e8a0c2b4d6f8e1a3c5b7d9f0e2a4c6b8d0f1e3a5c7b9d2f4e",
  "transport_reference": "MSCU1234567",
  "origin_country": "Peru",
  "changes_since_export": [],
  "import_errors": [],
  "lines": [
    {
      "pallet_id": "plt_9001",
      "pallet_number": "000123",
      "container_id": "ctr_1301",
      "container_number": "MSCU1234567",
      "packing_line_id": "pln_70001",
      "article_code": "12030",
      "sub_article_code": "18",
      "article_description": "Avocado Hass 18, 4 kg, Peru",
      "produce_name": "avocado",
      "variety": "Hass",
      "calibre": "18",
      "quality_category": "Class I",
      "pack_format": "4 kg",
      "brand": "Andes",
      "ggn": "4049928000000",
      "box_count": 120,
      "pallet_box_count": 200,
      "origin_country": "Peru",
      "net_weight_kg": 480.0,
      "gross_weight_kg": 516.0,
      "import_errors": []
    },
    {
      "pallet_id": "plt_9001",
      "pallet_number": "000123",
      "container_id": "ctr_1301",
      "container_number": "MSCU1234567",
      "packing_line_id": "pln_70002",
      "article_code": null,
      "sub_article_code": null,
      "article_description": null,
      "produce_name": "avocado",
      "variety": "Fuerte",
      "calibre": "20",
      "quality_category": null,
      "pack_format": "4 kg",
      "brand": "Andes",
      "ggn": "4049928000000",
      "box_count": 80,
      "pallet_box_count": 200,
      "origin_country": "Peru",
      "net_weight_kg": 320.0,
      "gross_weight_kg": 344.0,
      "import_errors": []
    }
  ]
}

Grouped lines

Some ERPs book “12 pallets of this article” rather than each pallet. For them, the grouped view gives one line per group of identical pallet lines, with a pallet count. The customer’s admin switches it on in Trackberry’s settings (Product catalogue, ERP consignment lines), and grouping in the response says which view you got: pallet_lines or grouped. You can also ask for a view in the request, whatever the setting:

Name the view your code parses, and a change to the setting cannot break your integration. A grouped line looks like this:

(The two lists are cut short here: a group of 12 pallets lists all 12.)

  • Lines are in one group when everything the ERP reads about them is the same: container, article_code and sub_article_code, produce, variety, calibre, grade, pack, brand, GGN, organic status and origin. Lines with other ERP article numbers are never grouped together. An attribute Trackberry adds to the lines later also splits groups.
  • pallet_box_count is the boxes of the group on each of its pallets, the same on every one, and box_count is always pallet_count times pallet_box_count. Pallets of the same goods that hold a different number of boxes are separate groups: 10 pallets of 200 boxes and 2 of 160 are two lines.
  • A mixed pallet counts as one pallet in each group it has boxes in, with its share of the boxes. The pallet 000123 above, with 120 boxes of Hass and 80 of Fuerte, is one pallet of 120 in a Hass group and one pallet of 80 in a Fuerte group. Adding up pallet_count over the groups can therefore give more than the shipment’s pallets.
  • net_weight_kg and gross_weight_kg are the group’s lines added up, and null when one of its lines has no weight.
  • group_id comes from the group’s content: the same goods with the same boxes per pallet keep the same id on every read, and a pallet added or removed changes the counts, not the id. Another calibre or another number of boxes per pallet is another group, with another id.
  • changes_since_export is the same in both views: it is about the pallet lines, which is what Trackberry tracks. Switching the setting never makes an exported shipment read as changed.
curl
curl "https://trackberry.com/api/v1/shipments/shp_812/erp_consignment?grouping=grouped" \
  -H "Authorization: Bearer tb_your_token"
C#
using System.Net.Http.Headers;

using var client = new HttpClient();
using var request = new HttpRequestMessage(HttpMethod.Get, "https://trackberry.com/api/v1/shipments/shp_812/erp_consignment?grouping=grouped");
request.Headers.Authorization = new AuthenticationHeaderValue("Bearer", "tb_your_token");

using var response = await client.SendAsync(request);
response.EnsureSuccessStatusCode();
Console.WriteLine(await response.Content.ReadAsStringAsync());
Java
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;

public class Main {
    public static void main(String[] args) throws Exception {
        HttpRequest request = HttpRequest.newBuilder(URI.create("https://trackberry.com/api/v1/shipments/shp_812/erp_consignment?grouping=grouped"))
            .header("Authorization", "Bearer tb_your_token")
            .GET()
            .build();

        HttpResponse<String> response = HttpClient.newHttpClient()
            .send(request, HttpResponse.BodyHandlers.ofString());
        System.out.println(response.statusCode() + " " + response.body());
    }
}
Python
import requests

response = requests.get(
    "https://trackberry.com/api/v1/shipments/shp_812/erp_consignment",
    params={"grouping": "grouped"},
    headers={"Authorization": "Bearer tb_your_token"},
)
response.raise_for_status()
print(response.json())
json
{
  "group_id": "grp_5f0c1d2e3a4b5c6d7e8f",
  "container_id": "ctr_1301",
  "container_number": "MSCU1234567",
  "article_code": "12030",
  "sub_article_code": "18",
  "article_description": "Avocado Hass 18, 4 kg, Peru",
  "produce_name": "avocado",
  "variety": "Hass",
  "calibre": "18",
  "quality_category": "Class I",
  "pack_format": "4 kg",
  "brand": "Andes",
  "ggn": "4049928000000",
  "organic": false,
  "origin_country": "PE",
  "origin_country_name": "Peru",
  "pallet_count": 12,
  "pallet_box_count": 200,
  "box_count": 2400,
  "net_weight_kg": 9600.0,
  "gross_weight_kg": 10320.0,
  "pallet_ids": ["plt_9001", "plt_9002"],
  "packing_line_ids": ["pln_70001", "pln_70003"],
  "import_errors": []
}

Record the import

When the ERP has created its record, call POST /shipments/{id}/erp_export with the figures_version of the erp_consignment you imported. Send the ERP’s own reference as erp_reference if you want Trackberry to keep it. People search by it, and it shows on the shipment page.

The shipment becomes exported, and its history in Trackberry shows the export as “API (ERP integration)”.

figures_version tells Trackberry which figures the ERP holds. A person may correct a document in Trackberry between your read and this call. The import is then still recorded, since the ERP has its record, but with the figures you read: the answer’s review_status is changed_since_export, and erp_consignment lists the correction in changes_since_export. Apply it as in Changes after import, below.

  • figures_version is required. Without it the call is refused with 400 figures_version_required.
  • A version Trackberry does not know is refused with 400 unknown_figures_version, and nothing is recorded: one that erp_consignment never gave for this shipment, or last gave more than 30 days ago. Read the consignment again, bring the ERP record in line with it, and send the new version.

  • It is safe to retry. Calling it again with the same figures_version, without erp_reference or with the same one, changes nothing and gives the same answer. A different erp_reference replaces the stored one.

  • It is refused with 400 erp_not_ready when the shipment still needs review in Trackberry, for example because a check failed or an admin has not confirmed its figures. The message says what holds it back. Leave the shipment alone: it comes back in your poll once it is ready.

  • Leave out erp_reference to keep the reference the shipment has. null clears it.

  • Only this call marks a shipment exported. Editing it with PATCH /shipments/{id} never does. Unlike the file downloads in the app, it does not need a packing list or invoice lines first.

curl
curl -X POST "https://trackberry.com/api/v1/shipments/shp_812/erp_export" \
  -H "Authorization: Bearer tb_your_token" \
  -H "Content-Type: application/json" \
  -d '{"figures_version": "9f2c4e1a7b3d5f6e8a0c2b4d6f8e1a3c5b7d9f0e2a4c6b8d0f1e3a5c7b9d2f4e", "erp_reference": "WE-2026-04417"}'
C#
using System.Net.Http.Headers;
using System.Net.Http.Json;

using var client = new HttpClient();
using var request = new HttpRequestMessage(HttpMethod.Post, "https://trackberry.com/api/v1/shipments/shp_812/erp_export");
request.Headers.Authorization = new AuthenticationHeaderValue("Bearer", "tb_your_token");
request.Content = JsonContent.Create(new
{
    figures_version = "9f2c4e1a7b3d5f6e8a0c2b4d6f8e1a3c5b7d9f0e2a4c6b8d0f1e3a5c7b9d2f4e",
    erp_reference = "WE-2026-04417"
});

using var response = await client.SendAsync(request);
response.EnsureSuccessStatusCode();
Console.WriteLine(await response.Content.ReadAsStringAsync());
Java
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;

public class Main {
    public static void main(String[] args) throws Exception {
        String json = "{"
            + "\"figures_version\": \"9f2c4e1a7b3d5f6e8a0c2b4d6f8e1a3c5b7d9f0e2a4c6b8d0f1e3a5c7b9d2f4e\", "
            + "\"erp_reference\": \"WE-2026-04417\""
            + "}";

        HttpRequest request = HttpRequest.newBuilder(URI.create("https://trackberry.com/api/v1/shipments/shp_812/erp_export"))
            .header("Authorization", "Bearer tb_your_token")
            .header("Content-Type", "application/json")
            .POST(HttpRequest.BodyPublishers.ofString(json))
            .build();

        HttpResponse<String> response = HttpClient.newHttpClient()
            .send(request, HttpResponse.BodyHandlers.ofString());
        System.out.println(response.statusCode() + " " + response.body());
    }
}
Python
import requests

response = requests.post(
    "https://trackberry.com/api/v1/shipments/shp_812/erp_export",
    headers={"Authorization": "Bearer tb_your_token"},
    json={
        "figures_version": "9f2c4e1a7b3d5f6e8a0c2b4d6f8e1a3c5b7d9f0e2a4c6b8d0f1e3a5c7b9d2f4e",
        "erp_reference": "WE-2026-04417",
    },
)
response.raise_for_status()
print(response.json())
json
{
  "object": "erp_export",
  "shipment_id": "shp_812",
  "erp_reference": "WE-2026-04417",
  "exported_at": "2026-12-04T09:05:40Z",
  "review_status": "exported"
}

Report a failed import

When the ERP refuses a shipment, call POST /shipments/{id}/erp_import_failed with every error of the attempt in one call. The shipment becomes erp_failed and leaves your poll, and people see the errors in Trackberry. The format of the errors and the codes are in Error handling, below.

Read the history of failed imports

GET /shipments/{id}/erp_import_reports lists every report your integration sent for a shipment, newest first, with what became of each error. It is paged like the other lists, with limit and starting_after. An error that is still open has resolved_at and resolution set to null. The resolution says how it went away: line_changed (a person corrected the line), catalogue_updated (the catalogue now gives the line other article numbers), retried, superseded (a newer report replaced it), imported, line_removed or shipment_changed. Nothing is ever removed from this history, so look here when a shipment you reported comes back as ready and you want to know why.

Retry a failed import

When the cause of a failed import was fixed in the ERP itself, for example a missing supplier account was created, call POST /shipments/{id}/erp_import_retry. It does what the Retry ERP import button does in Trackberry: every open error is closed as retried, and the shipment’s status is worked out again.

next_step tells the ERP what to do now:

next_step When What you do
import The shipment is ready Import it again
update It is changed_since_export: the ERP already has it Read erp_consignment again and apply the changes. With explicit sign-off, an admin may have to confirm the new figures before erp_export accepts them
none It is exported as the ERP has it Nothing
wait A check still fails (listed in blockers), an admin’s confirmation is due (needs_confirmation), or a new failure was reported meanwhile Nothing. It comes back in your poll

Nothing checks that the cause is really gone, so the ERP may refuse the shipment again. With no error open, the call changes nothing and retried is false.

json
{
  "object": "erp_import_retry",
  "shipment_id": "shp_812",
  "retried": true,
  "errors_resolved": 2,
  "review_status": "ready",
  "ready": true,
  "next_step": "import",
  "blockers": [],
  "needs_confirmation": false
}

Changes after import

An imported shipment keeps changing in Trackberry. There are two kinds of change, and they need different handling.

Dates and ports change while the ship sails: the ETA, the ETD, the vessel, the ports. These changes leave the shipment exported, but its updated_at moves, so it comes back in a poll for exported. Compare the header from GET /shipments/{id} with what the ERP holds, and update the dates and ports when they differ. You don’t need to call erp_export again.

Figures change when a document is corrected: a box count, the produce, a variety, a calibre, a quality category, a pack format, a brand, a GGN, an invoice line, a header total such as the pallet count or a weight, a container number, the transport reference, the country of origin or the supplier’s ERP code. The shipment then becomes changed_since_export. erp_consignment lists each change in changes_since_export, with exported_at saying when you imported it:

Apply the change, or show it to a user in the ERP, then call erp_export again with the figures_version of the erp_consignment you applied. The shipment goes back to exported, and the next change is counted from then. Each later correction moves updated_at again, so it comes back in your poll even while the shipment stays changed_since_export. A line’s comment and other fields the ERP does not receive never make a shipment changed_since_export. The list is also empty when a shipment is changed_since_export only because a blocking check now fails, since no figure changed. A shipment exported or confirmed before Trackberry tracked pallet lines reports only header totals and invoice lines until it is exported or confirmed again. A new country of origin is listed as origin_country, with the ISO codes the ERP received and receives now (CL before, PE after, null for an origin that names no country). A new supplier ERP code is listed as supplier.erp_code. Each counts only for a shipment exported or confirmed since Trackberry started tracking it, and for an older one from its next export or confirmation.

If the customer signs every shipment off explicitly, changed figures need a new confirmation by an admin, and until then erp_export answers erp_not_ready.

After goods receipt in the ERP, the goods counted at the warehouse are the truth for stock. We recommend that dates, ports and references keep updating after that, but that changed figures do not overwrite booked quantities on their own. Show them to a user in the ERP and let that person decide. Agree the exact rule with the customer during onboarding.

json
{
  "review_status": "changed_since_export",
  "exported_at": "2026-12-04T09:05:40Z",
  "changes_since_export": [
    { "field": "pallet_lines.MSCU1234567/000123.1.box_count", "before": 80, "after": 78 }
  ]
}

Supplier codes

Some ERPs keep one record per supplier and currency, so one supplier has two numbers, such as 72604 for euros and 72605 for dollars. A company in Trackberry has a list of codes, erp_codes, each with an optional label, an optional ISO 4217 currency and a default flag. Exactly one code is the default.

  • GET /companies?erp_code=72605 finds the company by any of its codes. A code belongs to one company only.
  • POST /companies and PATCH /companies/{id} take erp_codes. The list replaces the whole set: send every code each time. A code you send again keeps its id, and a code you leave out is deleted.
  • erp_code still works on its own. It reads and writes the default code.
  • PATCH /shipments/{id} with supplier_erp_code (or supplier_erp_code_id) chooses which of the supplier’s codes the shipment goes with. Null goes back to the default. Only the supplier has this choice: the forwarder and the customer always come with their default code.

If someone changes the supplier, or deletes the chosen code, the choice is cleared and the default applies. A different code on a shipment you already imported is a change since export (supplier.erp_code in changes_since_export).

Article numbers

The ERP needs to know which of its articles each line is. Trackberry fills article_code and sub_article_code on each line of erp_consignment from the customer’s product catalogue in Trackberry. It never guesses: a line that matches no article, or two articles equally well, has null codes.

How a line gets its article

Where the codes come from is a setting the customer’s admin chooses in Trackberry (Organization settings, Product catalogue, ERP article codes). No API call changes it.

  • Confirmed invoice lines (invoice_lines, the default). A line takes the product of the shipment’s invoice line that a person confirmed to a product, matched on the same variety and calibre, and the same pack format when both have one. article_code is that product’s ERP article number, or its SKU when it has none. sub_article_code is its sub-article number, or null.
  • Product catalogue (catalogue). A line is matched to the products that carry an ERP article number and sub-article number, by five attributes: produce, variety, calibre, pack format and the shipment’s origin country. Case, spacing and the way a weight is written don’t matter, and the produce and the origin are recognized in any language. A product that leaves an attribute empty matches any value of it. When several products match, the most specific one wins. Two that each name something the other leaves out give no article.

When a line has no article, a user in Trackberry maps it to the right product once. Trackberry remembers that for every line with the same five attributes, on this shipment and on later ones. The same mapping is available through the API as POST /packing_lines/{id}/erp_article, and it needs the catalogue setting.

Keeping the product list in sync

With the catalogue setting, the products in Trackberry must match the articles in the ERP. There are two ways to keep them in step.

Through the products API, whenever an article changes in the ERP or on a schedule. It takes a “Read and write” token.

  1. Look the product up by its ERP numbers: GET /products?erp_article_number=12030&erp_sub_article_number=18&status=active. The answer is a list with that product, or an empty list. Without status=active the list can also hold a discontinued product with the same numbers. GET /products?sku=... finds a product by its SKU instead.
  2. Create it or change it. When nothing was found, POST /products. A SKU another product already has, discontinued or not, is a 400 product_exists whose message names that product. When the product was found, PATCH /products/{id} with what changed. Fields you leave out stay as they are, null clears one, and sending the values a product already has changes nothing, so resending the whole record is safe.
  3. Discontinue what the ERP retired with PATCH /products/{id} and {"discontinued": true}. The product keeps its history, and no line is matched to it any more. {"discontinued": false} brings it back.

The fields that matter are erp_article_number, erp_sub_article_number, produce, variety, calibre, pack_format and origin_country. When you send the two numbers, send all five attributes with them. Use null for an attribute the article really covers every value of, such as an article for every calibre. The response lists those in wildcard_attributes. Trackberry stores the produce as its English name and the origin as an ISO country code, whatever language you send them in, and the response shows what it stored. A value it cannot read is a 400 whose param names the field, and nothing is saved. A product with the two numbers and no produce matches no line.

The numbers drive matching only once the customer’s admin switches ERP article codes to the product catalogue. Until then they are stored, and every shipment keeps the articles of its confirmed invoice lines. The switch applies to every shipment the ERP reads, so load the catalogue first. Mapping a line by hand through the API is refused with catalogue_not_article_source until then.

These errors keep the catalogue unambiguous. Each is a 400, and nothing is saved:

code Cause
erp_number_incomplete One of the two ERP numbers is missing. Send both, or null for both
duplicate_erp_number Another active product already has this pair of numbers. The message names it
erp_attributes_incomplete The ERP numbers came without all five attributes. Send the missing ones, null where the article covers every value

With a file. If the ERP cannot call an API, it can export its articles and sub-articles as a CSV or Excel file. Trackberry’s team loads the file into the customer’s catalogue, and a later file updates it. Agree the columns with Trackberry during onboarding. A row of that file with the same two numbers as a product made through the API is the same product, whatever its SKU: the row updates it and replaces its five attributes with the file’s.

Products with ERP numbers belong to this sync. A catalogue file a user uploads on the Products page in Trackberry never discontinues one of them for being missing from the file. But a file that still lists a discontinued product’s SKU brings it back, unless another active product has its ERP numbers by then.

curl
curl -X POST "https://trackberry.com/api/v1/products" \
  -H "Authorization: Bearer tb_your_token" \
  -H "Content-Type: application/json" \
  -d '{"sku": "12030/18", "description": "Avocado Hass 18, 4 kg, Peru", "erp_article_number": "12030", "erp_sub_article_number": "18", "produce": "avocado", "variety": "Hass", "calibre": "18", "pack_format": "4 kg", "origin_country": "PE"}'
C#
using System.Net.Http.Headers;
using System.Net.Http.Json;

using var client = new HttpClient();
using var request = new HttpRequestMessage(HttpMethod.Post, "https://trackberry.com/api/v1/products");
request.Headers.Authorization = new AuthenticationHeaderValue("Bearer", "tb_your_token");
request.Content = JsonContent.Create(new
{
    sku = "12030/18",
    description = "Avocado Hass 18, 4 kg, Peru",
    erp_article_number = "12030",
    erp_sub_article_number = "18",
    produce = "avocado",
    variety = "Hass",
    calibre = "18",
    pack_format = "4 kg",
    origin_country = "PE"
});

using var response = await client.SendAsync(request);
response.EnsureSuccessStatusCode();
Console.WriteLine(await response.Content.ReadAsStringAsync());
Java
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;

public class Main {
    public static void main(String[] args) throws Exception {
        String json = "{"
            + "\"sku\": \"12030/18\", "
            + "\"description\": \"Avocado Hass 18, 4 kg, Peru\", "
            + "\"erp_article_number\": \"12030\", "
            + "\"erp_sub_article_number\": \"18\", "
            + "\"produce\": \"avocado\", "
            + "\"variety\": \"Hass\", "
            + "\"calibre\": \"18\", "
            + "\"pack_format\": \"4 kg\", "
            + "\"origin_country\": \"PE\""
            + "}";

        HttpRequest request = HttpRequest.newBuilder(URI.create("https://trackberry.com/api/v1/products"))
            .header("Authorization", "Bearer tb_your_token")
            .header("Content-Type", "application/json")
            .POST(HttpRequest.BodyPublishers.ofString(json))
            .build();

        HttpResponse<String> response = HttpClient.newHttpClient()
            .send(request, HttpResponse.BodyHandlers.ofString());
        System.out.println(response.statusCode() + " " + response.body());
    }
}
Python
import requests

response = requests.post(
    "https://trackberry.com/api/v1/products",
    headers={"Authorization": "Bearer tb_your_token"},
    json={
        "sku": "12030/18",
        "description": "Avocado Hass 18, 4 kg, Peru",
        "erp_article_number": "12030",
        "erp_sub_article_number": "18",
        "produce": "avocado",
        "variety": "Hass",
        "calibre": "18",
        "pack_format": "4 kg",
        "origin_country": "PE",
    },
)
response.raise_for_status()
print(response.json())

Article errors clear by themselves

When the ERP refused lines as unknown_article or unknown_sub_article, and the catalogue in Trackberry later gains or changes a product that gives those lines other article numbers, the errors close by themselves. Once no other error is open, the shipment comes back to your poll with the new codes, as ready, or as changed_since_export if you had imported it before. This works only with the catalogue setting. A line that would get the same numbers the ERP refused stays open, since the ERP would refuse it again.

Error handling

The error format

Every error the API returns has one shape:

Branch on code, a stable machine-readable reason. message is an English sentence for people: show it, don’t parse it. param names the parameter or field at fault, when there is one. The full list of codes is on The Trackberry API page.

json
{ "error": { "type": "invalid_request_error", "code": "erp_not_ready", "message": "This shipment is not ready for the ERP: ...", "param": null } }

Never create a record twice

Before you create a record in the ERP, look for one that already carries the Trackberry shipment id (shp_...), and store that id on every record you create, with the figures_version you read. If your integration stops between creating the record and calling erp_export, the next run finds the record and only calls erp_export, with that stored version. Without this check, the shipment would be imported twice.

Import a shipment whole or not at all. If one line fails, create nothing, and report every error of the attempt.

Reporting a failed import

Send all errors of one attempt in one call, 1 to 500 of them. Each error has:

  • code: one of unknown_article, unknown_sub_article, unknown_supplier, unknown_company (the ERP cannot tell which of its buying companies the shipment is for), invalid_value or other;
  • message: the error in the ERP’s own words, up to 500 characters. People read it as it is, so write it for them;
  • packing_line_id: the line the error is about, from erp_consignment. Leave it out for an error about the whole shipment, such as an unknown supplier;
  • or, if you read the grouped view, group_id instead of packing_line_id: the error is recorded on every line of the group. A packing_line_id from a group’s packing_line_ids works too, and puts the error on that line alone; the group shows it either way;
  • article_code and sub_article_code (optional, strings or null): the codes the ERP received for that line. Send them with unknown_article and unknown_sub_article, so Trackberry knows which codes were refused, even if the catalogue changed after you read the line.

The answer, 201, is the report, with its id (eir_...), and each error with its own id (eie_...). A new report replaces the errors still open from the one before, so always send the full list: an error you leave out is taken as fixed. A report that repeats exactly the errors already open is kept, but marked repeated, and nobody is notified again.

You can also report an update the ERP could not apply, for a shipment that is changed_since_export. The call is refused with a 400, and nothing is recorded, when the shipment is exported (already_exported), a code is not in the list (invalid_code), or a packing_line_id is not a line of this shipment (invalid_packing_line). param names the entry, such as errors[1].code. A group_id that is no longer a group of the shipment, because its figures changed since you read them, is refused too (invalid_group): read erp_consignment again and report against what it says now. Article codes count among those figures, so a line mapped to an article in the meantime moves to another group. Each line of a group counts as one error against the limit of 500 per call.

While errors are open, erp_consignment carries them too. Each line’s import_errors lists the open errors about that line (in the grouped view, about any line of the group), and the top-level import_errors lists those about the whole shipment, plus any whose line is no longer on the shipment. They have the same shape as the errors in erp_import_reports.

curl
curl -X POST "https://trackberry.com/api/v1/shipments/shp_812/erp_import_failed" \
  -H "Authorization: Bearer tb_your_token" \
  -H "Content-Type: application/json" \
  -d @report.json
C#
using System.Net.Http.Headers;

using var client = new HttpClient();
using var request = new HttpRequestMessage(HttpMethod.Post, "https://trackberry.com/api/v1/shipments/shp_812/erp_import_failed");
request.Headers.Authorization = new AuthenticationHeaderValue("Bearer", "tb_your_token");
request.Content = new StreamContent(File.OpenRead("report.json"));
request.Content.Headers.ContentType = new MediaTypeHeaderValue("application/json");

using var response = await client.SendAsync(request);
response.EnsureSuccessStatusCode();
Console.WriteLine(await response.Content.ReadAsStringAsync());
Java
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
import java.nio.file.Path;

public class Main {
    public static void main(String[] args) throws Exception {
        HttpRequest request = HttpRequest.newBuilder(URI.create("https://trackberry.com/api/v1/shipments/shp_812/erp_import_failed"))
            .header("Authorization", "Bearer tb_your_token")
            .header("Content-Type", "application/json")
            .POST(HttpRequest.BodyPublishers.ofFile(Path.of("report.json")))
            .build();

        HttpResponse<String> response = HttpClient.newHttpClient()
            .send(request, HttpResponse.BodyHandlers.ofString());
        System.out.println(response.statusCode() + " " + response.body());
    }
}
Python
import requests

with open("report.json", "rb") as body:
    response = requests.post(
        "https://trackberry.com/api/v1/shipments/shp_812/erp_import_failed",
        headers={
            "Authorization": "Bearer tb_your_token",
            "Content-Type": "application/json",
        },
        data=body,
    )
response.raise_for_status()
print(response.json())
json
{
  "errors": [
    {
      "code": "unknown_sub_article",
      "message": "No sub-article for avocado Fuerte 20, 4 kg",
      "packing_line_id": "pln_70002",
      "article_code": null,
      "sub_article_code": null
    },
    {
      "code": "unknown_supplier",
      "message": "Supplier 40213 has no USD account"
    }
  ]
}

What the customer sees, and how a retry works

On the shipment page in Trackberry, an ERP import panel says that the ERP could not import the shipment and when. Errors about the whole shipment are listed there with the ERP’s message. Under Lines the ERP refused, each line error names its pallet and line, with a Map article link for article errors. The packing table marks the same lines, so people see which rows to fix. Members are told in the app.

An error closes when people deal with it:

  • a line error closes when someone corrects that line. An article error closes when the line’s produce, variety, calibre or pack format changes, the shipment’s origin changes, or someone maps the line to an article;
  • an error about the whole shipment closes when someone edits who or what the shipment is: its references, parties, supplier, customer, forwarder, origin country, warehouse, load type or delivery place. Date and port changes don’t close it;
  • article errors also close when the catalogue changes, as described above;
  • Retry ERP import on the page, or erp_import_retry through the API, closes them all. People use it when the fix was made in the ERP.

When no error is left open, the shipment becomes ready again, or changed_since_export if you had imported it before, with a new updated_at, and your next poll picks it up. If a check now blocks it or a confirmation is due, it waits in needs_review first.

Status codes

Status What to do
400 erp_not_ready The shipment needs review in Trackberry. Skip it: it comes back in your poll when it is ready
400 unknown_figures_version Trackberry does not know the version you sent for this shipment. Read erp_consignment again, update the ERP record to match, and call erp_export with its version
Other 400 Your request is wrong. Read code and param, fix the call, and don’t retry it unchanged
401 The token was revoked or has expired. Stop calling and alert the customer. Retrying cannot fix it
403 The token cannot do this, for example a read-only token recording an import. Ask the customer for a “Read and write” token
404 The shipment does not exist in this organization. Check you use the token of the right customer
429 Too many requests. Wait the number of seconds in the Retry-After header, then continue
5xx, timeouts Retry with growing waits, for example after 1, 2, 4 and 8 minutes, then leave the shipment for the next poll

erp_export and erp_import_retry are safe to repeat. If an erp_import_failed call times out, send it again with the same full list of errors: a report that repeats the errors already open notifies nobody again.

The ERP sandbox

Build and test in the customer’s ERP sandbox, not on their real shipments. It is a separate organization in Trackberry, made for the customer, with sample shipments in the states this page describes. It starts from the customer’s own setup: their active sub-articles with their ERP article and sub-article numbers (up to 2,000), their suppliers that have ERP codes (up to 200) and their warehouses that are not archived, with their ERP codes. When it is created it takes their ERP settings too, such as the sign-off mode, the units and the export formats. Their grouping, mixed-pallet and default deal type settings (how pallet lines are grouped and told apart, and how mixed pallets are labelled) are copied again on every reset. So what you read there has the shape the customer’s ERP will read. Nothing in it is billed, tracked with a carrier, read by AI or emailed outside the customer’s team.

An admin at the customer creates the sandbox under Organization settings → API & webhooks, opens it, and creates your token inside it. That token works in the sandbox only, and only on the REST API, not the MCP server. GET /organization answers "sandbox": true with it. Webhook endpoints are added inside the sandbox too. Their events carry "livemode": false and a Trackberry-Sandbox: true header, so a receiver you share with the real integration can tell them apart. How the sandbox is made, reset and kept apart is in The Trackberry API.

Two settings in the sandbox are set this way, whatever the customer uses:

  • Article numbers come from the product catalogue (the catalogue setting in Article numbers above). This is set when the sandbox is created, and a reset leaves it as it is.
  • The ERP Article Numbers Present check is set to Block, so a line without article numbers holds its shipment in needs_review. The sandbox therefore uses the Ready for ERP gate, and sends shipment.confirmed and shipment.confirmation_revoked. Every reset sets the check back to Block.

The sample shipments

Every sample shipment has a reference that starts with SBX-, and GET /shipments?q=SBX-READY finds one by its reference. They are ocean shipments in transit, on containers that are never registered with a carrier.

Reference ERP status What it lets you test
SBX-READY ready A first import: read the header and the lines, create the record, then call erp_export. Its two lines are the same article, one organic and one conventional (organic is true on one and false on the other)
SBX-EXPORTED exported A shipment the ERP already has, with erp_reference ERP-SBX-1002. It comes back in a poll for exported with nothing new: compare it and do nothing
SBX-CHANGED changed_since_export A pallet line’s box count, corrected from 80 to 76 after the import (ERP-SBX-1003). Its weight follows, so changes_since_export lists the line’s box_count (80 → 76) and the shipment’s boxes (160 → 156) and net_weight (640 → 624 kg). Read changes_since_export, apply it, and call erp_export again with the new figures_version
SBX-FAILED erp_failed A failed import already reported: unknown_sub_article on a line and unknown_supplier on the whole shipment. Read them in import_errors and erp_import_reports, send a new report, or close them with erp_import_retry
SBX-NOT-READY needs_review A mango line that matches none of the articles, so it has no article numbers and the check holds the shipment back. erp_export answers 400 erp_not_ready
SBX-GROUPED ready Four identical pallet lines and a fifth that differs. ?grouping=grouped gives two lines, one of them with a pallet_count of 4, and ?grouping=pallet_lines gives five
SBX-MIXED ready A mixed pallet: pallet P001 holds two lines that the customer’s line attributes keep apart, next to pallet P002 with one line. The two lines are two sub-articles when the customer’s attributes tell them apart, otherwise one sub-article that differs in GGN, brand, class or organic status, whichever the customer chose. P001’s lines have mixed_pallet true and, when the customer labels mixed pallets, a mixed_pallet_label such as Mix 1. When nothing in the sample lines can differ in the chosen attributes, P001 holds a single line
SBX-USD ready A supplier with an ERP code per currency, and the shipment set to its USD code. The shipment’s supplier has that code as erp_code, with currency USD. When none of the customer’s suppliers has a USD code next to another code, the sandbox adds a supplier with SBX-72604 (EUR, the default) and SBX-72605 (USD)
SBX-CORRECTED-PL changed_since_export A packing list replaced after the import (ERP-SBX-1008): the supplier’s corrected list changes a GGN and a calibre. erp_consignment reads the new list only. Its pallets have new numbers, so changes_since_export lists the old list’s lines as removed and the new list’s as added

If the customer signs shipments off explicitly, so does the sandbox. The sample shipments that should be ready are confirmed when they are made, as an admin would confirm them, so they are ready as the table says. SBX-NOT-READY stays in needs_review, because a blocking check holds it and it cannot be confirmed.

When your tests have changed the sample shipments, ask the customer’s admin to choose Reset the sample data. The sandbox gets the same sample shipments again, with new shipment ids, and your token, your webhook endpoints and the go-live checklist’s ticks stay. The customer’s grouping, mixed-pallet and default deal type settings are copied again first, so SBX-GROUPED and SBX-MIXED follow them as they are that day. A reset sends webhook events for the sample shipments it makes, all with "livemode": false.

Test each case

Some cases take days to happen on a real shipment: a carrier moves the ETA, the supplier sends a corrected packing list after the import, someone at the customer maps a missing sub-article. In the sandbox you make them happen with POST /shipments/{id}/simulations. The change goes through the same code as the real one and sends the same webhooks, with "livemode": false. The types, their options and their limits are in Simulate an event.

To see Call On
shipment.eta_changed {"type": "eta_change"}, or with your own eta Any sample shipment, such as SBX-READY
A new departure date or port of discharge {"type": "etd_change"} or {"type": "port_change"}. Neither has an event of its own: the shipment comes back in your next updated_after poll Any sample shipment
shipment.erp_changed_since_export {"type": "packing_list_correction"}, or with your own packing_line_id, box_count, calibre and ggn. The shipment becomes changed_since_export, and changes_since_export lists the corrected figures SBX-EXPORTED, which the ERP already has
shipment.erp_ready {"type": "sub_article_mapping"}. The line gets its article numbers and the shipment becomes ready (under explicit sign-off, it waits for an admin’s confirmation instead) SBX-NOT-READY

The answer says what changed and the ERP status before and after, so you can check your integration’s reaction against it. Send an Idempotency-Key header if your test harness retries. A sandbox runs at most 120 simulations an hour.

The go-live checklist

The last step before going live is the customer’s Go-live checklist. Admins and owners see it under the sandbox section of API & webhooks, and GET /sandbox/checklist returns it to a token whose user is an admin or owner, the sandbox’s included. The integration is ready when both lists are complete.

The first list ticks itself as your integration calls the sandbox with its token. Each step is ticked the first time a call passes it with a 2xx answer:

Step How to tick it
listed_updated_after GET /shipments with updated_after
read_erp_consignment GET /shipments/{id}/erp_consignment, on SBX-READY for instance
confirmed_import POST /shipments/{id}/erp_export with the figures_version you read, on SBX-READY for instance
reported_import_error POST /shipments/{id}/erp_import_failed, on SBX-GROUPED for instance (not SBX-NOT-READY: an open import error would keep it erp_failed after the mapping simulation above)
handled_change_after_import Read the consignment of SBX-CHANGED again and call erp_export with its new figures_version
retried_after_rate_limit After a 429, make the same call again no sooner than its Retry-After says. The BI feeds are the quickest way to get one: a token may request at most 6 feeds a minute

The second list is the customer’s own setup, read from their organization each time:

  • article_numbers: every pallet line of the shipments their ERP takes next has an ERP article and sub-article number.
  • supplier_erp_codes: every supplier on their recent shipments has an ERP code.
  • article_number_check: the ERP Article Numbers Present check is on.
  • warehouse_erp_codes: every active warehouse has an ERP code.

The customer’s admins fix these in Trackberry; the checklist links each open item to the page where it is done. With the sandbox’s token you see the counts but not the names of the customer’s suppliers and warehouses.

A reset keeps the ticks. When a new integrator starts, or the integration is rebuilt, an admin chooses Start the checklist over to clear them.

Testing and help

The API has one address, https://trackberry.com/api/v1: the token decides whether a call reaches the sandbox or the customer’s real data. Build and test in the sandbox. Once you move to the customer’s real token, reads still change nothing, but erp_export and erp_import_failed change what the customer’s team sees, so agree with the customer which shipments you use for the first real imports. To test a webhook endpoint, an admin chooses Send test event on the endpoint’s page.

For questions about the API, or if the customer wants a different setup, email [email protected] with the customer’s name and what you are building.

Tags: erp integration api webhooks developers