get https://app1.compliancely.com/api/v1/bulk/upload/tin//
Get submission details by ID
Sample Requests and Responses.
{
"success_message": "Data found",
"data": {
"id": 1,
"input_file_url": "https://app1.compliancely.com/app/file/download/secure/eyJhbGciOXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXxxIjoidGF4X3RyYW5zY3JpcHRfcmVwb3J0IiwiZmlsZV9tb2RlIjoiczMifQ.LRQJIynM9mgQnW99UIzgHvceKlVYX-3LOKSaqw_ruXo/",
"result_file_url": "https://app1.compliancely.com/app/file/download/secure/eyJhbGciOXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXxxIjoidGF4X3RyYW5zY3JpcHRfcmVwb3J0IiwiZmlsZV9tb2RlIjoiczMifQ.LRQJIynM9mgQnW99UIzgHvceKlVYX-3LOKSaqw_ruXo/",
"regular_file_url": "https://app1.compliancely.com/app/file/download/secure/eyJhbGciOXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXxxIjoidGF4X3RyYW5zY3JpcHRfcmVwb3J0IiwiZmlsZV9tb2RlIjoiczMifQ.LRQJIynM9mgQnW99UIzgHvceKlVYX-3LOKSaqw_ruXo/",
"error_file_url": "https://app1.compliancely.com/app/file/download/secure/eyJhbGciOXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXxxIjoidGF4X3RyYW5zY3JpcHRfcmVwb3J0IiwiZmlsZV9tb2RlIjoiczMifQ.LRQJIynM9mgQnW99UIzgHvceKlVYX-3LOKSaqw_ruXo/",
"duplicate_record_file_results": [
{
"id": 3,
"result_file_url": "https://app1.compliancely.com/app/file/download/secure/eyJhbGciOXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXxxIjoidGF4X3RyYW5zY3JpcHRfcmVwb3J0IiwiZmlsZV9tb2RlIjoiczMifQ.LRQJIynM9mgQnW99UIzgHvceKlVYX-3LOKSaqw_ruXo/",
"updated_at": "2024-07-05T14:32:48.792817Z"
}
],
"original_file_name": "1MTINMATCH_priority-1.csv",
"status": "completed",
"priority": 1,
"result_updated_at": "2024-07-05T14:32:48.794602Z",
"created_by": "compliancely",
"created_at": "2024-07-05T14:29:01.505373Z",
"updated_at": "2024-07-05T14:32:48.794673Z"
},
"success": true
}
{
"errors": [
{
"message": "Record not found"
}
],
"data": null,
"success": false
}
{
"detail": "Authentication credentials were not provided."
}
{
"detail": "Invalid token."
}
{
"detail": "Invalid token header. No credentials provided."
}
It's important to note that any links, within the response, are not public and have a Response Content-Type of application/octet-stream. As a result, these links should be treated as additional API endpoints, and they require an access_token for access. Using the access_token, triggering the link as an API endpoint is necessary. The resulting data from the response should be stored in a file. Below is an example in cURL & Python illustrating how to save this data. Users who wish to open these links in a web browser while logged into the Compliancely portal can download the files directly.
curl -X GET "<file link>" -H "Authorization: Token <Authtoken>" -o "<dir>/<filename>.csv"
import requests
import os
headers = {
'Authorization': f'Token <Authtoken>'
}
response = requests.get('<file link>', headers=headers)
destination_file_name = "{}.csv".format(<filename>)
destination_file_path = os.path.join(<dir>, destination_file_name)
with open(destination_file_path, 'wb') as file:
file.write(response.content)