Customer Users
Customer users are to support managing access to flights and stays
List customer users
Preview
This is not yet finalised. It may change, or be removed or be not yet accessible.
Lists the customer users for the organisation.
Query parameters
The maximum number of records to return per page. Defaults to 50
.
May be set to any integer between 1
and 200
. For more information on how to paginate through records, see the Pagination section.
1
50
A cursor pointing to the next page of records. For more information on how to paginate through records, see the Pagination section.
"g2wAAAACbQAAABBBZXJvbWlzdC1LaGFya2l2bQAAAB="
A cursor pointing to the previous page of records. For more information on how to paginate through records, see the Pagination section.
"g2wAAAACbQAAABBBZXJvbWlzdC1LaGFya2l2bQAAAB="
Preview
This is not yet finalised. It may change, or be removed or be not yet accessible.
Endpoint
GET https://api.duffel.com/identity/customer/users
Request
curl -X GET --compressed "https://api.duffel.com/identity/customer/users?limit=1&before=g2wAAAACbQAAABBBZXJvbWlzdC1LaGFya2l2bQAAAB=&after=g2wAAAACbQAAABBBZXJvbWlzdC1LaGFya2l2bQAAAB=&email=email@example.com" \-H "Accept-Encoding: gzip" \-H "Accept: application/json" \-H "Content-Type: application/json" \-H "Duffel-Version: v2" \-H "Authorization: Bearer <YOUR_ACCESS_TOKEN>"
Response
{"meta": {"limit": 50,"after": "g2wAAAACbQAAABBBZXJvbWlzdC1LaGFya2l2bQAAAB="},"data": [{"phone_number": "+442080160509","live_mode": false,"id": "icu_0000AgZitpOnQtd3NQxjwO","group": {"name": "Northwind Solutions","id": "usg_0000AgZitpOnQtd3NQxjwO"},"given_name": "Amelia","family_name": "Earhart","email": "amelia@duffel.com","created_at": "2020-04-11T15:48:11.642Z"}]}
Create a Customer User
Preview
This is not yet finalised. It may change, or be removed or be not yet accessible.
Creates a customer user for the organisation.
Body parameters
The customer user's phone number in E.164 (international) format.
"+442080160509"
Preview
This is not yet finalised. It may change, or be removed or be not yet accessible.
Endpoint
POST https://api.duffel.com/identity/customer/users
Request
curl -X POST --compressed "https://api.duffel.com/identity/customer/users" \-H "Accept-Encoding: gzip" \-H "Accept: application/json" \-H "Content-Type: application/json" \-H "Duffel-Version: v2" \-H "Authorization: Bearer <YOUR_ACCESS_TOKEN>" \-d '{"data": {"phone_number": "+442080160509","group_id": "usg_0000AgZitpOnQtd3NQxjwO","given_name": "Amelia","family_name": "Earhart","email": "amelia@duffel.com"}}'
Response
{"data": {"phone_number": "+442080160509","live_mode": false,"id": "icu_0000AgZitpOnQtd3NQxjwO","group": {"name": "Northwind Solutions","id": "usg_0000AgZitpOnQtd3NQxjwO"},"given_name": "Amelia","family_name": "Earhart","email": "amelia@duffel.com","created_at": "2020-04-11T15:48:11.642Z"}}
Preview
This is not yet finalised. It may change, or be removed or be not yet accessible.
Endpoint
GET https://api.duffel.com/identity/customer/users/{id}
Request
curl -X GET --compressed "https://api.duffel.com/identity/customer/users/{id}" \-H "Accept-Encoding: gzip" \-H "Accept: application/json" \-H "Duffel-Version: v2" \-H "Authorization: Bearer <YOUR_ACCESS_TOKEN>"
Response
{"data": {"phone_number": "+442080160509","live_mode": false,"id": "icu_0000AgZitpOnQtd3NQxjwO","group": {"name": "Northwind Solutions","id": "usg_0000AgZitpOnQtd3NQxjwO"},"given_name": "Amelia","family_name": "Earhart","email": "amelia@duffel.com","created_at": "2020-04-11T15:48:11.642Z"}}
Update a single customer user
Preview
This is not yet finalised. It may change, or be removed or be not yet accessible.
Updates a customer user based on provided ID
URL parameters
Body parameters
The customer user's phone number in E.164 (international) format.
"+442080160509"
Preview
This is not yet finalised. It may change, or be removed or be not yet accessible.
Endpoint
PUT https://api.duffel.com/identity/customer/users/{id}
Request
curl -X PUT --compressed "https://api.duffel.com/identity/customer/users/{id}" \-H "Accept-Encoding: gzip" \-H "Accept: application/json" \-H "Content-Type: application/json" \-H "Duffel-Version: v2" \-H "Authorization: Bearer <YOUR_ACCESS_TOKEN>" \-d '{"data": {"phone_number": "+442080160509","group_id": "usg_0000AgZitpOnQtd3NQxjwO","given_name": "Amelia","family_name": "Earhart","email": "amelia@duffel.com"}}'
Response
{"data": {"phone_number": "+442080160509","live_mode": false,"id": "icu_0000AgZitpOnQtd3NQxjwO","group": {"name": "Northwind Solutions","id": "usg_0000AgZitpOnQtd3NQxjwO"},"given_name": "Amelia","family_name": "Earhart","email": "amelia@duffel.com","created_at": "2020-04-11T15:48:11.642Z"}}