Getting started
API reference
How-tos
Search…
Getting started
Welcome to Commerce Layer
API specification
Authentication
Roles and permissions
Fetching resources
Fetching relationships
Including associations
Sparse fieldsets
Sorting results
Pagination
Filtering data
Creating resources
Updating resources
Deleting resources
Importing resources
External resources
Handling errors
Real-time webhooks
Callbacks security
Deleting resources
How to delete a resource via API
You can delete a resource by sending a
DELETE
request to the resource endpoint.
Authentication
Example
Request
Response
The following request deletes the resource identified by the ID "xYZkjABcde":
1
curl
-
g
-
X
DELETE
\
2
'https://yourdomain.commercelayer.io/api/skus/xYZkjABcde'
\
3
-
H
'Accept: application/vnd.api+json'
\
4
-
H
'Authorization: Bearer your-access-token'
Copied!
On success, the API responds with a
204 No Content
status code.
Previous
Updating resources
Next
Importing resources
Last modified
6mo ago
Copy link
Contents
Example