Hand a case to a kiosk for a participant
const url = 'https://api-sandbox.trustink.io/cases/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/participants/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/open';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"deviceId":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api-sandbox.trustink.io/cases/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/participants/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/open \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "deviceId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0" }'Publishes device.open_case with the participant’s signing link to the device’s real-time channel (Real-time events).
Authorizations
Section titled “Authorizations”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters”The case id POST /cases answered.
The participant id: the path of the signing link, or participants[].id of the case.
Request Bodyrequired
Section titled “Request Bodyrequired”object
Examplegenerated
{ "deviceId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0"}Responses
Section titled “ Responses ”The event is published.
object
Examplegenerated
{ "caseId": "example", "participantId": "example", "deviceId": "example"}The request failed validation, or the device is not the tenant’s (code UNKNOWN_DEVICE).
object
object
object
object
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).
object
Examplegenerated
{ "code": "example", "message": "example"}The tenant has no such case, or the case no such participant.
Example
Case not foundThe participant cannot sign on a device now. code: ALREADY_SIGNED, NOT_QUICK_SIGN, PARTICIPANT_NOT_READY.
object
Examplegenerated
{ "code": "example", "message": "example"}Nobody can sign the case any more. code: CASE_NOT_ACTIVE.
object
Examplegenerated
{ "code": "example", "message": "example"}The event could not be published; try again. code: EVENTS_UNAVAILABLE.
object
Examplegenerated
{ "code": "example", "message": "example"}default
Section titled “default”Something failed on the platform, or the request timed out (code TIMEOUT, 503); try again.
object
Examplegenerated
{ "code": "example", "message": "example"}