- Create a new document
Uploads a file and returns a document record you can reference from other resources — as the invoice or supporting paperwork on a payin or payout, or as evidence when responding to a request for information (RFI).
Send the request as multipart/form-data. The file must be a JPEG, PNG or PDF of at most 10 MB (10,485,760 bytes), and the uploaded filename and document_name at most 128 characters each.
Upload is a separate step from attaching, and each consumer names the reference differently: pass the returned id as document_id when creating a payin, an order or a refund, and inside the documents array when creating a payout or responding to an RFI. Check the schema of the endpoint you are attaching to — the key inside documents is not the same on every one. A document that is never referenced stays listed but has no effect.
- Production serverhttps://api.glomopay.com/api/v1/document
curl -i -X POST \
https://api.glomopay.com/api/v1/document \
-H 'Authorization: Bearer <YOUR_JWT_HERE>' \
-H 'Content-Type: multipart/form-data' \
-F document_name=invoice \
-F file=@file.binDocument created successfully
The URL to preview the document.
The status of file you uploaded. Values can be uploaded, approved and rejected.
When the document was created, as an ISO 8601 date-time in UTC.
{ "id": "doc_nYUqLpuYQ0M8", "document_name": "invoice", "file_name": "invoice_BC8tFdE.pdf", "preview_url": "https://glomopay-service-staging-documents.s3.ap-south-1.amazonaws.com/12345_invoice", "status": "uploaded", "created_at": "2021-06-01T12:00:00Z", "updated_at": "2021-06-01T12:00:00Z" }