# Upload a document Upload a document for a specific entity type (e.g., a PNR). Endpoint: POST /v2/documents Version: v2 Security: Bearer ## Request fields (multipart/form-data): - `documentMetadata` (object, required) Metadata related to document. - `documentMetadata.documentType` (string, required) Document type. Enum: "BOARDING_PASS", "CONFIRMATION", "INVOICE", "VISA", "MISCELLANEOUS", "OTHERS", "TASK_PROCESSOR", "EVENT_COVER_IMAGE", "LOGO_IMAGE" - `documentMetadata.entityType` (string, required) Entity type against which the document is to uploaded. Enum: "PNR", "COMPANY", "AIR_ITINERARY", "EVENT", "LOCATION_IMAGE" - `documentMetadata.entityId` (string, required) Entity Id for the given entity type. Example: "123124" - `documentMetadata.entityMetadata` (any, required) - `documentMetadata.name` (string, required) Document name. Example: "BoardingPass.pdf" - `file` (string, required) Contents of the document to be uploaded. ## Response 200 fields (application/json): - `documentId` (string, required) Unique identifier of the document. Example: "f49d00fe-1eda-4304-ba79-a980f565281d" - `documentMetadata` (object, required) Metadata related to document. - `documentMetadata.documentType` (string, required) Document type. Enum: "BOARDING_PASS", "CONFIRMATION", "INVOICE", "VISA", "MISCELLANEOUS", "OTHERS", "TASK_PROCESSOR", "EVENT_COVER_IMAGE", "LOGO_IMAGE" - `documentMetadata.entityType` (string, required) Entity type against which the document is to uploaded. Enum: "PNR", "COMPANY", "AIR_ITINERARY", "EVENT", "LOCATION_IMAGE" - `documentMetadata.entityId` (string, required) Entity Id for the given entity type. Example: "123124" - `documentMetadata.entityMetadata` (any, required) - `documentMetadata.name` (string, required) Document name. Example: "BoardingPass.pdf" ## Response 401 fields (application/json): - `debugIdentifier` (string) Link to debug the error internally. - `errorMessages` (array) - `errorMessages.errorCode` (string) Error code to identify the specific errors. - `errorMessages.message` (string) Message containing details of error. - `errorMessages.errorParameters` (array) Error message parameters. - `errorMessages.errorParameters.name` (string) Parameter name - `errorMessages.errorParameters.value` (string) Parameter value - `errorMessages.errorDetail` (string) More details about the error. ## Response 403 fields (application/json): - `debugIdentifier` (string) Link to debug the error internally. - `errorMessages` (array) - `errorMessages.errorCode` (string) Error code to identify the specific errors. - `errorMessages.message` (string) Message containing details of error. - `errorMessages.errorParameters` (array) Error message parameters. - `errorMessages.errorParameters.name` (string) Parameter name - `errorMessages.errorParameters.value` (string) Parameter value - `errorMessages.errorDetail` (string) More details about the error.