Delete Cost Rate

Delete a cost rate by UUID within the current mandant. This performs a cascade delete, removing all associated schedules, intervals, and versions. On success, the response confirms the deletion.

Request

  • Method: DELETE

  • Path: /api/dynamic_pricing/cost_rate/{uuid}

Path parameters

Name

Type

Description

uuid

string

Cost rate UUID to delete.

Example request

curl --location --request DELETE 'https://example.beenergised.cloud/api/dynamic_pricing/cost_rate/<COST_RATE_UUID>' \
--header 'x-api-token: <your_token>'

Response (200)

{
  "status": "ok",
  "message": "Cost rate deleted successfully"
}

Error responses

  • 404: Cost rate not found.

{
  "status": "error",
  "message": "Cost rate not found"
}
  • 400: Cost rate cannot be deleted (e.g., it is still referenced by active rate schedules).

{
  "status": "error",
  "message": "Cost rate cannot be deleted"
}
  • 500: Generic server error.

{
  "status": "error",
  "message": "Internal Server Error"
}