This API initializes document signing/identification with qualified electronic signature stored on SIM card.
Endpoint
Path (Locale: LT)
/mobile/sign.json
Path (Locale: EN)
/en/mobile/sign.json
Method
POST
Request Body Schema
application/json
Request body parameter description
Key
Requirement
Type
Description
access_token
Mandatory
String
API Access Token
type
Mandatory
String
Type of the file to be signed. Possible values: pdf, adoc, bdoc, asice
phone
Mandatory
String
Phone number of the signer
message
Optional
String
Message displayed on the phone screen
message_format
Optional
String
Format of the message which is displayed on the phone screen. Possible values: GSM-7 (default), UCS-2. Max characters count for GSM-7 and UCS-2 is 40 and 20 characters respectively
code
Mandatory
String
Personal code related to the phone number
signature_position
Optional
String
Position of a visible signature (pdf annotation) in the pdf document. Possible values: auto, left_top, left_bottom, right_top, right_bottom. Unset value is equal to invisible signature
signature_page
Optional
String
Page of a visible signature (pdf annotation) in the pdf document. Possible values: first_page, last_page. Default value is last_page
peps
Optional
Boolean
Whether to check PEPs information, default is false
sanctions
Optional
Boolean
Whether to check sanctions information, default is false
/**
* The token in response ($initSignResArray['token'] in this example),
* might need to be saved for future purposes.
*/
$initSignReq = (new MobileidInitSigningRequestBuilder)
->withType('pdf')
->withPhone('+37269000366')
->withMessage('Dummy')
->withMessageFormat('GSM-7')
->withCode('60001017705')
->withSignaturePosition('auto')
->withSignaturePage('last_page')
->withPeps(true)
->withsanctions(true)
->withPdf(
(new Files)->setFiles([
(new FileUpload)->setName(basename($filePath))->setContent(base64_encode(file_get_contents($filePath)))
])
)
->createRequest();
$initSignRes = $client->postRequest($initSignReq);
$initSignResArray = $initSignRes->toArray();
var_dump($initSignResArray);