{"templateId":"markdown","sharedDataIds":{"sidebar":"sidebar-sidebars.yaml"},"props":{"metadata":{"markdoc":{"tagList":[]},"type":"markdown"},"seo":{"title":"Uploading a document to a booking","meta":[{"name":"robots","content":"noindex"}],"llmstxt":{"hide":false,"sections":[{"title":"Table of contents","includeFiles":["**/*"],"excludeFiles":[]}],"excludeFiles":[]}},"dynamicMarkdocComponents":[],"compilationErrors":[],"ast":{"$$mdtype":"Tag","name":"article","attributes":{},"children":[{"$$mdtype":"Tag","name":"Heading","attributes":{"level":1,"id":"uploading-a-document-to-a-booking","__idx":0},"children":["Uploading a document to a booking"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The steps below explain how to use Spotnana APIs to upload a document to a booking."]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Step"},"children":["Step"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Name"},"children":["Name"]},{"$$mdtype":"Tag","name":"th","attributes":{"width":"25%","data-label":"Endpoint"},"children":["Endpoint "]},{"$$mdtype":"Tag","name":"th","attributes":{"width":"60%","data-label":"Details"},"children":["Details "]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"ol","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[]}]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"a","attributes":{"href":"/docs/openapi/tripapi#operation/pnrsearch"},"children":["Find booking identifiers"]}]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["/v2/pnrs/search"]}]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Search for and retrieve the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["pnrId"]}," and the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["tripId"]}," created for a booking on the Spotnana platform.",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]}," ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["URL path requires:"]}," The ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["searchText"]}," that can contain one of the following values:"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["the source PNR"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["the vendor confirmation number"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["the ticket number associated with the booking.",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["inputType"]}," must specify if the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["searchText"]}," entered is a ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["SOURCE_PNR"]},", a ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["TICKET_NUMBER"]},", or a ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["VENDOR_CONFIRMATION"]},".",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]}," ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Response will contain:"]}," The ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["pnrId"]}," and the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["tripId"]}," of the booking created on the Spotnana platform.",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]}," ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Other APIs will use:"]}," The ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["pnrId"]}," and the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["tripId"]},"."]},{"$$mdtype":"Tag","name":"blockquote","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Note:"]}," This API only displays the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["pnrId"]}," and the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["tripId"]}," of the booking. If you need to see more details about the booking, use the ",{"$$mdtype":"Tag","name":"a","attributes":{"href":"/docs/openapi/tripapi#operation/getpnrv3"},"children":["get PNR"]}," API."]}]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"ol","attributes":{"start":2},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[]}]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"a","attributes":{"href":"/docs/openapi/documentapi/documents/uploaddocument"},"children":["Upload a document"]}]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["/v2/documents"]}]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Upload a document. ",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Request body requires the following:"]}]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["The ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["documentType"]}," (set to ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["INVOICE"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["BOARDING_PASS"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["CONFIRMATION"]},", or ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["MISCELLANEOUS"]}," depending on the type of document)"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["The ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["entityType"]}," (set to ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["PNR"]},")"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["The ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["entityId"]}," (containing the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["pnrId"]}," obtained from step 1)"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["The ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["entityMetadata"]}," containing the details of the document (e.g., invoice number)"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["The document ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["name"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["The ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["file"]}," attachment that needs to be uploaded."]}]},{"$$mdtype":"Tag","name":"blockquote","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Note:"]}," Since this API uses a ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["multipart/form-data"]}," content type, the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["file"]}," field must contain the absolute path of the file’s location (e.g., ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["file=@/Documents/Invoice.pdf"]},")."]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Once you have received a successful response, you can use the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["document"]}," field in the ",{"$$mdtype":"Tag","name":"a","attributes":{"href":"/docs/openapi/tripapi#operation/getpnrv3"},"children":["get PNR"]}," API to view the uploaded document. You can also use the ",{"$$mdtype":"Tag","name":"a","attributes":{"href":"/docs/openapi/documentapi/documents/listdocuments"},"children":["list documents"]}," API to get a list of all documents uploaded for a PNR."]}]}]}]}]}]}]},"headings":[{"value":"Uploading a document to a booking","id":"uploading-a-document-to-a-booking","depth":1}],"frontmatter":{"seo":{"title":"Uploading a document to a booking"}},"lastModified":"2025-11-03T18:01:59.000Z","pagePropGetterError":{"message":"","name":""}},"slug":"/spotnana/document_upload_workflow","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}