# Uploading a document to a booking The steps below explain how to use Spotnana APIs to upload a document to a booking. | Step | Name | Endpoint | Details | | --- | --- | --- | --- | | 1. | [Find booking identifiers](/openapi/tripapi#operation/pnrsearch) | `/v2/pnrs/search` | Search for and retrieve the `pnrId` and the `tripId` created for a booking on the Spotnana platform. **URL path requires:** The `searchText` that can contain one of the following values: - the source PNR - the vendor confirmation number - the ticket number associated with the booking. The `inputType` must specify if the `searchText` entered is a `SOURCE_PNR`, a `TICKET_NUMBER`, or a `VENDOR_CONFIRMATION`. **Response will contain:** The `pnrId` and the `tripId` of the booking created on the Spotnana platform. **Other APIs will use:** The `pnrId` and the `tripId`. > **Note:** This API only displays the `pnrId` and the `tripId` of the booking. If you need to see more details about the booking, use the [get PNR](/openapi/tripapi#operation/getpnrv3) API. | | 1. | [Upload a document](/openapi/documentapi/documents/uploaddocument) | `/v2/documents` | Upload a document. **Request body requires the following:** - The `documentType` (set to `INVOICE`, `BOARDING_PASS`, `CONFIRMATION`, or `MISCELLANEOUS` depending on the type of document) - The `entityType` (set to `PNR`) - The `entityId` (containing the `pnrId` obtained from step 1) - The `entityMetadata` containing the details of the document (e.g., invoice number) - The document `name` - The `file` attachment that needs to be uploaded. > **Note:** Since this API uses a `multipart/form-data` content type, the `file` field must contain the absolute path of the file’s location (e.g., `file=@/Documents/Invoice.pdf`). Once you have received a successful response, you can use the `document` field in the [get PNR](/openapi/tripapi#operation/getpnrv3) API to view the uploaded document. You can also use the [list documents](/openapi/documentapi/documents/listdocuments) API to get a list of all documents uploaded for a PNR. |