Endpoints · My designs
DELETE/v1/projects/{project}
Delete a design from My designs.
What it does
Refused while the design is in the cart (remove it from the cart first) and always once it is ordered. A design the customer made is withdrawn: its emailed link and every designer link to it stop working, and the store's retention removes it for good. A design that joined the account by email is only taken off the list (how: "removed"): it is still the guest's who emailed it.
Send the key: Authorization: Bearer sk_test_… or sk_live_….
curl -X DELETE "https://printwisp.com/v1/projects/dsn_5c2a9e01b7d4f638?customer_ref=wp-user-12" \
-H "Authorization: Bearer $PRINTWISP_KEY"
# 200
{ "deleted": true, "project": "dsn_5c2a9e01b7d4f638", "how": "deleted" }<?php
$ch = curl_init('https://printwisp.com/v1/projects/dsn_5c2a9e01b7d4f638?customer_ref=wp-user-12');
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => 'DELETE',
CURLOPT_HTTPHEADER => ['Authorization: Bearer ' . getenv('PRINTWISP_KEY'), 'Content-Type: application/json'],
]);
$answer = json_decode(curl_exec($ch), true);// Node (your server). The key never reaches a browser.
const r = await fetch('https://printwisp.com/v1/projects/dsn_5c2a9e01b7d4f638?customer_ref=wp-user-12', {
method: 'DELETE',
headers: { Authorization: 'Bearer ' + process.env.PRINTWISP_KEY },
});
const answer = await r.json();import os, requests
r = requests.delete(
"https://printwisp.com/v1/projects/dsn_5c2a9e01b7d4f638?customer_ref=wp-user-12",
headers={"Authorization": f"Bearer {os.environ['PRINTWISP_KEY']}"},
)
answer = r.json()Parameters
| Parameter | Type | Description |
|---|---|---|
project required | string | The design's id (dsn_…) from the list. |
customer_ref required | string ≤ 190 | Your signed-in customer, as you send it to POST /v1/sessions (wp-user-12, shopify-customer-6061…, your own id). |
Response
200 application/json. Deleted (how: deleted or removed).
Errors
| HTTP | error | message |
|---|---|---|
| 401 | unauthorized | Send Authorization: Bearer <secret key>. Keys are made in PrintWisp, on your store's Overview → API keys. |
| 404 | project_not_found | No design with that id for this customer. |
| 409 | project_in_cart | This design is in the cart. Remove it from the cart first, then delete it. |
| 409 | project_ordered | An ordered design is kept as it was printed: it cannot be deleted. |
| 422 | invalid_request | Say whose designs with customer_ref: your signed-in customer's id, as you send it to POST /v1/sessions. |