> ## Documentation Index
> Fetch the complete documentation index at: https://developers.perform.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Data Integration

> How shipment and order data enters Perform.AI by portal, file upload, SFTP, API, webhooks or Shopify, and how the shipment record comes back out.

**Available to all Platform customers.** Users with the Administrator or Parcel Creation role can create and edit shipments in the portal. API credentials are issued per account.

## Summary

Data Integration is how your shipment and order data reaches Perform.AI and how the tracked result comes back to your own systems: by portal, CSV file, SFTP, the Public API, incoming webhooks or a Shopify store. Whatever the way in, Perform.AI turns each carrier’s updates into normalized tracking data and keeps one shipment record, a single source of truth for shipments that your webhooks, API calls, portal exports and MCP assistant all read.

## Who it’s for

Operations, IT and integration teams who need multi-carrier tracking without building a pipeline per carrier, and who need the tracked result back in the warehouse system, helpdesk or order system where their colleagues work. The question it answers is “how do we get our data in, and how do we get it out again”.

## Key benefits

* **More than one way in.** Create shipments in the portal, upload a CSV, drop files on SFTP, call the tracking API, push data through incoming webhooks, or connect a Shopify store. The method is chosen per account, to fit your technical setup.
* **Standardised shipping events across carriers.** Each carrier’s raw update is mapped to a standard event and location, and the shipment’s status is recomputed from those events, so a delay means the same thing on every carrier you ship with.
* **One record comes back out.** Whatever the input method, you get the same shipment record with its standardised event history, through webhooks, the API, the portal and the MCP server.
* **Push, not poll.** Outgoing webhooks deliver a Shipment update when Perform.AI processes new events, one message per update cycle.
* **Mistakes are reported, not dropped.** Every CSV upload produces a processed file report that says, row by row, whether the shipment was accepted, rejected or accepted with warnings, and why.

## How it works

### Ways to send data in

