Delete an organization location
const url = 'https://apisandbox.puurk.com/organizations/example/locations/example';const options = {method: 'DELETE', headers: {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 https://apisandbox.puurk.com/organizations/example/locations/example \ --header 'Authorization: Bearer <token>'Deletes a location. The primary location cannot be deleted while other locations exist, because an organization with no primary silently fails onboarding.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Organization ID
Location ID
Responses
Section titled “Responses”Location deleted
Unauthorized
forbidden — the token lacks the delete action on organizations for this organization. Scope is checked before existence, so an unauthorized caller gets this rather than a 404.
The standard error body. error is a stable, machine-readable code — branch on it rather than on message, which is for humans and may change.
object
Machine-readable error code.
Human-readable detail.
Example
{ "error": "merchant_account_missing", "message": "The organization has no merchant account. Complete Stripe Connect onboarding for this organization before generating pricing."}not_found — the organization or location does not exist.
The standard error body. error is a stable, machine-readable code — branch on it rather than on message, which is for humans and may change.
object
Machine-readable error code.
Human-readable detail.
Example
{ "error": "merchant_account_missing", "message": "The organization has no merchant account. Complete Stripe Connect onboarding for this organization before generating pricing."}conflict — the primary location cannot be deleted while others exist. Promote another location first.
The standard error body. error is a stable, machine-readable code — branch on it rather than on message, which is for humans and may change.
object
Machine-readable error code.
Human-readable detail.
Example
{ "error": "merchant_account_missing", "message": "The organization has no merchant account. Complete Stripe Connect onboarding for this organization before generating pricing."}