Skip to content

Delete an organization location

DELETE
/organizations/{oid}/locations/{lid}
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.

oid
required
string

Organization ID

lid
required
string

Location ID

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.

Media typeapplication/json

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
error

Machine-readable error code.

string
message

Human-readable detail.

string
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.

Media typeapplication/json

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
error

Machine-readable error code.

string
message

Human-readable detail.

string
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.

Media typeapplication/json

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
error

Machine-readable error code.

string
message

Human-readable detail.

string
Example
{
"error": "merchant_account_missing",
"message": "The organization has no merchant account. Complete Stripe Connect onboarding for this organization before generating pricing."
}