eCMRhub.docs

Signer: sign

POST
/functions/v1/sign/{token}

The signer's consent for one role and document digest, sent with the signing link token.

Path Parameters

token*string

Request Body

application/json
  1. body
id*string
Formatuuid
documentDigest*string
artifactDigest*string

SHA-256 of the presentation PDF the signer was shown (artifact of the current version).

Match^[a-f0-9]{64}$
role*string
Value in"sender""carrier""consignee"
name*string
statement*string
occurredAt*string
Formatdate-time
strokes*array<array<>>

Drawn signature normalised to the unit square. Empty when mark says the signature was typed.

mark?

Present only on a signature set from the typed name (profile evidence-0.3); it is rendered from name in the given style and labelled as signed electronically.

reservations?string

Reservations the consignee states on taking delivery (art. 30 CMR), at most 150 characters, printed in box 24. Only on a consignee consent and never empty; absent when there are none (profile evidence-0.5).

photos?array<>

Photos taken with the signature, signed by SHA-256 (profile evidence-0.7). At most 10, never empty, each hash once; absent when there are none. The bytes are uploaded separately to /consents/{documentId}/photos/{consentId}/{sha256} (or /sign/{token}/photos/... from a signing link) and stored only when they match.

publicKey*
signature*string

Base64 ECDSA P-256 IEEE P1363 signature over canonical assertion excluding signature field.

Response Body

Success

application/json
  1. response
ok*boolean
Example Request
curl -X POST 'https://api-ecmr-dev.lucaspiera.com/functions/v1/sign/string' \  -H 'Content-Type: application/json' \  -d '{  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",  "documentDigest": "string",  "artifactDigest": "string",  "role": "sender",  "name": "string",  "statement": "string",  "occurredAt": "2019-08-24T14:15:22Z",  "strokes": [    [      {        "x": 0,        "y": 0      }    ]  ],  "publicKey": {    "property1": null,    "property2": null  },  "signature": "string"}'
Example Response
{  "ok": true}