After placing an order, the buyer must upload a payment proof image (e.g., a bank transfer screenshot) to allow administrators to verify the payment. This endpoint accepts aDocumentation 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.
multipart/form-data request containing the image file(s), updates the sale’s status to Validando (Under review), records the current date as dateproof, and sends an FCM push notification to every administrator with an active device token. Both the buyer who owns the order and any admin user are permitted to call this endpoint.
The endpoint URL contains a deliberate typo in the original source: it is
/laod-proof/ (not /load-proof/). Use the URL exactly as shown.Endpoint
Authentication
Requires a valid user Token in the request headers. The authenticated user must either own the sale (userId match) or have an admin role (roles.value === "2").
Path Parameters
The MongoDB ObjectId of the sale to attach the payment proof to.
Request Body
This endpoint usesmultipart/form-data encoding.
One or more image files representing the payment proof (e.g., a bank transfer receipt or payment screenshot). The server stores them under
storage/sale/ with a randomised filename prefix.Side Effects
Status Update
The sale document is updated with:imgPay— array of stored image pathsdateproof— current date formatted asYYYY-M-Dstatus— set to{ name: "Validando", value: "4" }
FCM Push Notification (Admin Broadcast)
A push notification is sent to all admin users who have an active FCM token registered:| Field | Value |
|---|---|
title | "Nuevo comprobante de pago" |
body | "El usuario {name_client} con codigo {codeSale} subio su comprobante de pago" |
data.saleId | The saleId from the path parameter |
data.type | "dateproof_update" |
Response
200 — Proof uploaded successfully
The
newSale field in the response contains the sale document before the update was applied (MongoDB findOneAndUpdate without { new: true }). The updated document can be retrieved via the list endpoints.