Seller endpoints are available to users whoseDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/ProcesosAgilesUMSS/sansistore/llms.txt
Use this file to discover all available pages before exploring further.
roles array in Firestore contains "vendedor". The authenticated seller’s UID is derived from the verified token, so both endpoints always return data scoped to the caller — there is no sellerId query parameter.
Pass the Firebase ID token in every request:
GET /api/seller/pending-orders
Returns all orders currently instatus: "CREADO" that are assigned to the authenticated seller. Results are ordered by createdAt ascending (oldest pending order first).
Query Parameters
This endpoint takes no query parameters. All filtering is performed server-side using the caller’s UID as thesellerId.
Response Fields
Array of pending order objects. Each object contains:
Firestore document ID of the order.
Items from the
orderItems sub-collection. Each product entry contains:nombre— product name (productNamefrom Firestore, falls back to"Producto sin nombre")productId— product ID (optional, omitted if not stored)unitPrice— unit price in bolivianos (optional)quantity— ordered quantity (optional)subtotal— line subtotal (optional)
Order creation date as a
YYYY-MM-DD string (date part only, no time component).Always
"pendiente" for this endpoint.Total count of pending orders returned.
Example
Only orders with
status == "CREADO" are returned. Orders that have been confirmed, cancelled, or are in delivery are excluded.GET /api/seller/daily-collections
Returns a summary of all cash collections made for the authenticated seller’s orders on a given day. Only orders whose payment status normalises to one ofcobrado, pagado, paid, or collected are included, and only those whose collection timestamp falls within the requested date in the America/La_Paz timezone (UTC−4).
Query Parameters
Date in
YYYY-MM-DD format (e.g. 2024-11-01). Defaults to today’s date in Bolivia time if omitted.Response Fields
The date used for the query, in
YYYY-MM-DD format.Sum of all
total amounts across collected orders for the day, in bolivianos.Number of collected orders included in the summary.
Number of orders where the buyer confirmed reception (
buyerReceptionConfirmed or customerConfirmed is true).Array of individual collection records. Each entry contains:
Firestore document ID of the order.
ID of the linked payment document.
Amount collected for this order, in bolivianos.
ISO 8601 timestamp of when the payment was collected. Resolved from
payment.collectedAt, then order.paymentCollectedAt, then order.deliveredAt, then order.updatedAt.Raw payment status string (e.g.
"cobrado").Human-readable label (e.g.
"Cobrado").Payment method (e.g.
"cash_on_delivery").UID of the courier who collected the payment.
Resolved display name of the courier. Falls back to
"Mensajero no identificado".Email address of the courier, if available.
Customer name from the order. Falls back to
"Cliente no registrado".Firestore document ID of the linked delivery.
Whether the buyer confirmed receiving the order.
ISO 8601 timestamp of buyer confirmation, if available.