summaryrefslogtreecommitdiff
path: root/jb-ui/src/api_fsb/docs/ReportApi.md
blob: daaca43f7dd709ee9eb1285c5a750ca5fb96a2f0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
# ReportApi

All URIs are relative to *https://fsb.generalresearch.com*

|Method | HTTP request | Description|
|------------- | ------------- | -------------|
|[**reportTaskProductIdReportPost**](#reporttaskproductidreportpost) | **POST** /{product_id}/report/ | Report Task|

# **reportTaskProductIdReportPost**
> StatusResponse reportTaskProductIdReportPost(reportTask)

Send a \"Task Report\" for a respondent\'s latest started survey, regardless of the survey\'s outcome. Task Reports cannot be provided for task attempts by tsid, or through any other method, they must be given immediately after the respondent\'s task attempt.  If a latest attempt can\'t be found, a ReportTaskResponse is still returned.  If multiple reasons want to be provided, they should be done at the same time. If multiple reports are given for the same latest started task, the note attribute will be overwritten, while the new unique reasons will be appended to the task attempt.  Task Report system contributions by client applications are immediately leveraged to aid yield management strategies. For those reasons, it\'s important that the respondent submits a Task Report as soon as possible and applications doesn\'t offload this request for a later time. Task Report timestamps are a critical component of understanding a Task experience for a respondent.  For the BP to tell us about a bad survey they want to report The POSTed data looks like:     {       \'bpuid\': \'1234\',       \'reasons\': [2],       \'notes\': \"This survey was the worst!\"     } Returns {\'status\': \'success\', \'msg\': error_msg}

### Example

```typescript
import {
    ReportApi,
    Configuration,
    ReportTask
} from './api';

const configuration = new Configuration();
const apiInstance = new ReportApi(configuration);

let productId: string; //The Brokerage Product ID provided by GRL. (default to undefined)
let reportTask: ReportTask; //

const { status, data } = await apiInstance.reportTaskProductIdReportPost(
    productId,
    reportTask
);
```

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **reportTask** | **ReportTask**|  | |
| **productId** | [**string**] | The Brokerage Product ID provided by GRL. | defaults to undefined|


### Return type

**StatusResponse**

### Authorization

No authorization required

### HTTP request headers

 - **Content-Type**: application/json
 - **Accept**: application/json


### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
|**200** | Successful Response |  -  |
|**422** | Validation Error |  -  |

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)