How to: Register a work via URL

From Safe Creative API
Jump to navigation Jump to search
Process diagram of a work registration by URL

You can register a work simply providing an URL where the work can be downloaded from.

You must know the file size and its SHA-1 checksum so that Safe Creative can validate that the downloaded file is correct.

Files registered by URL are not immediately registered, but are enqueued for download and remain in PROCESSING state until the work has been successfully downloaded and registered.

Get a nonce key

You need the nonce key before calling work.register. Use authkey.state to get it.



<?xml version="1.0" encoding="UTF-8"?>

Register the work

To register the work you must simply call work.register with the appropiate parameters:

  • url: URL address where the work will be downloaded from
  • checksum: SHA-1 hash of the work contents
  • size: File size in bytes



<?xml version="1.0" encoding="UTF-8"?>


As stated above, work will stay in PROCESSING state until correctly downloaded. Your application will be sent a callback when download has been finished or if the work could not be downloaded.

Download successful

If the work could be downloaded, it will pass to PREREGISTERED or REGISTERED state (depending on whether it was registered with parameter final=1 or not).

In that case, your application will receive a workstate callback

{your callback URL}

Download failure

If the work could not be downloaded, or its size or checksum do not match those provided on work.register, you will receive a workdownload callback.

{your callback URL}