Skip to main content
The /api/ManagePrealerts.php endpoint is the internal management interface for prealert records. It supports all four HTTP methods — GET to list and filter, POST to create, PUT to update, and DELETE to remove. All operations require a valid JWT Bearer token. Role-based access control is enforced automatically: users with the courier role can only see and modify records that belong to their own courier account, while admin and manager roles have cross-courier visibility.

Endpoint

Authentication: Authorization: Bearer <access_token> — obtain your token from POST /api/login.php. Supported methods: GET · POST · PUT · DELETE

GET — List Prealerts

Retrieve a paginated, filterable list of prealert records. Courier-role users automatically see only records tied to their courier account.

Query Parameters

integer
default:"1"
The page number to retrieve. Starts at 1.
integer
default:"50"
Number of records per page. Maximum 500.
string
Field to sort results by. Accepted values: created_at, status, tracking_number, vendor, user_code. Defaults to created_at.
string
default:"DESC"
Sort direction. Accepted values: ASC, DESC.
string
Filter by prealert status. Accepted values: pending, received, flagged. Omit to return all statuses.
Free-text search across tracking number, user code, vendor name, and customer first/last name.
string
Filter results to a specific courier by UUID. Admin and manager roles only — this parameter is ignored for courier-role tokens.

Example Request

cURL

Response

Response Fields

array
Array of prealert record objects.
object
Pagination and aggregate statistics for the current query.

POST — Create Prealert

Create a prealert record from within the Shiipp dashboard or an internal system. This route is intended for warehouse staff and admins. For courier-originated submissions, use POST /api/Prealert.php with an API key instead.

Request Body

string
required
Carrier tracking number for the inbound shipment.
string
required
Customer identifier. Must match an active customer in the system.
string
required
Shipper or store name.
string
Optional description of the package contents.
string
UUID of the courier to associate the prealert with. Required for admin and manager roles. Automatically set from the token’s courier context for courier-role users and does not need to be provided.

Example Request

cURL
A successful creation returns HTTP 201 with the standard envelope and a prealert_id in the data object.

PUT — Update Prealert

Replace the editable fields on an existing prealert record. All four fields below are required — the endpoint performs a full replacement of tracking_number, user_code, and vendor, so you must supply the current (or new) value for each one. Courier-role users can only update records that belong to their own courier account.

Request Body

string
required
UUID of the prealert record to update.
string
required
Carrier tracking number. Provide the updated value, or re-supply the existing value if you only want to change another field.
string
required
Customer identifier. Must match an active customer in the system. Provide the updated value, or re-supply the existing value if unchanged.
string
required
Shipper or store name. Provide the updated value, or re-supply the existing value if unchanged.
string
Updated description of the package contents. Omitting this field clears the existing description.

Example Request

cURL

DELETE — Delete Prealert

Permanently remove a prealert record. Courier-role users can only delete records that belong to their own courier account. Attempting to delete a record that does not exist, or that belongs to a different courier, returns 404.

Request Body

string
required
UUID of the prealert record to delete.

Example Request

cURL

Success Response

Deletion is permanent and cannot be undone. Confirm the prealert_id before issuing a DELETE request, especially in production environments.

Error Reference