Documents

SignBox API related to a documents signatures.

Verb Endpoint Action
GET /api/echo Replies back what receive.
GET /api/job/{id} Get the state of a job by its id.
GET /api/result/{id} Get the result of a job
POST /api/sign Sign a local or a remote hosted file.

Echo

Replies back what receive.

Path Parameters:
Param Description
message The message to reply back

            /api/echo
            

            GET
            
Response

Returns the string received.

Example

This endpoint is useful just for test purpose. In this example we send the string HelloWorld, and then retrieve we same string as response.

Example in curl:

            curl -X GET https://signbox.uanataca.com/api/echo?message=HelloWorld
            
Response:

            HelloWorld
            

Job

Get the state of a job by its id.

Path Parameters:
Param Description
id The job id

            /api/job/{id}
            

            GET
            
Response

Returns the state and type of the job specified.

One minute after it is generated, the job is no longer available.

Example

Getting the state of the job number 22.4 that is a signature job.

Example in curl:

            curl -X GET https://signbox.uanataca.com/api/job/22.4
            
Response:

            state=done&type=sign
            

Result

Get the result of a job

Path Parameters:
Param Description
id The job id

            /api/result/{id}
            

            GET
            
Response

Returns the data requested. If the job is of type "sign", returns the document signed.

Example
Example in curl:

            curl -X GET https://signbox.uanataca.com/api/result/21.4
            

Generate Otp

Generate a new otp for the specified remote identity.

Body Parameters:
Parameter Description Required
username Digital identity username Yes
password Digital identity password Yes
uses It represents the number of uses for the generated otp No
env Specify the reference environment. This can be "prod", test or sac. No

            /api/generate_otp
            

            POST
            
Response

Returns 'Ok' if the generated otp is successfully sent.

Example
Example in curl:

            curl -X POST https://signbox.uanataca.com/api/generate_otp -F "username=9001030" -F "password=2ny.Xh78" -F "uses=10"
            
Response:

            Ok
            

Sign

Sign a local or a remote hosted file.

Body Parameters:
Parameter Description Required
username Digital identity username Yes
password Digital identity password Yes
pin Digital identity pin Yes
billing_username Username of the billing account Yes
billing_password Password of the billing account Yes
env Specify the reference environment. This can be "prod", test or sac. No
file_in Local path where to get the document to sign. If this parameter is specified, then the url_in parameter must not be in the request. Yes
url_in Url where to get the document to sign. If this parameter is specified, then the file_in parameter must not be in the request. Yes
url_out Url where to send signed document. Note that if this parameter is specified, the "result" method for the job generated by this endpoint, is not available but the result is directly sent to the value of this parameter. No
urlback Url where to send signing process report No
format The sign format. This can assume the values: pades (the default), cades or xades No
level Specify the level of the signature. The allowed values are: BES, T, LTV for pades; BES, T, EPES for cades; BES, T, EPES, XL for xades; No
otp This parameter is necessary when using a qualified remote identity. It represents the otp secret generated with the endpoint generate_otp. No

            /api/sign
            

            POST
            
Response

Returns the job id.

Example
Example in curl:

            curl -X POST https://signbox.uanataca.com/api/sign -F "file_in=@test.pdf" -F "username=9001030" -F "password=2ny.Xh78" -F "pin=s1gn3npin"
            
Response:

            id=14.1