Skip to content

Cancel a case

DELETE
/cases/{caseId}
curl --request DELETE \
--url https://api-sandbox.trustink.io/cases/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0 \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "reason": "example" }'

Cancels a NEW or IN_PROGRESS case: CANCELLED with cancelledAt, the workflow stopped, and a cancellation mail to the invited participants. The body is optional.

caseId
required

The case id POST /cases answered.

string format: uuid
Media typeapplication/json
object
reason
string
>= 1 characters <= 500 characters
Examplegenerated
{
"reason": "example"
}

The cancelled case.

Media typeapplication/json
object
id
required
string
title
required
string
status
required
string
Allowed values: NEW IN_PROGRESS DONE UPLOAD_REJECTED EXPIRED CANCELLED FAILED
rejectReason
string
expiredAt
string
cancelledAt
string
cancelReason
string
failedAt
string
failureReason
string
created
string
validUntil
required
string
quickSign
boolean
multiFactorType
string
Allowed values: SMS EMAIL
callback
object
url
required
string
authType
required
string
Allowed values: NONE BASIC API_KEY OAUTH_CLIENT_CREDENTIALS
data
object
key
additional properties
sender
object
name
string
replyTo
string
device
object
deviceId
required
string
originalDocument
required
object
name
string
size
number
sha256
string
url
string
level
string
signedDocument
object
name
string
size
number
sha256
string
url
string
level
string
evidenceDocument
object
name
string
size
number
sha256
string
url
string
level
string
participants
required
Array<object>
object
id
required
string
firstName
required
string
lastName
required
string
email
required
string
phone
string
notify
boolean
language
string
Allowed values: sk en
status
required
string
Allowed values: UNSIGNED SIGNED
signedAt
string
signerUrl
string
signatureFields
required
Array<object>
object
id
required
string
page
required
number
x
required
number
y
required
number
width
required
number
height
required
number
unit
required
string
Allowed values: pt fraction
Example
{
"status": "NEW",
"multiFactorType": "SMS",
"callback": {
"authType": "NONE"
},
"participants": [
{
"language": "sk",
"status": "UNSIGNED",
"signatureFields": [
{
"unit": "pt"
}
]
}
]
}

The request failed validation: validationErrors says where and why.

Media typeapplication/json
object
message
required
string
validationErrors
required
Array<object>
object
instancePath
required
string
keyword
required
string
params
required
object
key
additional properties
message
required
string
Examplegenerated
{
"message": "example",
"validationErrors": [
{
"instancePath": "example",
"keyword": "example",
"params": {
"additionalProperty": "example"
},
"message": "example"
}
]
}

No or an invalid Cognito ID token (API Gateway answers {message} only).

Media typeapplication/json
object
code
string
message
required
string
Examplegenerated
{
"code": "example",
"message": "example"
}

The tenant has no such case.

Media typetext/plain
string
Example
Case not found

The case is past NEW and IN_PROGRESS; status says where it is. code: CASE_NOT_CANCELLABLE.

Media typeapplication/json
object
code
string
message
required
string
Examplegenerated
{
"code": "example",
"message": "example"
}

Something failed on the platform, or the request timed out (code TIMEOUT, 503); try again.

Media typeapplication/json
object
code
string
message
required
string
Examplegenerated
{
"code": "example",
"message": "example"
}