Skip to content

Document API (v2)

Download OpenAPI description
Languages
Servers
Sandbox URL
https://api-ext-sboxmeta.partners.spotnana.com/
Spotnana mock server
https://developer.spotnana.com/_mock/openapi/documentapi/

Document

APIs for managing and performing operations on documents related to trips and bookings.

Documents

Operations

Upload a document

Request

Upload a document for a specific entity type (e.g., a PNR).

Security
Bearer
Bodymultipart/form-data
documentMetadataobject(DocumentMetadata)required

Metadata related to document.

documentMetadata.​documentTypestring(DocumentType)required

Document type.

Enum"BOARDING_PASS""CONFIRMATION""INVOICE""VISA""MISCELLANEOUS""OTHERS""TASK_PROCESSOR""EVENT_COVER_IMAGE""LOGO_IMAGE"
documentMetadata.​entityTypestring(EntityType)required

Entity type against which the document is to uploaded.

Enum"PNR""COMPANY""AIR_ITINERARY""EVENT""LOCATION_IMAGE"
documentMetadata.​entityIdstringrequired

Entity Id for the given entity type.

Example: "123124"
documentMetadata.​entityMetadataPnrMetadataWrapper (object) or EventMetadataWrapper (object)(EntityMetadata)required
One of:

Metadata for associated entity of document.

documentMetadata.​entityMetadata.​pnrMetadataFlightMetadataWrapper (object) or LegMetadataWrapper (object)(PnrMetadata)
One of:

Metadata when document is associated to pnr entity.

documentMetadata.​entityMetadata.​invoiceMetadataobject(InvoiceMetadata)

Metadata associated with an invoice document.

documentMetadata.​entityMetadata.​travelTypestring(TravelType)required

Travel Type

Enum"AIR""HOTEL""CAR""RAIL""LIMO""MISC""ALL"
documentMetadata.​namestringrequired

Document name.

Example: "BoardingPass.pdf"
filestring(binary)required

Contents of the document to be uploaded.

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'

Responses

OK

Bodyapplication/json
documentIdstring(uuid)required

Unique identifier of the document.

Example: "f49d00fe-1eda-4304-ba79-a980f565281d"
documentMetadataobject(DocumentMetadata)required

Metadata related to document.

documentMetadata.​documentTypestring(DocumentType)required

Document type.

Enum"BOARDING_PASS""CONFIRMATION""INVOICE""VISA""MISCELLANEOUS""OTHERS""TASK_PROCESSOR""EVENT_COVER_IMAGE""LOGO_IMAGE"
documentMetadata.​entityTypestring(EntityType)required

Entity type against which the document is to uploaded.

Enum"PNR""COMPANY""AIR_ITINERARY""EVENT""LOCATION_IMAGE"
documentMetadata.​entityIdstringrequired

Entity Id for the given entity type.

Example: "123124"
documentMetadata.​entityMetadataPnrMetadataWrapper (object) or EventMetadataWrapper (object)(EntityMetadata)required
One of:

Metadata for associated entity of document.

documentMetadata.​entityMetadata.​pnrMetadataFlightMetadataWrapper (object) or LegMetadataWrapper (object)(PnrMetadata)
One of:

Metadata when document is associated to pnr entity.

documentMetadata.​entityMetadata.​invoiceMetadataobject(InvoiceMetadata)

Metadata associated with an invoice document.

documentMetadata.​entityMetadata.​travelTypestring(TravelType)required

Travel Type

Enum"AIR""HOTEL""CAR""RAIL""LIMO""MISC""ALL"
documentMetadata.​namestringrequired

Document name.

Example: "BoardingPass.pdf"
Response
application/json
{ "documentId": "f49d00fe-1eda-4304-ba79-a980f565281d", "documentMetadata": { "documentType": "VISA", "entityType": "PNR", "entityId": "123124", "entityMetadata": {}, "name": "BoardingPass.pdf" } }

List documents

Request

List all the uploaded documents for a specific entity ID and type.

Security
Bearer
Query
entityTypestring(EntityType)required

Entity type against which document is associated.

Enum"PNR""COMPANY""AIR_ITINERARY""EVENT""LOCATION_IMAGE"
Example: entityType=PNR
entityIdstringrequired

Entity Id for the given entity type.

Example: entityId=123124
curl -i -X GET \
  'https://api-ext-sboxmeta.partners.spotnana.com/v2/documents?entityType=PNR&entityId=123124' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>'

Responses

OK

Bodyapplication/json
documentsArray of objects(Document)required

List of documents.

documents[].​urlstringrequired

S3 location of the document.

Example: "https://s3.amazonaws.com/bucket-name/folder-name/file-name"
documents[].​documentIdstring(uuid)required

