Delete a product
const url = 'http://localhost:8891/api/v1/releases/9c3f1a2b-4d5e-4f60-8a71-2b3c4d5e6f70/products/44c8e1f2-3a4b-4c5d-9e60-7f8a9b0c1d2e';const options = { method: 'DELETE', headers: { 'idempotency-key': '3f8a1c62-9d5e-4b7a-8f21-0c4e6b9d2a17', Authorization: 'Bearer <token>' }};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request DELETE \ --url http://localhost:8891/api/v1/releases/9c3f1a2b-4d5e-4f60-8a71-2b3c4d5e6f70/products/44c8e1f2-3a4b-4c5d-9e60-7f8a9b0c1d2e \ --header 'Authorization: Bearer <token>' \ --header 'idempotency-key: 3f8a1c62-9d5e-4b7a-8f21-0c4e6b9d2a17'Give up on a product. An EAN of ours goes back to the pool, so a code a draft took is not spent on a manufacture that never happens: the pool is finite and a create is the only thing that draws from it. A barcode you supplied that was never ours, or one issued to you before you moved to this API, is not ours to reissue and stays recorded against you rather than returning to stock. A code of ours you happened to name on the create is still ours, and it does return. 204 with no body, and a repeat under the same Idempotency-Key answers 204 again rather than 404, because the product is gone precisely because the first call succeeded. 409 with code CONFLICT once the product is locked, and permanently: publishing is what locks it, no route unpublishes one, and the barcode may already be on a printed cover or inside a factory payload, so the code stays spoken for. The same code, and equally final, when the Idempotency-Key was already used for a different request: the key is spent. Two other 409s are transient and each carries its own code, so branch on it and retry as sent: IDEMPOTENCY_IN_FLIGHT when a repeat under the same key lands while the first is still in flight, and EAN_REASSIGNED when the product is moved onto another EAN between this call's read and its lock, which the retry reads settled. The release's track pool is untouched: a tracklist selects from the pool and never owns it, so every track stays and can be listed on another product. The uploads already spent are not reclaimed either, nor the storage the audio and artwork occupy: an upload is single-use, so its id stays spent. 404 on an unknown product, on a product of another release, and on one belonging to another organisation, and which it was is not disclosed. 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-7f8a9b0c1d2eHeader 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.
Responses
Section titled “ Responses ”The product was deleted. A code with source = 'pool' went back to the pool; an external or legacy one stays allocated.
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"}