Skip to main content
Migo Docs

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"
FieldWhereRequired
fileNameURL 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"
FieldTypeRequired
businessPhotofile (multipart)βœ…
utilityBillfile (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.