Delete a selling plan (soft delete)
LegacyAPI v1 is the older API. It still works and is supported, but new integrations should use API v2. Migrating from v1 to v2
DELETE
/external/preorders/{id}
const url = 'https://app.stoqapp.com/api/v1/external/preorders/example';const options = {method: 'DELETE', headers: {'X-Auth-Token': '<X-Auth-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 https://app.stoqapp.com/api/v1/external/preorders/example \ --header 'X-Auth-Token: <X-Auth-Token>'Soft-delete a preorder selling plan by ID. The plan is discarded (its discarded_at is set) and detached from the storefront, but historical preorder data is preserved. Returns 404 if the plan does not exist and 422 if it could not be deleted.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”id
required
string
Selling plan ID
Header Parameters
Section titled “Header Parameters”X-Auth-Token
required
string
API key for authentication
Responses
Section titled “Responses”Selling plan deleted successfully
Media typeapplication/json
object
success
boolean
message
string
Example
{ "success": true, "message": "Selling plan deleted"}Unauthorized
Selling plan not found
Failed to delete selling plan
Media typeapplication/json
object
error
string
Example generated
{ "error": "example"}Was this page helpful?
Thanks for letting us know.
Still stuck? Ask Quinn or chat with support