Upload a document for a specific entity type (e.g., a PNR).
Security
Bearer
Contents of the document to be uploaded (PDF only). Accepts application/pdf or application/octet-stream.
- Sandbox URLhttps://api-ext-sboxmeta.partners.spotnana.com/v2/documents
- Spotnana mock serverhttps://developer.spotnana.com/_mock/openapi/documentapi/v2/documents
curl --location 'https://api-ext-sboxmeta.partners.spotnana.com/v2/documents' \
--header 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
--header 'User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/142.0.0.0 Safari/537.36' \
--form 'file=@"/Path/to/file/document.pdf"' \
--form 'documentMetadata="{
\"documentType\": \"INVOICE\",
\"entityType\": \"PNR\",
\"entityId\": \"1234567890\",
\"entityMetadata\": {
\"travelType\": \"AIR\",
\"invoiceMetadata\": {
\"invoiceNumber\": \"ABCD-1234\"
}
},
\"name\": \"Trip-Invoice-Test\"
}";type=application/json'Response
{ "documentId": "f49d00fe-1eda-4304-ba79-a980f565281d", "documentMetadata": { "documentType": "VISA", "entityType": "PNR", "entityId": "123124", "entityMetadata": { … }, "name": "BoardingPass.pdf" } }