The ServiciosYa API accepts file uploads at four distinct endpoints, each serving a different point in the service-request lifecycle. Files are saved to theDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/CodexaCP/SERVICIOS-BACK/llms.txt
Use this file to discover all available pages before exploring further.
wwwroot/uploads/ directory on the server’s local disk and served as static files. Every upload endpoint enforces a hard 10 MB limit and requires a valid Bearer token. The URL or path returned by each endpoint must be stored by the client and referenced in subsequent API calls.
Overview
Payment Proof
Upload before creating a request. The returned
imageUrl is required when calling POST /api/servicerequests.Service Attachment
Optional extra file attached to an existing request. Only allowed when the service has
PermiteAdjunto = 1.Invoice
Admin-only. Attach a PDF or image invoice to a completed or in-progress request.
Delivery Attachment
Gestor-level and above. Attach proof of delivery (PDF, image, or WebP) to a request.
1. Payment Proof Upload
Every service request requires a payment proof image. Upload the image first, then pass the returnedimageUrl to POST /api/servicerequests.
| Endpoint | POST /api/uploads/payment |
| Auth | Bearer token required (any authenticated role) |
| Content-Type | multipart/form-data |
| Max size | 10 MB |
| Accepted MIME types | image/jpeg, image/png, image/jpg |
| Accepted extensions | .jpg, .jpeg, .png |
file:
200 OK
The file is renamed to a random UUID on disk. The original filename is not preserved in the URL but is captured in the PRO audit log (
OriginalFileName change field).2. Service Request Attachment
After a service request has been created, an optional supplementary file can be attached. The service must have been configured withPermiteAdjunto = 1; attempting to attach a file to a request for a service without this flag will return 400 with the message "Este servicio no permite adjuntos.".
| Endpoint | POST /api/servicerequests/{id}/attachment |
| Auth | Bearer token required (any authenticated role) |
| Content-Type | multipart/form-data |
| Max size | 10 MB |
| Accepted types | Any file type (no MIME restriction at the API layer) |
200 OK
Only one attachment is allowed per service request. A second upload attempt returns
400 with "Ya existe un adjunto para esta solicitud.".3. Invoice Upload
Administrators attach an invoice after a request has been processed. This endpoint is restricted to privileged roles.| Endpoint | POST /api/servicerequests/{id}/invoice |
| Auth | SUPER_ADMIN, ADMIN_GENERAL, or GESTOR_SUPREMO |
| Content-Type | multipart/form-data |
| Max size | 10 MB |
| Accepted extensions | .pdf, .png, .jpg, .jpeg |
200 OK
invoiceUrl is a root-relative path. Prefix it with the API base URL to build the full download link.
4. Delivery Attachment
Gestores (and above) attach a delivery document once the service has been fulfilled — for example, a signed receipt or a photo of the completed work.| Endpoint | POST /api/servicerequests/{id}/delivery-attachment |
| Auth | SUPER_ADMIN, ADMIN_GENERAL, GESTOR_SUPREMO, or GESTOR |
| Content-Type | multipart/form-data |
| Max size | 10 MB |
| Accepted extensions | .pdf, .png, .jpg, .jpeg, .webp |
200 OK
Typical service-request file flow
Error responses
| HTTP Status | Cause |
|---|---|
400 | Missing file, file too large, unsupported MIME type or extension |
400 | Service does not allow attachments (PermiteAdjunto = 0) |
400 | Attachment already exists for this request |
401 | Missing or invalid Bearer token |
403 | Authenticated user’s role is not permitted for this endpoint |
Storage location
Files are written to the following paths relative towwwroot/:
| Upload type | Directory |
|---|---|
| Payment proofs | wwwroot/uploads/ |
| Service attachments | wwwroot/uploads/service-requests/ |
| Invoices | wwwroot/uploads/service-requests/ |
| Delivery attachments | wwwroot/uploads/service-requests/ |
wwwroot/ at the root URL, so a file saved as wwwroot/uploads/abc.jpg is accessible at https://host/uploads/abc.jpg.