| Method | What it does | How to start |
| - | - | - |
| Portal, single or multiple parcels | Create one parcel from a tracking number and carrier, with optional order ID, name and email, or enter or scan many tracking numbers at once. | **Shipment Overview** > **Add Parcels**. |
| Portal, file upload | Create shipments in bulk from a CSV file that follows the Create Shipment template. | **Shipment Overview** > **Add Parcels** > **File Upload**. |
| SFTP or FTP | You drop files into a folder Perform.AI provides; the files are pulled and processed on a schedule. Your own file format can be parsed and mapped to the standard schema. | Ask your account team to set up the folder and the parser. |
| Public API | Your systems create and update shipments and add events over HTTPS with OAuth 2.0 Bearer authentication. | Request credentials under **Settings** > **Integrations** > **API**, then follow the [Developers guides](https://developers.perform.ai/guides/create-shipment.md). |
| Private API (yours or your carrier’s) | Perform.AI connects to an API you or your carrier already expose, on a schedule that fits that API’s limits, to retrieve shipment data and create shipments. | Share the API documentation with your account team. |
| Incoming webhooks | Your system pushes data to a dedicated Perform.AI endpoint. Each call is authenticated and creates or updates shipments. | Ask your account team to set up the endpoint. |
| Shopify | Orders and fulfilments flow from one or more Shopify stores into one Perform.AI organization without code. Imported shipments can carry a store tag and be linked to a Tracking Page. | **Settings** > **Integrations** > **Add Store**. See [Shopify](https://developers.perform.ai/products/integrations/shopify.md). |

### Carrier integrations and carrier references

Whichever method you use, Perform.AI identifies the carrier from the `carrier_reference` you send and starts retrieving tracking events. Configure your carriers under **Settings** > **Carriers** before you upload, and include the reference on every shipment. A shipment with no carrier reference, or a wrong one, takes longer to assign and may not receive tracking updates until it is on the right carrier. Shipments from a 3PL or a dropship partner that arrive with an unknown carrier are identified and assigned by Perform.AI, but the reference is always the faster route. See [Carrier Integration](https://developers.perform.ai/products/platform/carrier-integration.md).

### Choose a workflow

| Your scenario | Workflow |
| - | - |
| You already ship and have tracking numbers | Create the shipment with `shipment_id`, `tracking_number` and `carrier_reference`, then receive updates through outgoing webhooks. |
| You need a carrier booking and label first | Create the shipment with only `shipment_id` (an Open Shipment), then book it with a carrier through [Create Booking](https://developers.perform.ai/guides/create-booking.md). |
| A customer returns an item outside the returns widget | Create a Return and its Return Shipment with [Create Return](https://developers.perform.ai/guides/create-return.md). Requires Returns. |
| The return label was printed and packed in the outbound box | Use the preprinted-label flow of Create Return. See [Create Return, preprinted label](https://developers.perform.ai/guides/create-return-preprinted-label.md). |
| You record steps carriers never report | Add your own events with [Create Events](https://developers.perform.ai/guides/create-events.md). |

### What a shipment needs

| Input method | Required | Notes |
| - | - | - |
| Public API, Create Shipment | `shipment_id` | Without `tracking_number` and a carrier the shipment is an Open Shipment: complete it later with Update Shipment, or book it with a carrier through Create Booking. A `carrier_reference` that is not configured in your account blocks creation. |
| File upload | `shipment[shipment_id]` and `shipment[tracking_number]` | The CSV must follow the Create Shipment template and its validation rules. |
| Portal, single parcel | Tracking number and carrier | Order ID, name and email are optional. |

Every `shipment_id` must be unique in your account. Some fields travel in pairs: an `order[order_reference]` needs an `order[order_id]`, and an event with a time and a location also needs an event description or event key. Dates and times must follow the format in the template guide, and fields with a character limit are rejected when they exceed it.

### Multi-leg shipments

A parcel often passes through more than one carrier, each with its own tracking number and its own updates. Linked Shipments combine the updates from every carrier into one view. For some carriers, mostly postal carriers, Perform.AI links the next carrier automatically from event locations or the destination country. You can also define linked shipments yourself when you create a shipment through the API, a CSV upload or another creation method: up to 10 additional tracking numbers, each with its carrier. Linked shipments are add-only on update, and appear in the `linked_shipments` array of webhooks.

### File upload status report

Every CSV you upload, through the portal or an SFTP folder, produces a processed file report in the `processed_file_report/` folder of your SFTP space. The report mirrors your upload with two added columns.

| Processed status | Meaning |
| - | - |
| Accepted | The row was processed with no errors or warnings. |
| Rejected | The row has at least one validation error and was not processed. |
| Warning | The row was processed but at least one validation warning was recorded. |

The **Errors/Warnings** column names the problem for each row, such as a missing field or a wrong format, so you can correct the affected rows and upload them again.

### Updating shipments

Update Shipment changes an existing shipment identified by `shipment_uuid` or `shipment_id`. Most fields replace the stored value. Four are add-only: `tags`, `events`, `linked_shipments` and `documents`. `tracking_number` and `carrier_reference` can change only while the shipment has no tracking events, and `shipment_id` can be set once on a shipment created without one. A Return Shipment can no longer be updated once it has been booked with a carrier through Booking.

In the portal, addresses, order information, custom data, tags, notifications and notes can be edited from Parcel Details; line items, documents and events are updated through the API.

### Tags and custom fields

* **Tags** are free-text labels for your own business logic, stored lowercase, up to 100 characters each. Set them on create, through Update Shipment, in bulk from Shipment Overview with **Add Tags**, or automatically on every shipment from a Shopify store. In v5.0 and in the portal, tags are added, never removed. The v5.2 Update Shipment adds `tags_action`: `add` (the default), `remove` or `replace`; system-generated tags are kept on `replace`.
* **Custom fields** go in the `additional_info` object, on the shipment, its events and its documents. Keys are up to 50 characters and values up to 150. They come back in the `additional_info` field of webhooks and API responses, and can be edited as custom data in Parcel Details.

You can filter Shipment Overview and List Shipments by tag.

### Your own events

Create Events adds milestones that carriers never report, such as packed, quality-checked or refunded, to an outbound or Return Shipment. The events are stored in the shipment’s history and appear wherever carrier events do: on the Tracking Page, in Delivery Notifications, in webhooks and in the Parcel Details timeline. Events are added, never edited or deleted.

### Data harmonisation: what Perform.AI does with the data

Raw carrier updates are mapped to a standard event type and location before anything reads them, and the shipment’s status is recomputed from the mapped events rather than taken from the carrier’s wording. The result is written as one shipment record. The Tracking Page, Delivery Notifications, Shipment Overview and reporting all read that same record, so your customer, your agents and your reports see the same state.

In each event, `event_key`, `phase` and `phase_key` carry the standard mapping. They can be `null` when a carrier sends a new event that is not mapped yet; `event` then carries the carrier’s original description.

### What comes back

| Channel | What you get |
| - | - |
| Outgoing webhooks | A Shipment update pushed to your HTTPS endpoint when Perform.AI processes new events: the full shipment plus `latest_event`, `new_events` for this cycle and `all_events`. One webhook per update cycle, with a `trigger` array listing every activated trigger the cycle satisfied. Signed with HMAC-SHA256. |
| Public API | List Shipments searches with filters and returns key fields and the latest event; Retrieve Shipment Details returns one shipment with its complete history. Proof of delivery links in the v5.2 response expire after 7 days; document download links are valid for one hour and regenerated on every call. |
| Portal | Export from Shipment Overview as a CSV sent to your email, chart and report exports from Reports & Analysis, and custom reports delivered to email or an SFTP folder. |
| MCP | Your own AI assistant reads shipments through the Perform.AI MCP server, scoped to your organization. See [MCP overview](https://developers.perform.ai/mcp/overview.md). |

### List, search and bulk look-up

List Shipments needs one date range: created, updated or latest-event date, with both ends, no more than 13 months back. On top of it you can filter by tracking number, shipment or order reference, carrier, status, phase, tag, country, linked shipment and more.

* **Bulk look-up.** Filters marked AND/OR take a list. `tracking_number=[['00340434616780000001','00340434616780000002']]` matches either value; `field=['a','b']` matches both. Use the OR form to look up a batch of tracking numbers or order IDs in one call.
* **Pagination.** Results are cursor-based. Set `limit` from 25 to 100 (default 25), send `next_page=0` for the first page, then pass the `next_page` value from each response. The last page has no `next_page`.
* **No match.** A valid search with no results returns HTTP 404 with `api_response` `4041`, not an empty list.

For the full record of one shipment, call Retrieve Shipment Details by `shipment_uuid` or `shipment_id`.

### Stop tracking a shipment

In Shipment Overview, select shipments and choose **Archive** to remove them from your overview, for example shipments added by mistake.

### Webhook formats and API versions

| Webhook format | Adds | How it is enabled |
| - | - | - |
| 5.0 | The baseline Shipment payload. | Default. |
| 5.2 | `shipment_type`, `returns`, `line_items`, `collection_point`, `rating`, `tracking_page_url`, `pod_url`, `parcel_recipient_information` and enriched event locations. | Automatic with Returns; otherwise through your account team. |
| 5.3 | `expected_delivery` split by source and `pa_results` (Performance Aspiration evaluations). | Through your account team. |

The format is set per account, not per endpoint. Formats are additive, so build your parser to ignore unknown fields; the exception is 5.3, which restructures `expected_delivery`.

Two API endpoints have a v5.2 variant next to v5.0: Update Shipment adds `tags_action`, and Retrieve Shipment Details adds returns, line items and event geolocation. The v5.0 versions stay available and unchanged.

Webhook triggers are `all_events` or specific milestones: picked up, out for delivery, delivered, failed delivery attempt, customs, delay and exception. Your endpoint must answer HTTP 200. Anything else, including a timeout, is retried three times, five minutes apart, then dropped. Missed webhooks are not replayed; reconcile gaps with List Shipments filtered by `updated_date`.

### Authentication, errors and rate limits

Every call needs a Bearer token from `POST /auth/oauth/token/`, generated with your Client ID and Client Secret. Tokens last one hour, and several can be valid at once, so you can request a new one before the old one expires.

| Response | Meaning | What to do |
| - | - | - |
| HTTP 403 `Key not authorized` | Wrong Client ID or Client Secret, or an expired, invalid or missing token. The API returns 403 here, not 401. | Check the credentials under **Settings** > **Integrations** > **API** and generate a new token. |
| HTTP 400, `api_response` `4030` | Validation failed. The `errors` object names each field and the problem. | Correct the fields and resend. |
| HTTP 299 | The request succeeded with warnings, listed in `warnings`. | Do not retry; correct with Update Shipment if needed. |
| HTTP 404, `api_response` `4041` | No shipment matched the identifier or the search. | Check the identifier or widen the search. |
| HTTP 429 `Throttled` | More than 40 requests per second for your account. | Retry with exponential backoff and pace bulk jobs below the limit. |
| HTTP 500 | System error. | Retry later. |

## How to set it up

### Upload a CSV file

1. Go to **Shipment Overview** and select **Add Parcels**, then **File Upload**.
2. Select **Create Shipment Template** to download the CSV template, or build your own file with the fields from the template field guide. Include at least `shipment[shipment_id]` and `shipment[tracking_number]`, and the `carrier_reference` of a configured carrier.
3. Enter one shipment per row and save the file as CSV.
4. Drop the file into the upload box and select **Confirm**.
5. Check the processed file report for rejected rows, correct them and upload again.

> [!TIP]
>
> Always include the carrier reference. It assigns the carrier at once and starts tracking immediately, instead of leaving the shipment to be identified later.

### Request API credentials

1. Go to **Settings** > **Integrations** > **API** and select **Request Credentials**. Your Client ID and Client Secret are shown.
2. Generate a Bearer token with `POST /auth/oauth/token/` on `https://api.perform.ai`. Tokens last one hour.
3. Call `GET /v5/carrier-configs/` to find your `carrier_reference` values, then create your first shipment. See the [Quickstart](https://developers.perform.ai/quickstart.md).

### Register a webhook endpoint

1. Go to **Settings** > **Integrations** > **Webhooks** and register your HTTPS endpoint with a name and URL.
2. Copy the Authentication Key. It is the key for the HMAC-SHA256 signature on every webhook.
3. Save, then activate the endpoint and the triggers you want. Perform.AI sends a sample payload to validate the endpoint before the setup is final.
4. Confirm the payload format version for your account with your account team.

### Connect a Shopify store

Go to **Settings** > **Integrations** and select **Add Store** in the Shopify tile. The steps are on the [Shopify](https://developers.perform.ai/products/integrations/shopify.md) page.

## Use via API and MCP

* Guides: [Create Shipment](https://developers.perform.ai/guides/create-shipment.md), [Update Shipment](https://developers.perform.ai/guides/update-shipment.md), [List Shipments](https://developers.perform.ai/guides/list-shipments.md), [Retrieve Shipment](https://developers.perform.ai/guides/retrieve-shipment.md), [Create Events](https://developers.perform.ai/guides/create-events.md), [Webhooks](https://developers.perform.ai/guides/webhooks.md), [Create Return](https://developers.perform.ai/guides/create-return.md), [Shopify integration](https://developers.perform.ai/integrations/shopify.md).
* API reference: [Create Shipment](https://developers.perform.ai/api-reference/v5/shipments/create-shipment.md), [Update Shipment](https://developers.perform.ai/api-reference/v5/shipments/update-shipment.md) and [v5.2](https://developers.perform.ai/api-reference/v5/shipments/update-shipment-v52.md), [List Shipments](https://developers.perform.ai/api-reference/v5/shipments/list-shipments.md), [Retrieve Shipment Details](https://developers.perform.ai/api-reference/v5/shipments/retrieve-shipment-details.md) and [v5.2](https://developers.perform.ai/api-reference/v5/shipments/retrieve-shipment-details-v52.md), [Create Events](https://developers.perform.ai/api-reference/v5/events/create-events.md).
* Webhook payloads: [format 5.0](https://developers.perform.ai/api-reference/webhooks/shipment-update-v5-0.md), [format 5.2](https://developers.perform.ai/api-reference/webhooks/shipment-update-v5-2.md), [format 5.3](https://developers.perform.ai/api-reference/webhooks/shipment-update-v5-3.md).
* MCP tools: `list_shipments` and `get_shipment_details` read the shipments your integrations created. Documented on the [MCP tools](https://developers.perform.ai/mcp/tools.md) page.

## FAQ

### Do you support my carrier?

Check the carrier list when you add a carrier under **Settings** > **Carriers** > **Add Carrier**, or send your carrier list to your account team. See [Carrier Integration](https://developers.perform.ai/products/platform/carrier-integration.md).

### What happens when we are adding a new carrier or entering a new market?

If the carrier is in the list, add it under **Settings** > **Carriers** with a carrier reference and use that reference on your shipments. Carrier onboarding for a carrier that is not yet integrated is work on the Perform.AI side; your account team gives you the timeline.

### Do I need a tracking number to create a shipment?

Not through the API. Only `shipment_id` is required; a shipment without a tracking number and carrier is an Open Shipment that you complete later or book through Booking. A CSV upload needs both `shipment[shipment_id]` and `shipment[tracking_number]`.

### How do 3PL tracking and dropship tracking work when the carrier is unknown?

Send them through any input method. Perform.AI identifies and assigns the carrier, which takes longer than a configured `carrier_reference`. If a shipment lands on the wrong carrier, reassign it from Parcel Details while it is Pending or Expired.

### Why does Perform.AI show tracking gaps or missing scans compared with the carrier’s site?

Carrier data quality varies: the number of events, timestamps and descriptions depend on what the carrier shares through the integration in place. Private integrations (API, webhook or SFTP) often provide more detail than the carrier’s public tracking page. See [Carrier Integration](https://developers.perform.ai/products/platform/carrier-integration.md).

### What happens if my endpoint is down when a webhook fires?

Perform.AI retries three times, five minutes apart, then stops. Reconcile with List Shipments filtered by `updated_date`.

## Troubleshooting

| Symptom | Cause | Fix |
| - | - | - |
| Rows in the processed file report are Rejected | A required field is missing, a unique field is reused, or a value fails validation | Read the **Errors/Warnings** column for the row, correct the file and upload the affected rows again. |
| Untracked shipments: created but no tracking events | The `carrier_reference` was missing, wrong or not configured in your account | Add the carrier under **Settings** > **Carriers** and reassign the shipment from Parcel Details while it is Pending or Expired. For bulk reassignment, or a shipment that already has events, contact your account team. |
| API call returns HTTP 403 `Key not authorized` | The Client ID or Client Secret is wrong, or the token is expired or missing | Check the credentials and generate a new token; tokens last one hour. |
| API call returns HTTP 429 `Throttled` | More than 40 requests per second for your account | Retry with exponential backoff and pace bulk jobs below the limit. |
| List Shipments returns HTTP 400 | No date range, half a range, or a range older than 13 months | Send one full date range within the last 13 months. |
| List Shipments returns HTTP 404 `4041` | The search was valid but matched nothing | Widen the date range or check the filter values. |
| Webhooks stop arriving | The endpoint did not answer HTTP 200 within the retry window | Fix the endpoint, then reconcile the gap with List Shipments filtered by `updated_date`. |

## Related

* [Carrier Integration](https://developers.perform.ai/products/platform/carrier-integration.md)
* [Security & Compliance](https://developers.perform.ai/products/platform/security-and-compliance.md)
* [Shopify](https://developers.perform.ai/products/integrations/shopify.md), [File upload](https://developers.perform.ai/products/integrations/file-upload.md), [Webhooks](https://developers.perform.ai/products/integrations/webhooks.md), [Kafka](https://developers.perform.ai/products/integrations/kafka.md)
* [Shipment Overview](https://developers.perform.ai/products/post-purchase/shipment-overview.md)
* [Platform overview](https://developers.perform.ai/products/platform/overview.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.