Save Booking Identity Document API
Save Booking Identity Document API EndpointSave Booking Identity Document API
The Save Booking Identity Document API provides a secure endpoint to store the client's identity document on the server associated with the booking ID within the booking flow. Using a POST request, clients can submit identity documents as part of the booking process for future reference. The API supports multipart/form-data with a defined boundary.
POST
/v1/booking/{bookingId}/identity-document/save/
Request Content Type
multipart/form-data; boundary=[boundary]
Response Content Type
application/json
Request Header
-
Authorization: X-API-Key string required
X-API-Key is a string of letters and numbers used to authenticate and control access to the API. It can be generated in the StoRegister management application.
URL Query Parameters:
-
bookingId unique-identifier required
bookingId refers to an activity ID of the specific booking.
Request Body:
-
documentTypeInfoId unique-identifier required
Unique identifier representing the client's identity document type. -
identityDocuments file required
Form data representation of the client's identity document.
Response Payload:
-
succeeded boolean
Indicates whether the request to store the client's identity document for future reference was successful. -
status string
Describes the status of the request (e.g., "SUCCESS"). -
data string
Contains the unique identifier (reference Id) of the uploaded client identity document. -
errors null
Holds error information if applicable. It is null for successful requests.
Request Header
Authorization: X-API-Key --api-key--
API Request
--[boundary]
Content-Disposition: form-data; name="documentTypeInfoId"
[document_id]
--[boundary]
Content-Disposition: form-data; name="identityDocuments"; filename="[fileName]"
Content-Type: [fileMimeType]
[fileContent]
--[boundary]--
API Response
{
"data": "4AF3E793-9BF1-4BB5-B555-B19861A86437",
"succeeded": true,
"status": "SUCCESS",
"errors": null
}
Error Codes
-
INVALID_PARAM_BOOKING_INFO_ID
INVALID_PARAM_BOOKING_INFO_ID refers to invalid booking ID. -
INVALID_PARAM_ACTIVITY_INFO_ID
INVALID_PARAM_ACTIVITY_INFO_ID refers to invalid activity ID. -
INVALID_ACTIVITY_INFO_DETAILS
INVALID_ACTIVITY_INFO_DETAILS means invalid activity details. -
INVALID_DOCUMENT_FILE_DATA
INVALID_DOCUMENT_FILE_DATA means invalid file to upload. -
INVALID_PARAM_FILES
INVALID_PARAM_FILES means invalid file to upload files. -
INVALID_PARAM_DOCUMENT_TYPE_INFO_ID
INVALID_PARAM_DOCUMENT_TYPE_INFO_ID refers to invalid document type id. -
NO_RECORDS_FOUND
NO_RECORDS_FOUND means there is no relevant information found. -
FAILED
FAILED refers to an unsuccessful API call. -
SOMETHING_WENT_WRONG
SOMETHING_WENT_WRONG refers to technical glitch. Please contact administrator.