Hides an existing work-performed record. The row stays in the database and is excluded from WorkPerformed.GetByStop. Use this to correct a mistaken entry without changing unrelated records.
Try it in Swagger
Endpoint
- Method:
DELETE
- Route:
WorkPerformed/{id}
- Authentication:
Authorize
Request Schema
| Header |
Required |
Notes |
X-Api-Key |
Required when tenant is not resolved by subdomain |
Resolves the tenant/customer database. |
Authorization: Bearer {token} |
Required for authorized endpoints |
Get a token from Auth/Token, Session/Create, or Employee/SignIn. |
Route Parameters
| Field |
Type |
Required |
Notes |
id |
int |
Yes |
Work-performed identifier returned by WorkPerformed.Add (CWorkOrderWorkPerformed.LineItem). |
This endpoint does not accept a JSON request body.
Expected Response Schema
Status Codes
| Status |
Notes |
200 OK |
The record was hidden. |
400 Bad Request |
Missing or invalid id. Returns a ProblemDetails with errorCode ValidationError. |
404 Not Found |
The record does not exist or is already hidden. Returns a ProblemDetails with errorCode NotFound. |
503 Service Unavailable |
The tenant database does not have CWorkOrderWorkPerformed, or the API SQL login cannot SELECT/UPDATE it. Other API endpoints are unaffected. Returns a ProblemDetails with errorCode WorkPerformedNotEnabled. |
Success Body
Response type: WorkPerformedRemovedDto
| Field |
Type |
Notes |
id |
int |
Hidden work-performed identifier. |
removed |
bool |
Always true on success. |
Response Sample
{
"id": 1182,
"removed": true
}
Error Body
{
"title": "Validation failed.",
"status": 400,
"detail": "Work performed id is required.",
"errorCode": "ValidationError"
}
{
"title": "Resource not found.",
"status": 404,
"detail": "Work performed record not found.",
"errorCode": "NotFound"
}
{
"title": "Work performed is not available.",
"status": 503,
"detail": "Work performed is not enabled for this tenant. The CWorkOrderWorkPerformed table has not been created.",
"errorCode": "WorkPerformedNotEnabled"
}