# Request the participant who submitted the response to return their response
POST https://api.prolific.com/api/v1/submissions/{id}/request-return/
Content-Type: application/json
**This is an experimental feature that may be subject to change in the future.**
It offers researchers the ability to ask a participant to return a submission. The return reason must be provided in the request and can be any free text string.
The Prolific UI allows users to select any of the following options:
* Didn't finish the study
* Encountered technical problems
* Withdrew consent
* Other ( uses the free text input)
This constructs a message around the reasons provided so there is no need to provide additional text beyond the reasons.
Reference: https://beta-docs.prolific.com/api-reference/submissions/request-submission-return
## OpenAPI Specification
```yaml
openapi: 3.1.1
info:
title: Request the participant who submitted the response to return their response
version: endpoint_submissions.RequestSubmissionReturn
paths:
/api/v1/submissions/{id}/request-return/:
post:
operationId: request-submission-return
summary: >-
Request the participant who submitted the response to return their
response
description: >
**This is an experimental feature that may be subject to change in the
future.**
It offers researchers the ability to ask a participant to return a
submission. The return reason must be provided in the request and can be
any free text string.
The Prolific UI allows users to select any
of the following options:
* Didn't finish the study
* Encountered technical problems
* Withdrew consent
* Other ( uses the free text input)
This constructs a message around the reasons provided so there is no
need to provide additional text beyond the reasons.
tags:
- - subpackage_submissions
parameters:
- name: id
in: path
description: The submission id
required: true
schema:
type: string
- name: Authorization
in: header
description: Header authentication of the form `undefined `
required: true
schema:
type: string
responses:
'200':
description: >
A message is sent to the participant belonging to the submission
asking them to return.
content:
application/json:
schema:
$ref: '#/components/schemas/ReturnRequestedResponse'
'400':
description: Error
content: {}
requestBody:
content:
application/json:
schema:
type: object
properties:
request_return_reasons:
type: array
items:
type: string
required:
- request_return_reasons
components:
schemas:
ReturnRequestedResponseStatus:
type: string
enum:
- value: ACTIVE
- value: APPROVED
- value: AWAITING REVIEW
- value: SCREENED OUT
- value: REJECTED
- value: RESERVED
- value: RETURNED
- value: TIMED-OUT
- value: UNKNOWN
ReturnRequestedResponse:
type: object
properties:
id:
type: string
description: the database id of the submission instance
status:
$ref: '#/components/schemas/ReturnRequestedResponseStatus'
description: The current status of the submission
participant:
type: string
description: The participant who took part in the study.
return_requested:
type:
- string
- 'null'
format: date-time
description: The date and time when a return request for the submission was made.
```
## SDK Code Examples
```python
import requests
url = "https://api.prolific.com/api/v1/submissions/id/request-return/"
payload = { "request_return_reasons": ["Withdrew consent", "Didn't finish the study"] }
headers = {
"Authorization": "",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
```
```javascript
const url = 'https://api.prolific.com/api/v1/submissions/id/request-return/';
const options = {
method: 'POST',
headers: {Authorization: '', 'Content-Type': 'application/json'},
body: '{"request_return_reasons":["Withdrew consent","Didn\'t finish the study"]}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
```
```go
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.prolific.com/api/v1/submissions/id/request-return/"
payload := strings.NewReader("{\n \"request_return_reasons\": [\n \"Withdrew consent\",\n \"Didn't finish the study\"\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
```
```ruby
require 'uri'
require 'net/http'
url = URI("https://api.prolific.com/api/v1/submissions/id/request-return/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = ''
request["Content-Type"] = 'application/json'
request.body = "{\n \"request_return_reasons\": [\n \"Withdrew consent\",\n \"Didn't finish the study\"\n ]\n}"
response = http.request(request)
puts response.read_body
```
```java
HttpResponse response = Unirest.post("https://api.prolific.com/api/v1/submissions/id/request-return/")
.header("Authorization", "")
.header("Content-Type", "application/json")
.body("{\n \"request_return_reasons\": [\n \"Withdrew consent\",\n \"Didn't finish the study\"\n ]\n}")
.asString();
```
```php
request('POST', 'https://api.prolific.com/api/v1/submissions/id/request-return/', [
'body' => '{
"request_return_reasons": [
"Withdrew consent",
"Didn\'t finish the study"
]
}',
'headers' => [
'Authorization' => '',
'Content-Type' => 'application/json',
],
]);
echo $response->getBody();
```
```csharp
var client = new RestClient("https://api.prolific.com/api/v1/submissions/id/request-return/");
var request = new RestRequest(Method.POST);
request.AddHeader("Authorization", "");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n \"request_return_reasons\": [\n \"Withdrew consent\",\n \"Didn't finish the study\"\n ]\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```
```swift
import Foundation
let headers = [
"Authorization": "",
"Content-Type": "application/json"
]
let parameters = ["request_return_reasons": ["Withdrew consent", "Didn't finish the study"]] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "https://api.prolific.com/api/v1/submissions/id/request-return/")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
```