Start Submission

Send file & Get the Result Id

Start Submission

This is where you can upload & start a new submission. File should be sent with multipart/form-data and the key is file.

Authentication

Queries

Queries are the things that we sent from the URL, like this: http://google.com?query1=test1&query2=test2

The queries here are "query1 and query2". CDR has three queries that can be sent, all of them are optional:

  • webhook: This is the query for getting notification when submission is finished. The return schema/example is something like this:

{
    "resultId": "fa8103b3-8764-4130-bb66-a7919d67093e"
}
  • extension: This is the query if you manually want to set an extension for you CDR process. Not recommended since our system gets this automatically but, we have the option.

  • filedata: Manually, while getting the result of the CDR submission, it doesn't return sanitized file in the result. By giving any value here(value doesn't matter, just give it) CDR will send the sanitized file as "file_data" key, in base64 form.

Gets the file from the user and starts the process.

post
Query parameters
webhookstringOptional

If you give a link here, API Manager will make a POST request to this link with listen link in body

extensionstringOptional

[ONLY_CDR] Submission's extension, if it is given submission will be treated by the given extension.

filedatastringOptional

[ONLY_CDR] If it is enabled, the Base64 encoded file will be given in the response.

Body
filestring · binaryRequired
Responses
200
Returns the result id and a message
application/json
post
POST /start/upload-file HTTP/1.1
Host: 
Content-Type: multipart/form-data
Accept: */*
Content-Length: 17

{
  "file": "binary"
}
{
  "resultId": "a1b2c3d4-e5f6-g7h8-i9j0-k1l2m3n4o5p6",
  "message": "The submission is started successfully"
}

Example Response

{	
	"resultId": "a3d68330-4155-469c-a393-beaa645015da",
	"message": "Successfully started the submission process. Use GET /listen/:resultId to get the information about the submission."
}

Last updated

Was this helpful?