Reports
Learn about the /reports
endpoint.
Report objects contains information related to reports generated for a user, including:
Reports are generated on request and are based on data available from payroll providers.
#The report object
- #idstring (uuid)
Unique ID of the report object.
- #userstring (uuid)
A unique ID assigned to a user.
- #reference_idstring
Unique ID of the report referenced on the PDF used as a single reference point.
- #generated_atstring (timestamp)
Shows the date and time when the report was generated.
- #typestring (enum)
Type of report.
- #statusstring (enum)
The status of the report generation process.
- #file_urlstring
The
file_url
contains a direct link to the file. This link is valid for 15 minutes. When it expires, you can call the/reports
endpoint again to generate another valid URL. - #metadataobject
Metadata for internal use.
- #purposestringrequired
Internal purpose. Required field when
metadata
is used.
1{
2 "id": "9f82994c-774d-11eb-b1c7-13e87316bacb",
3 "user": "8a5f613a-673a-4434-aeee-1a38b960b936",
4 "reference_id": "VOIE12357",
5 "generated_at": "2020-11-29T08:33:41.525392Z",
6 "type": "voie",
7 "status": "generated",
8 "file_url": "www.company.com/voie_report.pdf",
9 "metadata": {
10 "purpose": "Risk Assesment"
11 }
12}
#Generate a report
- Generate a report of the desired type for the specified user.
- This request returns a report object if a valid user was provided.
1curl --request POST \
2 --url https://api.argyle.com/v1/reports \
3 --header 'accept: application/json' \
4 --header 'content-type: application/json' \
5 --data '{
6 "user": "8a5f613a-673a-4434-aeee-1a38b960b936",
7 "type": "voie",
8 "metadata": {
9 "purpose": "Risk Assessment"
10 }
11 }'
1{
2 "id": "b1347b20-c667-4250-9a99-2e1f17d28f11",
3 "user": "8a5f613a-673a-4434-aeee-1a38b960b936",
4 "reference_id": "VOIEb1347b20",
5 "type": "voie",
6 "status": "waiting_for_sync",
7 "metadata": {
8 "purpose": "Risk Assessment"
9 },
10 "file_url": null,
11 "created_at": "2022-04-22T16:25:05.289Z",
12 "updated_at": "2022-04-22T16:25:05.289Z",
13 "generated_at": null
14}
#Retrieve a report
- Retrieve a report object for a supplied ID.
- This request returns a report object if a valid ID was provided.
- #idstring (uuid)required
The identifier of the report to be retrieved.
1curl --request GET \
2 --url https://api.argyle.com/v1/reports/{id} \
3 --header 'accept: application/json' \
4 --header 'content-type: application/json'
1{
2 "id": "b1347b20-c667-4250-9a99-2e1f17d28f11",
3 "reference_id": "VOIEb1347b20",
4 "generated_at": null,
5 "type": "voie",
6 "user": "8a5f613a-673a-4434-aeee-1a38b960b936",
7 "status": "waiting_for_sync",
8 "file_url": null,
9 "metadata": {
10 "purpose": "Risk Assessment"
11 }
12}
#List reports
- List all reports.
- This request returns a list of all reports generated.
1curl --request GET \
2 --url https://api.argyle.com/v1/reports?limit=2 \
3 --header 'accept: application/json' \
4 --header 'content-type: application/json'
1[
2 {
3 "id": "8ecbc2d2-d2cb-4134-8dcd-739cf36baa75",
4 "reference_id": "VOIE8ecbc2d2",
5 "generated_at": null,
6 "type": "voie",
7 "user": "8a5f613a-673a-4434-aeee-1a38b960b936",
8 "status": "waiting_for_sync",
9 "file_url": null,
10 "metadata": {
11 "purpose": ""
12 }
13 },
14 {
15 "id": "b1347b20-c667-4250-9a99-2e1f17d28f11",
16 "reference_id": "VOIEb1347b20",
17 "generated_at": null,
18 "type": "voie",
19 "user": "8a5f613a-673a-4434-aeee-1a38b960b936",
20 "status": "waiting_for_sync",
21 "file_url": null,
22 "metadata": {
23 "purpose": "Risk Assessment"
24 }
25 }
26]