Get the contract certificate

In the previous call, we returned a series of clauses to show to the user. In this call, you can tell us that you accept these clauses. We will pass these choices to the Certification Authority, which will issue a certificate that will serve to digitally sign the contract.

Don't worry, we'll take care of managing the certificate and authority, so you can focus on writing the code that will add value to your platform 😊

Once this call is made, the user will receive a confirmation code on the mobile phone number provided (called OTP, which stands for One Time Password). This code will be used to confirm the signature, in the subsequent API call.

Request

Endpoint

Sandbox: https://api.sandbox.soisy.it/api/shops/{shopId}/requests/{fiscalCode}/request-signature-certificate
Production: https://api.soisy.it/api/shops/{shopId}/requests/{fiscalCode}/request-signature-certificate

Accepted methods

POST

Authentication

This API requires authentication via shopId and headerX-Auth-Token.

Prerequisites

To access this endpoint, you must have requested the terms of the contract.

Parameters

Parameter Required Type Format Description
clauses Yes Purpose The clauses accepted by the user. See example.

With the request, you will have to send all the clauses recovered with the previous call. The value true indicates that the customer has accepted the various clauses.

{
    "clauses": {
        "termAndCondition": true,
        "misleadingClaims": true,
    }
}

Response

The API returns a JSON object containing a list of contracts to sign. Each contract contains a list of clauses that the customer must expressly accept.

The clauses returned by this API must be explicitly sent, with a value of true, in the next call, Sign the contract.

HTTP Error codes

Code Description
201 Resource created
400 Syntax or domain error
403 The request could not be authenticated
500 System error

Valid response

{
    "contracts": [
        {
             "contractId": "ABC-1234-DEF",
             "type": "soisy",
             "version": "v4",
             "clauses": {
                 "termsAndConditions": "Termini e condizioni",
                 "privacyPolicy": "Privacy Policy",
                 "sddStatement": "SDD Statement",
             }
        }
    ]
}

Error response

The JSON object returned in the event of an error varies depending on the HTTP response code.

Error 400

The description of the message error will change depending on the error generated by the Certification Authority.

 {
     "errors": {
         "domain": [
             {message}
         ]
      }
 }

Error 403

The request sent contains invalid credentials. Check the shopId and the X-Auth-Token header. Find more info on credentials in the paragraph about authentication.

 {
     "errors": {
         "domain": [
             "The user has no access to this resource"
         ]
      }
 }

Error 500

Replies with this HTTP code indicate that a system error has occurred.

{
    "errors": {
        "system": [
            {message}
        ]
    }
}