get_data_requests
GET /data_requests/:feedback_id
Retrieves personal data and segments for a specific feedback (GDPR right of access).
Endpoints
GET /api/v1/data_requests/:feedback_id: Returns personal data and all segments for the feedback.GET /api/v1/data_requests?filter[feedback_id]=:feedback_id: Query parameter alternative (also supportsfeedback_idorfilter[id]).GET /api/v1/data_requests/:data_subject/:feedback_id: (legacy) Returns segments and contact info filtered by the specified data subject.
Examples
- cURL
- Rails
curl 'https://api.diduenjoy.com/api/v1/data_requests/PUT-YOUR-FEEDBACK-ID' \
-u 'PUT-YOUR-API-KEY-HERE:'
require 'rest-client'
feedback_id = 'PUT-YOUR-FEEDBACK-ID'
RestClient::Request.execute method: :get,
url: "https://api.diduenjoy.com/api/v1/data_requests/#{feedback_id}",
user: 'PUT-YOUR-API-KEY-HERE'
Legacy Endpoint with data_subject
When :data_subject is included in the path, only segments associated with that data subject are returned. Respondent email and phone_number attributes are omitted unless the survey's data subject matches.
- cURL
- Rails
curl 'https://api.diduenjoy.com/api/v1/data_requests/PUT-YOUR-DATA-SUBJECT/PUT-YOUR-FEEDBACK-ID' \
-u 'PUT-YOUR-API-KEY-HERE:'
require 'rest-client'
data_subject = 'PUT-YOUR-DATA-SUBJECT'
feedback_id = 'PUT-YOUR-FEEDBACK-ID'
RestClient::Request.execute method: :get,
url: "https://api.diduenjoy.com/api/v1/data_requests/#{data_subject}/#{feedback_id}",
user: 'PUT-YOUR-API-KEY-HERE'
Possible data_subject values (legacy)
contractorcustomeremployeeotherprospectsuppliersto_be_definedtraineevisitor
Response Attributes
Returned under data.attributes in JSON:API format:
| attribute | type | description |
|---|---|---|
| segments | hash { string: string } | Segment key-value pairs associated with the feedback (filtered by data subject if provided). |
| string | Respondent email address (omitted if data subject is provided and does not match the survey data subject). | |
| phone_number | string | Respondent phone number (omitted if data subject is provided and does not match the survey data subject). |
Status Codes
| status | description |
|---|---|
| 200 OK | Data request retrieved successfully. |
| 401 Unauthorized | Missing or invalid API key. |
| 404 Not Found | Feedback not found or does not belong to the authenticated company. |
| 422 Unprocessable Content | Missing feedback_id. |