Delete collection
DELETE
/collections/{handle}
const url = 'https://acme.mykreezalid.com/api/v1/collections/example?by=handle';const options = {method: 'DELETE', headers: {Authorization: 'Basic <credentials>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request DELETE \ --url 'https://acme.mykreezalid.com/api/v1/collections/example?by=handle' \ --header 'Authorization: Basic <credentials>'Delete a collection by its handle
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”handle
required
string
The handle (slug) of the collection to delete, or its id with by=id
Query Parameters
Section titled “Query Parameters”by
string
How the path names the collection: handle (the default, which also finds an integrator’s source handle) or id. A handle may be made of digits only, so an id is never guessed.
Responses
Section titled “Responses”Collection successfully deleted
Media typeapplication/json
object
success
boolean
message
string
Example
{ "success": true, "message": "Collection deleted"}A collection made by a model: detach it first
Media typeapplication/json
Why a collection or collection model request was refused.
object
success
boolean
message
string
errors
The problems found: for a collection, field by field, the rules not met and their messages. Present only when there are some.
Example
{ "success": false, "message": "Collection handle is required"}Collection not found
Media typeapplication/json
Why a collection or collection model request was refused.
object
success
boolean
message
string
errors
The problems found: for a collection, field by field, the rules not met and their messages. Present only when there are some.
Example
{ "success": false, "message": "Collection handle is required"}