Skip to content

Delete product by ID

DELETE
/v1/products/{product_id}
curl --request DELETE \
--url https://api.loyx.se/partners/v1/products/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0 \
--header 'Authorization: Bearer <token>'

Soft-delete a product. The product is marked as deleted but not permanently removed.

product_id
required
Product Id

The product’s internal UUID.

string format: uuid

The product’s internal UUID.

Product deleted successfully.

missing_token, invalid_authorization_header or invalid_token: get a new access token and retry once.

Media typeapplication/json
ErrorResponse

Standard error response format.

object
error
required
ErrorDetail

Error detail structure (Stripe-like format).

object
code
required
Code

Machine-readable error code

string
details
Any of:
Array<object>
FieldErrorDetail

One failing field of a validation error.

object
message
required
Message

Why the value was refused

string
param
required
Param

Dotted path of the field, e.g. items.0.unit_price.value

string
doc_url
Any of:
string
message
required
Message

Human-readable error message

string
param
Any of:
string
type
required
Type

Error type category

string
request_id
Any of:
string

Example generated

{
"error": {
"code": "example",
"details": [
{
"message": "example",
"param": "example"
}
],
"doc_url": "example",
"message": "example",
"param": "example",
"type": "example"
},
"request_id": "example"
}

insufficient_scope: the API key lacks the scope this route needs.

Media typeapplication/json
ErrorResponse

Standard error response format.

object
error
required
ErrorDetail

Error detail structure (Stripe-like format).

object
code
required
Code

Machine-readable error code

string
details
Any of:
Array<object>
FieldErrorDetail

One failing field of a validation error.

object
message
required
Message

Why the value was refused

string
param
required
Param

Dotted path of the field, e.g. items.0.unit_price.value

string
doc_url
Any of:
string
message
required
Message

Human-readable error message

string
param
Any of:
string
type
required
Type

Error type category

string
request_id
Any of:
string

Example generated

{
"error": {
"code": "example",
"details": [
{
"message": "example",
"param": "example"
}
],
"doc_url": "example",
"message": "example",
"param": "example",
"type": "example"
},
"request_id": "example"
}

Product not found.

Media typeapplication/json
ErrorResponse

Standard error response format.

object
error
required
ErrorDetail

Error detail structure (Stripe-like format).

object
code
required
Code

Machine-readable error code

string
details
Any of:
Array<object>
FieldErrorDetail

One failing field of a validation error.

object
message
required
Message

Why the value was refused

string
param
required
Param

Dotted path of the field, e.g. items.0.unit_price.value

string
doc_url
Any of:
string
message
required
Message

Human-readable error message

string
param
Any of:
string
type
required
Type

Error type category

string
request_id
Any of:
string

Example generated

{
"error": {
"code": "example",
"details": [
{
"message": "example",
"param": "example"
}
],
"doc_url": "example",
"message": "example",
"param": "example",
"type": "example"
},
"request_id": "example"
}

Validation Error

Media typeapplication/json
ErrorResponse

Standard error response format.

object
error
required
ErrorDetail

Error detail structure (Stripe-like format).

object
code
required
Code

Machine-readable error code

string
details
Any of:
Array<object>
FieldErrorDetail

One failing field of a validation error.

object
message
required
Message

Why the value was refused

string
param
required
Param

Dotted path of the field, e.g. items.0.unit_price.value

string
doc_url
Any of:
string
message
required
Message

Human-readable error message

string
param
Any of:
string
type
required
Type

Error type category

string
request_id
Any of:
string

Example generated

{
"error": {
"code": "example",
"details": [
{
"message": "example",
"param": "example"
}
],
"doc_url": "example",
"message": "example",
"param": "example",
"type": "example"
},
"request_id": "example"
}

rate_limit_exceeded: wait Retry-After seconds.

Media typeapplication/json
ErrorResponse

Standard error response format.

object
error
required
ErrorDetail

Error detail structure (Stripe-like format).

object
code
required
Code

Machine-readable error code

string
details
Any of:
Array<object>
FieldErrorDetail

One failing field of a validation error.

object
message
required
Message

Why the value was refused

string
param
required
Param

Dotted path of the field, e.g. items.0.unit_price.value

string
doc_url
Any of:
string
message
required
Message

Human-readable error message

string
param
Any of:
string
type
required
Type

Error type category

string
request_id
Any of:
string

Example generated

{
"error": {
"code": "example",
"details": [
{
"message": "example",
"param": "example"
}
],
"doc_url": "example",
"message": "example",
"param": "example",
"type": "example"
},
"request_id": "example"
}

internal_server_error or database_error (type internal_error): our fault. Retry with backoff; quote request_id.

Media typeapplication/json
ErrorResponse

Standard error response format.

object
error
required
ErrorDetail

Error detail structure (Stripe-like format).

object
code
required
Code

Machine-readable error code

string
details
Any of:
Array<object>
FieldErrorDetail

One failing field of a validation error.

object
message
required
Message

Why the value was refused

string
param
required
Param

Dotted path of the field, e.g. items.0.unit_price.value

string
doc_url
Any of:
string
message
required
Message

Human-readable error message

string
param
Any of:
string
type
required
Type

Error type category

string
request_id
Any of:
string

Example generated

{
"error": {
"code": "example",
"details": [
{
"message": "example",
"param": "example"
}
],
"doc_url": "example",
"message": "example",
"param": "example",
"type": "example"
},
"request_id": "example"
}