> For the complete documentation index, see [llms.txt](https://docs.channex.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.channex.io/api-v.1-documentation/rate-plans-collection/delete-rate-plan-api.md).

# Delete Rate Plan API

## Delete a rate plan

> Delete a rate plan by its identifier. A rate plan mapped to a channel is refused with \`422 Unprocessable Entity\` unless \`force=true\` is sent. Rate plans derived from it (those with it as \`parent\_rate\_plan\_id\`) are deleted with it.

```json
{"openapi":"3.1.0","info":{"title":"Channex.io — Public API","version":"0.0.0"},"tags":[{"name":"Rate Plans","description":"Manage Rate Plans — pricing plans of how to sell Room Types: prices per occupancy, rate derivation rules, and per-weekday restriction defaults."}],"servers":[{"url":"https://app.channex.io/api/v1","description":"Production server","variables":{}},{"url":"https://staging.channex.io/api/v1","description":"Staging server","variables":{}}],"security":[{"UserApiKeyAuth":[]}],"components":{"securitySchemes":{"UserApiKeyAuth":{"type":"apiKey","in":"header","name":"user-api-key","description":"API key for programmatic access, sent in the `user-api-key` header."}},"schemas":{"Common.Scalars.id":{"type":"string","format":"uuid"},"Common.JsonApi.SuccessMessage":{"type":"object","required":["meta"],"properties":{"meta":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}},"description":"Success response carrying only a meta message (no resource body)."},"Common.Errors.Unauthorized":{"type":"object","required":["errors"],"properties":{"errors":{"type":"object","required":["code","title"],"properties":{"code":{"type":"string","enum":["unauthorized"]},"title":{"type":"string","enum":["Unauthorized"]}},"description":"Shape of a single JSON:API error object: a stable machine code plus a human-readable title."}},"description":"Authentication credentials are missing or invalid."},"Common.Errors.NotFound":{"type":"object","required":["errors"],"properties":{"errors":{"type":"object","required":["code","title"],"properties":{"code":{"type":"string","enum":["resource_not_found"]},"title":{"type":"string","enum":["Resource Not Found"]}},"description":"Shape of a single JSON:API error object: a stable machine code plus a human-readable title."}},"description":"The requested resource does not exist."},"Common.Errors.InvalidArguments":{"type":"object","required":["errors"],"properties":{"errors":{"$ref":"#/components/schemas/Common.Errors.InvalidArgumentsObject"}},"description":"The request has missing or invalid arguments; `details` lists the messages per argument."},"Common.Errors.InvalidArgumentsObject":{"type":"object","required":["code","title","details"],"properties":{"code":{"type":"string","enum":["bad_request"]},"title":{"type":"string","enum":["Bad Request"]},"details":{"type":"object","unevaluatedProperties":{"type":"array","items":{"type":"string"}},"description":"Maps each invalid argument to the list of validation messages for that argument."}},"description":"Error object for invalid request arguments, adding per-argument messages."},"Common.Errors.ValidationError":{"type":"object","required":["errors"],"properties":{"errors":{"$ref":"#/components/schemas/Common.Errors.ValidationErrorObject"}},"description":"The request body failed validation."},"Common.Errors.ValidationErrorObject":{"type":"object","required":["code","title","details"],"properties":{"code":{"type":"string","enum":["validation_error"]},"title":{"type":"string","enum":["Validation Error"]},"details":{"type":"object","unevaluatedProperties":{"type":"array","items":{"type":"string"}},"description":"Maps each invalid field to the list of validation messages for that field."}},"description":"Error object for a failed validation, adding per-field messages."}}},"paths":{"/rate_plans/{id}":{"delete":{"operationId":"RatePlans_delete","summary":"Delete a rate plan","description":"Delete a rate plan by its identifier. A rate plan mapped to a channel is refused with `422 Unprocessable Entity` unless `force=true` is sent. Rate plans derived from it (those with it as `parent_rate_plan_id`) are deleted with it.","parameters":[{"name":"id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/Common.Scalars.id"}},{"name":"force","in":"query","required":false,"description":"Delete the rate plan even when it is mapped to a channel: the mappings are removed with it and the channel notified. Without it the request fails when channel mappings would be affected. Irreversible: neither the rate plan nor its channel information can be restored.","schema":{"type":"boolean"},"explode":false}],"responses":{"200":{"description":"The request has succeeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Common.JsonApi.SuccessMessage"}}}},"401":{"description":"Authentication credentials are missing or invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Common.Errors.Unauthorized"}}}},"404":{"description":"The requested resource does not exist.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Common.Errors.NotFound"}}}},"422":{"description":"The request has missing or invalid arguments; `details` lists the messages per argument.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/Common.Errors.InvalidArguments"},{"$ref":"#/components/schemas/Common.Errors.ValidationError"}]}}}}},"tags":["Rate Plans"]}}}}
```