Unique identifier of the document.

Example: "f49d00fe-1eda-4304-ba79-a980f565281d"
documents[].​documentMetadataobject(DocumentMetadata)required

Metadata related to document.

documents[].​documentMetadata.​documentTypestring(DocumentType)required

Document type.

Enum"BOARDING_PASS""CONFIRMATION""INVOICE""VISA""MISCELLANEOUS""OTHERS""TASK_PROCESSOR""EVENT_COVER_IMAGE""LOGO_IMAGE"
documents[].​documentMetadata.​entityTypestring(EntityType)required

Entity type against which the document is to uploaded.

Enum"PNR""COMPANY""AIR_ITINERARY""EVENT""LOCATION_IMAGE"
documents[].​documentMetadata.​entityIdstringrequired

Entity Id for the given entity type.

Example: "123124"
documents[].​documentMetadata.​entityMetadataPnrMetadataWrapper (object) or EventMetadataWrapper (object)(EntityMetadata)required
One of:

Metadata for associated entity of document.

documents[].​documentMetadata.​entityMetadata.​pnrMetadataFlightMetadataWrapper (object) or LegMetadataWrapper (object)(PnrMetadata)
One of:

Metadata when document is associated to pnr entity.

documents[].​documentMetadata.​entityMetadata.​invoiceMetadataobject(InvoiceMetadata)

Metadata associated with an invoice document.

documents[].​documentMetadata.​entityMetadata.​travelTypestring(TravelType)required

Travel Type

Enum"AIR""HOTEL""CAR""RAIL""LIMO""MISC""ALL"
documents[].​documentMetadata.​namestringrequired

Document name.

Example: "BoardingPass.pdf"
Response
application/json
{ "documents": [ {} ] }

Get document

Request

Retrieve a document.

Security
Bearer
Path
documentIdstring(uuid)required

Document Id

Example: f49d00fe-1eda-4304-ba79-a980f565281d
curl -i -X GET \
  https://api-ext-sboxmeta.partners.spotnana.com/v2/documents/f49d00fe-1eda-4304-ba79-a980f565281d \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>'

Responses

OK

Bodyapplication/json
documentobject(Document)required

Document details.

document.​urlstringrequired

S3 location of the document.

Example: "https://s3.amazonaws.com/bucket-name/folder-name/file-name"
document.​documentIdstring(uuid)required

Unique identifier of the document.

Example: "f49d00fe-1eda-4304-ba79-a980f565281d"
document.​documentMetadataobject(DocumentMetadata)required

Metadata related to document.

document.​documentMetadata.​documentTypestring(DocumentType)required

Document type.

Enum"BOARDING_PASS""CONFIRMATION""INVOICE""VISA""MISCELLANEOUS""OTHERS""TASK_PROCESSOR""EVENT_COVER_IMAGE""LOGO_IMAGE"
document.​documentMetadata.​entityTypestring(EntityType)required

Entity type against which the document is to uploaded.

Enum"PNR""COMPANY""AIR_ITINERARY""EVENT""LOCATION_IMAGE"
document.​documentMetadata.​entityIdstringrequired

Entity Id for the given entity type.

Example: "123124"
document.​documentMetadata.​entityMetadataPnrMetadataWrapper (object) or EventMetadataWrapper (object)(EntityMetadata)required
One of:

Metadata for associated entity of document.

document.​documentMetadata.​entityMetadata.​pnrMetadataFlightMetadataWrapper (object) or LegMetadataWrapper (object)(PnrMetadata)
One of:

Metadata when document is associated to pnr entity.

document.​documentMetadata.​entityMetadata.​invoiceMetadataobject(InvoiceMetadata)

Metadata associated with an invoice document.

document.​documentMetadata.​entityMetadata.​travelTypestring(TravelType)required

Travel Type

Enum"AIR""HOTEL""CAR""RAIL""LIMO""MISC""ALL"
document.​documentMetadata.​namestringrequired

Document name.

Example: "BoardingPass.pdf"
Response
application/json
{ "document": { "url": "https://s3.amazonaws.com/bucket-name/folder-name/file-name", "documentId": "f49d00fe-1eda-4304-ba79-a980f565281d", "documentMetadata": {} } }

Delete document

Request

Delete a document.

Security
Bearer
Path
documentIdstring(uuid)required

Document Id

Example: f49d00fe-1eda-4304-ba79-a980f565281d
curl -i -X DELETE \
  https://api-ext-sboxmeta.partners.spotnana.com/v2/documents/f49d00fe-1eda-4304-ba79-a980f565281d \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>'

Responses

OK

Response
No content