Link Search Menu Expand Document (external link)

Hash Signing Status

Table of contents
  1. Endpoint
  2. URL parameter description
  3. Request body parameter description
  4. Response body parameter description
    1. Successful response
    2. Failed response
  5. Sample request
  6. Sample response
    1. Sample success response
    2. Sample failed response
  7. Implementation
    1. CURL
    2. Using php-client

This API checks the status of the hash signing process initialized by Initialize hash signing via mobile id request.

Endpoint

Path (Locale: LT) /mobile/sign-hash/status/{token}.json
Path (Locale: EN) /en/mobile/sign-hash/status/{token}.json
Method POST
Request Body Schema application/json

URL parameter description

Key Requirement Type Description
token Mandatory String Token that is being sent as a response of Initialize hash signing via mobile id

Request body parameter description

Key Requirement Type Description
access_token Mandatory String API Access Token

Response body parameter description

Successful response

Key Type Description
status String Status of the request, ok in this case
signature_value String Signature value

Failed response

Key Type Description
status String Status of the request, error in this case
message String Brief message about what is wrong
error_code Integer Unique code for the error. Error codes are listed here

Sample request


POST /en/mobile/sign-hash/status/320a35af-19c9-eecd-5f7e-8725393bd955.json HTTP/1.1
Host: app.marksign.local
Content-Type: application/json

{
  "access_token": "52900c96-3f60-5307-3719-5948f0191da6"
}

Sample response

Sample success response


{
  "status": "ok",
  "signature_value": "2lbblqYAovd88pXDVK5FeC2d3hBd4xSoNII21doSIE17UZ+ZpSB9dpi/DqVhTziKrVYZysw5J0gqCEA4tji/Dw=="
}

Sample failed response


{
  "status": "error",
  "message": "Session for given token was not found",
  "error_code": 40402
}

Implementation

CURL


curl --location --request POST 'https://app.marksign.local/en/mobile/sign-hash/status/320a35af-19c9-eecd-5f7e-8725393bd955.json' \
--header 'Content-Type: application/json' \
--data-raw '{
  "access_token": "52900c96-3f60-5307-3719-5948f0191da6"
}'

Using php-client

To use the php-client, please follow the installation and basic usage here, and use AppBundle\GatewaySDKPhp\RequestBuilder\MobileidHashSigningProcessStatusRequestBuilder as request builder.


/**
 * The hashSignToken was found from the response of 'Initialize hash signing via mobile id' request.
 * The following is a dummy to use as example.
 */
$hashSignToken = 'e654322d-9c20-4630-bc26-16e11d8243ff';

$hashSignStatReq = (new MobileidHashSigningProcessStatusRequestBuilder)
  ->withToken($hashSignToken)
  ->createRequest();
$hashSignStatReq = $client->postRequest($hashSignStatReq);
$hashSignStatReqArray = $hashSignStatReq->toArray();
var_dump($hashSignStatReqArray);