The Delivery Tracking endpoint lets administrators append granular delivery events to an order’s history. Each call pushes a new entry into the sale’sDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/fredy-rizo/ecommerce-delivery/llms.txt
Use this file to discover all available pages before exploring further.
deliveryStatus array with the provided description, an optional detail note, the current date, and a formatted time. The buyer is immediately notified via an FCM push notification. This allows clients to see a full chronological log of their shipment progress.
Endpoint
Authentication
Requires a valid user Token in the request headers.Path Parameters
The MongoDB ObjectId of the sale to add a delivery update to.
Request Body
A short summary of the delivery event (e.g.,
"Paquete en camino", "Entregado en portería"). This field is also used as the push notification body.An optional supplementary note about the delivery event (e.g., a carrier update, location note, or staff comment).
Delivery Entry Format
Each entry appended tosale.deliveryStatus contains the following fields:
| Field | Type | Description |
|---|---|---|
description | string | The event summary from the request body. |
detail | string | The optional detail note from the request body. |
date | string | Current date formatted as YYYY-M-D (e.g., "2024-5-20"). |
timeHour | string | Current time formatted as HH:MM AM/PM (e.g., "02:45 PM"), using en-US locale. |
Side Effects
FCM Push Notification (Buyer)
After the delivery entry is saved, the buyer receives a push notification if they have an active FCM token:| Field | Value |
|---|---|
title | "Actualizacion en la entrega" |
body | "{description} - {detail}" |
data.saleId | The saleId from the path parameter |
data.type | "delivery_update" |
Response
200 — Delivery status updated
403 — Missing required parameter
Example deliveryStatus Array
After several tracking updates, the deliveryStatus array on the sale document looks like this: