Web API callbacks: Difference between revisions

From SafeStamper API documentation
Jump to navigation Jump to search
api>Admin
No edit summary
 
m 1 revision imported
 
(No difference)

Latest revision as of 06:27, 17 October 2023

When starting a certification job with web/stamp you can provide a callback URL.

Once the certification job is finished, the callback URL will receive a POST call with the same JSON object as returned in the web/status operation.

To authenticate the callback, the JSON object HMAC-SHA1 will be calculated using the API client private key and will be provided as a query string signature parameter.

NOTE: These callbacks are independent from the API callbacks sent to the callback URL associated to your API client.

Example

Line breaks have been included in this example content for legibility, but actual callbacks include the whole JSON in a single line.

POST /stamper-callback?signature=743ae4504eb41cbfe2d2e72dac76a27613333a53 HTTP/1.1
Host: example.com
Content-Type: application/json
Content-Length: 377

{
   "jobId":"c498d3e0-aedb-48fe-82d5-5dec4270318b",
   "results":[
      {"url":"http://www.safestamper.com","status":"READY","certificateId":"160419-BQS763","certificateUrl":"https://arena-web.safestamper.com/certificate/160419-BQS763"},
      {"url":"NON-VALID-URL","status":"ERROR","error":"bad-url"},
      {"url":"http://www.safecreative.org","status":"READY","certificateId":"160419-2LYD3K","certificateUrl":"https://arena-web.safestamper.com/certificate/160419-2LYD3K"}
   ]
}