Uploading a Case

The full API for file uploads is documented here: https://api.digicust.com/upload/api-docs/

curl -X POST https://api.digicust.com/upload/api/{customerId}/{projectId}/new \
     -H "Content-Type: multipart/form-data" \
     -H "Authorization: Bearer {access_token}" \
     -F "files[]=@/path/to/file1.pdf" \
     -F "files[]=@/path/to/file2.pdf" \
     -F "classifications=[{\"fileName\":\"file1.pdf\",\"documentType\":\"invoice\"},{\"fileName\":\"file2.pdf\",\"documentType\":\"waybill\"}]" \
     -F "executionStrategyId={executionStrategyId}" \
     -F "reference={reference}" \
     -F "documents=[{\"priority\":\"afterNormalization\",\"annotatedAggregated\":{}}]"

Endpoint: https://api.digicust.com/upload/api/{customerId}/{projectId}/new

This endpoint is used for uploading new cases.

HTTP Method

POST

Headers

Header
Description

Content-Type

multipart/form-data

Authorization

Bearer {access_token}

URL Parameters

Parameter
Type
Description

customerId

string

The unique identifier of the customer.

projectId

string

The unique identifier of the project.

Request Body

The request body should be of type multipart/form-data with the following parameters:

Parameter
Type
Description

files[]

file

The file to be uploaded.

classifications

stringified JSON array

A JSON stringified array of objects where each object contains the fileName and the documentType.

executionStrategyId

string

The execution strategy identifier.

reference

string

The case reference. (optional)

documents

stringified JSON array

The UserInput object can have the following properties:

Property
Type
Description

priority

string

This can take one of the following values: beforeNormalization (fallback), afterNormalization (overwrite). It indicates the priority of the UserInput object.

annotatedAggregated

annotatedExecutionStrategy

customValidationMessages

You can add error, warning or information messages.

Responses

Success

Code
Description

200

The file has been successfully uploaded and is being processed

This will return a newly initiated case. Use its id for further reference. The case will automatically be processed.

Last updated