API
Data Portability URL definition
Overview
Data Porting for Booking.com Users and Registration with the Data Portability API
Booking.com users can request to port their data through the accounts section on the Booking.com website. Once a user makes this request, they will receive a secure URL. This URL can be used by your application to import their data.
To access the Booking.com Data Portability API you need to register with Booking.com:
Steps to Implement Data Porting:
- User’s Data Export Request:
- The user requests data porting on Booking.com.
- Receive Secure Export URL:
- After the request, users receive a URL that includes the data for the export.
- Application Registration:
- Ensure your application is registered on Booking.com.
- User Authorization:
- Obtain an access token after the user authorizes the data export to your application.
- Access Relevant Data:
- Use the URL and the access token to access the user's data.
By following these steps, your application can seamlessly import data for users on Booking.com.
This section explains the Data Portability API definition.
Data Portability API
curl -X GET \ -H 'X-Booking-Iam-Access-Token: <access_token>' \ -H 'Content-Type: application/json' \ -o <filename.zip> "<USER_PROVIDED_DATA_PORTABILITY_URL>"
Inputs:
access_token
: Access token string obtained on successful authorisation by the user.USER_PROVIDED_DATA_PORTABILITY_URL
: The URL provided by the user to you to enable you to import their data.filename.zip
: Desired name of the output file with .zip extension
HTTP Headers:
X-Booking-Iam-Access-Token
: Access token provided after successful authorisation by the user.Content-Type
:application/json
Response:
- A Zip file containing the user data.
Example:
curl -X GET \ -H 'X-Booking-Iam-Access-Token: CAESnAIS0gFSzS2IoVmdBcjb6MQOa9lZjA0qAQQwAQ' \ -H 'Content-Type: application/json' \ -o test.user_domain.com.zip "https://dma-data-portability-service.prod.booking.com/dma/port_report/ab12345c-abcd-1a23-b22c-f99b97a44a80"
In the command:
access_token
=CAESnAIS0gFSzS2IoVmdBcjb6MQOa9lZjA0qAQQwAQ
USER_PROVIDED_DATA_PORTABILITY_URL
=https://dma-data-portability-service.prod.booking.com/dma/port_report/ab12345c-abcd-1a23-b22c-f99b97a44a80
filename.zip
=test.user_domain.com.zip