IB Sign POST

Document sign (Get sign token) or authorize client to sign some document

Request MFA code using existing access_token.

Note!!! Before signing the document, you should login Internetbank.

# ENDPOINT
/oauth/v2/sign
# REQUEST BODY
Schema: sign

response_type = sign_token - is a constatnt for request
state = [ session security value ]
scope = CUSTOMER:PAYMENT:CREATE - (customer action scope one of the list from scopeEnum)
audience = [api call url]
nonce = base64 encoded request boby of document

Type: object
Variable Name Type Format Usage Description
audience Audience string M API call URL for saving the signed document
client_code client_code string Unique customer ID in external system
nonce Nonce string M Base64 encoded request body (data field) of document
response_type Response Type string M Indicates that your server expects to receive an authorization code. Values: "access_token","code","sign_token"
scope Scope of Access string M Scope of access
source_system Source system string Source system. For Internetbank please setup "IB"
state State string M Client server session id (to prevent MITM requests)
# REQUEST BODY EXAMPLE
							{
    "response_type":"sign_token",
    "state":"5e982a097260d146803b5da13b1a19c2",
    "scope":"CUSTOMER:PAYMENT:CREATE",
    "audience":"https:\/\/api.n0.elcoin.co.uk\/api\/model\/paymentOutward\/putDb",
    "nonce":"eyJpZCI6IjYxNCIsInV1aWQiOiI2OWQ0Y2ZkYy05YmIyLTQyOWItODM1OS1kZmYzMDBjYjAyMjIiLCJjbGllbnRfY29kZSI6IkVOMDAwMDBDWSIsImRvY3VtZW50SWRQYXJlbnQiOiIwIiwicGFja2FnZUlkIjo1NjcsInRlbXBsYXRlSWQiOiIwIiwiYWJzSWQiOiIwIiwiZG9jdW1lbnRUeXBlIjoiSU5URVJOQUwiLCJzdGF0dXMiOiJSRUFEWV9GT1JfU0lHTiIsImNyZWF0ZURhdGUiOiIyMVwvMDdcLzIwMjEgMTI6MjAiLCJtb2RpZnlEYXRlIjoiMjFcLzA3XC8yMDIxIDEyOjIwIiwibW9kaWZpZWQiOiIyMVwvMDdcLzIwMjEgMTI6MjAiLCJkb2N1bWVudCI6eyJzY29wZSI6InBheW1lbnQiLCJsYWJlbCI6IkJhbmsgaW50ZXJuYWwgcGF5bWVudCIsImljb24iOiJpY29uLWhvbWUiLCJmb3J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WdpbmFsX3JlZmVyZW5jZSI6IiIsInRyYW5zYWN0aW9uX3R5cGUiOiIiLCJkb2N1bWVudF90eXBlIjoiSU5URVJOQUwiLCJvbGRfcHJvY2Vzc2luZ19zdGF0dXMiOiIiLCJvbGRfcHJvY2Vzc2luZ19zdGVwIjoiIiwicHJvY2Vzc2luZ19zdGVwIjoiTk9STUFMIiwicHJvY2Vzc2luZ19zdGF0dXMiOiJQUkVQQVJFIiwidWlkIjoiIiwiaWQiOjAsInZlcnNpb24iOjAsInN0YXRlIjowLCJjcmVhdGVfdXNlciI6IiIsImNyZWF0ZV9kYXRlIjpudWxsLCJtb2RpZnlfdXNlciI6IiIsIm1vZGlmeV9kYXRlIjpudWxsfX0=",
    "client_code":"EN00000CY"
}						
# POSITIVE RESPONSE

200 - Response successfully when status is OK

200 - Response successfully when status is OK

Schema: HeaderResponseStatusOkSign
Type: application/json
Variable Name Type Format Description
error Error Code string Error code
error_description Error Description string Description of error
expires_in expires_in string expiration time
mfa_token MFA Token string Multi-factor authentication token
sign_token Sign Token string Sign token
code Verification code integer The verification code that was sent to the MFA device
# RESPONSE POSITIVE EXAMPLE
							{
"sign_token":"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiIsImN0eSI6IiJ9.eyJpc3MiOiJodHRwczpcL1wvYXBpLm4wLmVsY29pbi5jby51a1wvIiwic3ViIjoiRU4wMDAwMENZIiwiYWN0Ijp7InN1YiI6IkVOMDAwMDBDWSJ9LCJleHAiOjE2MjY4NTU4NTAsImp0aSI6ImI0OTFlZmVhLWJiZWEtMmViYi04MzE0LTMxZjNiMDQ0MmYxMSIsInNpZCI6ImI0OTFlZmVhLWJiZWEtMmViYi04MzE0LTI4ZjNiMDFiZjg4MyIsImFtciI6Im9vYjplbWFpbDpiKjFAZ21haWwuY29tIiwiY2xpZW50X2lkIjoiaWJfbG9jYWxob3N0Iiwic2NvcGUiOiJtZmFfdG9rZW46ODI3NyIsInRva2VuX3R5cGUiOiJiZWFyZXIiLCJleHBpcmVzIjoiMjAyMS0wNy0yMVQwODoyNDoxMC4wMDAtMDA6MDAiLCJpc3N1ZWRfYXQiOiIxOTcwLTAxLTAxVDAwOjAwOjAwLjAwMC0wMDowMCJ9.ptuPZcZ7Sujf68JWTu8jtiFqf5Za6B1qRDo0GdbwgL0",
   "expires_in":1800
}
OR (if MFA requiered)
{
    "mfa_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiIsImN0eSI6IiJ9.eyJpc3MiOiJodHRwczpcL1wvYXBpLm4wLmVsY29pbi5jby51a1wvIiwic3ViIjoiRU4wMDAwMENZIiwiYWN0Ijp7InN1YiI6IkVOMDAwMDBDWSJ9LCJleHAiOjE2MjY5NjMyNTUsImp0aSI6ImNiMDk1ZmI4LWE5NzUtODQ5My04NDE0LWJhMDZhOGM2NjM3ZiIsInNpZCI6ImNiMDk1ZmI4LWE5NzUtODQ5My04NDE0LWJhMDY5MGVlNWQ3ZiIsImFtciI6Im9vYjplbWFpbDpiKjFAZ21haWwuY29tIiwiY2xpZW50X2lkIjoiaWJfbG9jYWxob3N0Iiwic2NvcGUiOiJtZmFfdG9rZW46ODMzMCIsInRva2VuX3R5cGUiOiJiZWFyZXIiLCJleHBpcmVzIjoiMjAyMS0wNy0yMlQxNDoxNDoxNS4wMDAtMDA6MDAiLCJpc3N1ZWRfYXQiOiIxOTcwLTAxLTAxVDAwOjAwOjAwLjAwMC0wMDowMCJ9.k1kKlu4N5xRnv5E2psNCt7hMoQRIo7zPHi8NeOBRD2E",
    "code": "8330",
    "error": "mfa_code_required",
    "error_description": "Please confirm challenge with sent code"
}						
# NEGATIVE RESPONSE

400 - Response with error when status is ERROR

400 - Response with error when status is ERROR

Schema: HeaderResponseStatusErrorOAuth
Type: object
Variable Name Type Format Description
error_description Error Description string Description of error
error Error Code string Error code
# RESPONSE NEGATIVE EXAMPLE
							{
    "error": "invalid-authorization-token",
    "error_description": "Unknown error. The resource owner or authorization server denied the request."
}