Skip to main content

Disconnect Product

Remove the link between a course and an Easycart product. The Easycart product stays. The change is live immediately, including on a published course. Disconnecting the last product makes a published course free. A later update or disconnect of that product returns 404.

Request​

DELETE /players/{playerId}/products/{productId}

Path Parameters​

ParameterTypeRequiredDescription
playerIdstringYesCourse UUID. See Identifiers.
productIdstringYesEasycart product UUID

Request Body​

No body. Do not send draft_version.

Example Request​

curl -X DELETE "https://app.easy.tools/api/v1/players/8f3c1a62-d047-4e89-9b25-1c6a4d8e0f71/products/2f1c0a2e-7b3d-4e1a-9c55-0a1b2c3d4e5f" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Accept: application/json"

Response​

Success Response (204)​

No response body, no preview_url, and no draft_version.

Error Responses​

Not Found Error (404)​

The course is missing or not a UUID, productId is not a UUID, or the product resolves in Easycart and is not linked to the course. See Identifiers.

{
"error": {
"code": "RESOURCE_NOT_FOUND",
"message": "Resource not found"
}
}

Validation Error (422 Unprocessable Entity)​

A product UUID that Easycart does not resolve is 422. A row with missing true has no product UUID, so it cannot be disconnected. A workspace that is not connected to an Easycart store is 422. Nothing is saved.

{
"error": {
"code": "VALIDATION_ERROR",
"message": "The given data was invalid",
"details": {
"product_id": ["product_id is not a product in this workspace"]
}
}
}

Bad Gateway Error (502)​

Easycart answered, but not with a result the API can use. Nothing is saved.

{
"error": {
"code": "UPSTREAM_ERROR",
"message": "EasyCart rejected the request"
}
}

Service Unavailable Error (503)​

Easycart is unreachable or failing. Nothing is saved. Retry later.

{
"error": {
"code": "SERVICE_UNAVAILABLE",
"message": "EasyCart is unavailable"
}
}

Authentication, permission, and rate-limit errors are described in Authorization.