Customer User Groups
Customer user groups can be used to separate travel for a single user to be segmented into silos (e.g. businesses), so that access can be controlled via the business that the user is accessing the product through.
List Customer User Groups
Retrieves a list of customer user groups
Endpoint
GET https://api.duffel.com/identity/customer/user_groups
Request
curl -X GET --compressed "https://api.duffel.com/identity/customer/user_groups" \-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": [{"user_ids": ["icu_0000AgZitpOnQtd3NQxjwX"],"name": "Northwind Solutions","id": "usg_0000AgZitpOnQtd3NQxjwO"}]}
Endpoint
POST https://api.duffel.com/identity/customer/user_groups
Request
curl -X POST --compressed "https://api.duffel.com/identity/customer/user_groups" \-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": {"user_ids": ["icu_0000AgZitpOnQtd3NQxjwX"],"name": "Northwind Solutions"}}'
Response
{"data": {"user_ids": ["icu_0000AgZitpOnQtd3NQxjwX"],"name": "Northwind Solutions","id": "usg_0000AgZitpOnQtd3NQxjwO"}}
Endpoint
DELETE https://api.duffel.com/identity/customer/user_groups/{id}
Request
curl -X DELETE --compressed "https://api.duffel.com/identity/customer/user_groups/{id}" \-H "Accept-Encoding: gzip" \-H "Accept: application/json" \-H "Duffel-Version: v2" \-H "Authorization: Bearer <YOUR_ACCESS_TOKEN>"
Response
No response body
Endpoint
GET https://api.duffel.com/identity/customer/user_groups/{id}
Request
curl -X GET --compressed "https://api.duffel.com/identity/customer/user_groups/{id}" \-H "Accept-Encoding: gzip" \-H "Accept: application/json" \-H "Duffel-Version: v2" \-H "Authorization: Bearer <YOUR_ACCESS_TOKEN>"
Response
{"data": {"user_ids": ["icu_0000AgZitpOnQtd3NQxjwX"],"name": "Northwind Solutions","id": "usg_0000AgZitpOnQtd3NQxjwO"}}
Update a single customer user group
Updates an customer user group by its ID
URL parameters
Endpoint
PATCH https://api.duffel.com/identity/customer/user_groups/{id}
Request
curl -X PATCH --compressed "https://api.duffel.com/identity/customer/user_groups/{id}" \-H "Accept-Encoding: gzip" \-H "Accept: application/json" \-H "Duffel-Version: v2" \-H "Authorization: Bearer <YOUR_ACCESS_TOKEN>" \-d '{"data": {"user_ids": ["icu_00009zg3q4J9z4z3"],"name": "Northwind Solutions"}}'
Response
{"data": {"user_ids": ["icu_0000AgZitpOnQtd3NQxjwX"],"name": "Northwind Solutions","id": "usg_0000AgZitpOnQtd3NQxjwO"}}