Lead & Business Files
This page covers the file endpoints attached to leads and businesses: reading a stored lead file, attaching business onboarding files, and listing a business's documents.
Read a lead fileβ
Fetches the contents of a file previously stored for a lead. The file is identified by its fileName path segment. This endpoint takes no request body β it is a read, not an upload.
curl -X POST "https://api.ali.app/rest/leads/files/upload/identification.pdf" \
-H "Authorization: Bearer <token>" \
-H "x-application-id: YOUR_APP_ID"
| Field | Where | Required |
|---|---|---|
fileName | URL path | β β the stored file name |
fileName is treated as a free-form stored-file name; there is no enumerated slot list and no documents checklist in the response. Requires the FILE_UPLOAD permission.
Attach files to a businessβ
Once a lead has been promoted to a business, attach its onboarding files via multipart form-data. Both fields are files and both are required (max 1 each).
curl -X POST "https://api.ali.app/rest/businesses/{commerceId}/files" \
-H "Authorization: Bearer <token>" \
-F "businessPhoto=@photo.jpg" \
-F "utilityBill=@bill.pdf"
| Field | Type | Required |
|---|---|---|
businessPhoto | file (multipart) | β |
utilityBill | file (multipart) | β |
commerceId is a numeric identifier.
List business documentsβ
curl "https://api.ali.app/rest/businesses/{commerceId}/docs" \
-H "Authorization: Bearer <token>"
Returns the commerce documents as short-lived signed URLs.