Refresh or replace the artwork upload
const url = 'http://localhost:8891/api/v1/releases/9c3f1a2b-4d5e-4f60-8a71-2b3c4d5e6f70/products/44c8e1f2-3a4b-4c5d-9e60-7f8a9b0c1d2e/artwork/1c2a3b4c-5d6e-4f70-8981-0a1b2c3d4e5f/upload';const options = { method: 'POST', headers: { 'idempotency-key': '3f8a1c62-9d5e-4b7a-8f21-0c4e6b9d2a17', Authorization: 'Bearer <token>', 'Content-Type': 'application/json' }, body: '{"filename":"cover.pdf","content_type":"application/pdf","byte_size":19203344,"checksum_sha256":"2c4e6a8b0d2f4a6c8e0b2d4f6a8c0e2b4d6f8a0c2e4b6d8f0a2c4e6b8d0f2a4c"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url http://localhost:8891/api/v1/releases/9c3f1a2b-4d5e-4f60-8a71-2b3c4d5e6f70/products/44c8e1f2-3a4b-4c5d-9e60-7f8a9b0c1d2e/artwork/1c2a3b4c-5d6e-4f70-8981-0a1b2c3d4e5f/upload \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --header 'idempotency-key: 3f8a1c62-9d5e-4b7a-8f21-0c4e6b9d2a17' \ --data '{ "filename": "cover.pdf", "content_type": "application/pdf", "byte_size": 19203344, "checksum_sha256": "2c4e6a8b0d2f4a6c8e0b2d4f6a8c0e2b4d6f8a0c2e4b6d8f0a2c4e6b8d0f2a4c" }'A fresh upload target for an artwork record that already exists, either because the last URL lapsed or because you are replacing the file. Works on a generated record too, which is the other way to supply a part you did not send at create. An omitted filename leaves the one on the record. source_image_id names the release artwork pool image the file was made from; omitted, the record has none, since a new file replaces the source along with it. The product's artwork_method applies here exactly as it does at create. 404 on an unknown artwork record; 409 once the product has left draft and its artwork is locked — generated parts included; 422 on a part that cannot be uploaded to under the product's method — the composed spine, or a record named in the other method's vocabulary (or in the printed-sheet one) — on a file of the kind that method does not take, and on a source_image_id that is not in this release's pool. The body is strict: a key this operation does not define is a 400 naming it, not a declaration about the file that nothing would enforce. Requires the catalogue:write scope. Full flow: see the minimal path guide.
Authorizations
Section titled “Authorizations”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters”Example
9c3f1a2b-4d5e-4f60-8a71-2b3c4d5e6f70Example
44c8e1f2-3a4b-4c5d-9e60-7f8a9b0c1d2eExample
1c2a3b4c-5d6e-4f70-8981-0a1b2c3d4e5fHeader Parameters
Section titled “Header Parameters”Example
3f8a1c62-9d5e-4b7a-8f21-0c4e6b9d2a17Unique key for this write. Retrying with the same key replays the first response instead of creating a duplicate; reusing it for a different body is a 409. Keys are scoped to the operation, so the same key may also be sent to a different endpoint.
Request Bodyrequired
Section titled “Request Bodyrequired”object
Hex SHA-256 of the exact bytes you will PUT. Any other bytes are refused: by storage when upload.headers carries it as x-amz-checksum-sha256, otherwise by the ingest. Produce it with shasum -a 256 <file>.
The release artwork pool image this file was made from, such as the photo a face was cropped from. It must be in this release's pool, in any status. Omitted, the record has none: a file sent without it replaces the source along with the file.
Example
{ "filename": "cover.pdf", "content_type": "application/pdf", "byte_size": 19203344, "checksum_sha256": "2c4e6a8b0d2f4a6c8e0b2d4f6a8c0e2b4d6f8a0c2e4b6d8f0a2c4e6b8d0f2a4c"}Responses
Section titled “ Responses ”Default Response
object
object
object
Example
{ "upload": { "url": "https://uploads.staging.elasticstage.com/uploads/upl_7a1e…?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Signature=…", "method": "PUT", "headers": { "Content-Type": "image/jpeg", "x-amz-checksum-sha256": "LE5qiw0vSmyOCy1PaowOK01vigwuS22PCixOa40PKkw=" }, "expires_at": "2026-07-29T23:00:00Z" }}Default Response
object
Example
{ "code": "VALIDATION_ERROR"}Default Response
object
Example
{ "code": "VALIDATION_ERROR"}Default Response
object
Example
{ "code": "VALIDATION_ERROR"}Default Response
object
Example
{ "code": "VALIDATION_ERROR"}Default Response
object
Example
{ "code": "VALIDATION_ERROR"}Default Response
object
Example
{ "code": "VALIDATION_ERROR"}Default Response
object
Example
{ "code": "VALIDATION_ERROR"}Default Response
object
Example
{ "code": "VALIDATION_ERROR"}Default Response
object
Example
{ "code": "VALIDATION_ERROR"}