|  |  | 
| Line 9: | Line 9: | 
|  | 
 |  | 
 | 
|  | All operations return their results in JSON format. |  | All operations return their results in JSON format. | 
|  | 
 |  | 
|  | == Stamp ==
 |  | 
|  | 
 |  | 
|  | Launches the certification of a single web page.
 |  | 
|  | 
 |  | 
|  | === URL === 
 |  | 
|  | <nowiki>https://web.safestamper.com/api/stamp</nowiki>
 |  | 
|  | 
 |  | 
|  | === Parameters === 
 |  | 
|  | * '''sharedkey''': Your API client shared key
 |  | 
|  | * '''url''': The URL you want to certificate
 |  | 
|  | * '''signature''': Parameters signature, as explained in [[#Parameters signature]]
 |  | 
|  | 
 |  | 
|  | === Returns ===
 |  | 
|  | A job identifier that can be used to check the status of the operation with [[#Status]].
 |  | 
|  | It returns the identifier between double quotes, in order to be a valid JSON. 
 |  | 
|  | 
 |  | 
|  | === HTTP Errors ===
 |  | 
|  | 
 |  | 
|  | * '''403''' Forbidden, the sharedkey or signature are not valid
 |  | 
|  | * '''400''' Bad request, the URL is not valid
 |  | 
|  | * '''429''' Your Safe Stamper user has no certification credits available
 |  | 
|  | * '''430''' Your Safe Stamper user has no storage space available
 |  | 
|  | 
 |  | 
|  | === Example ===
 |  | 
|  | 
 |  | 
|  | <pre>
 |  | 
|  | https://web.safestamper.com/api/stamp
 |  | 
|  | </pre>
 |  | 
|  | 
 |  | 
|  | == Status ==
 |  | 
|  | 
 |  | 
|  | This operation returns the status of a certification job.
 |  | 
|  | 
 |  | 
|  | === URL === 
 |  | 
|  | <nowiki>https://web.safestamper.com/api/status/<JOB_ID></nowiki>
 |  | 
|  | 
 |  | 
|  | ''<JOB_ID>'' is the job identifier returned by the [[#stamp]] operation.
 |  | 
|  | 
 |  | 
|  | === Returns ===
 |  | 
|  | 
 |  | 
|  | A JSON object with the following fields:
 |  | 
|  | 
 |  | 
|  | * '''status''' Job status:
 |  | 
|  | ** ''UNKNOWN'' The job id is not correct
 |  | 
|  | ** ''PROCESSING'' The web page certification is in progress
 |  | 
|  | ** ''ERROR'' There was an error certificating the web page
 |  | 
|  | ** ''READY'' The web page has been successfully certificated
 |  | 
|  | 
 |  | 
|  | Depending on the job status, additional fields may be returned:
 |  | 
|  | 
 |  | 
|  | For ''PROCESSING'' status:
 |  | 
|  | * ''progress'' Job progress as a completion percentage
 |  | 
|  | 
 |  | 
|  | For ''ERROR'' status:
 |  | 
|  | * ''error'' Error description
 |  | 
|  | 
 |  | 
|  | For ''READY'' status:
 |  | 
|  | * ''id'' Certificate ID
 |  | 
|  | * ''url'' Certificate download URL
 |  | 
|  | 
 |  | 
|  | == Example ==
 |  | 
API keys
To use Safe Stamper Web through API, you need a pair of keys: 
- A shared key that identifies your client application
- A private key used for signing your requests
To get your pair of API keys, you can contact us through  https://www.safestamper.com/contact
API operations
All operations return their results in JSON format.