---
title: "Revoke a Model"
method: POST
path: "/optimization.modelrevoke/{typedId}"
tags: ["Optimization"]
---

# Revoke a Model

`POST /optimization.modelrevoke/{typedId}`

Revokes a model with a workflow so it can be deleted afterward. Only models with the workflow status = `APPROVED` or `NO_APPROVAL_REQUIRED` can be revoked. The revoke action will set the workflow status of a model to `WITHDRAWN`.<br>
Once revoked, the model is back in an editable state and can be deleted by users having the right to do so.<p>
Required roles:
- `PO_MCMO_MANAGER` (*Administrate Model Classes/Objects*)
- `PO_MCMO` (*Manage Model Objects*)
- for models in Module Categories (see [User Group Entitlements in Module Categories](https://pricefx.atlassian.net/wiki/display/UNITY/Module+Categories#User-Group-Entitlements-in-Module-Categories)): `MODULECATEGORY_MO_MANAGER` (*Manage Model in Module Category*)

## Request body

- object

## Response `200`

OK

- object
  - `response` object
    - `node` string
    - `data` ModelObject[]
      - `lastUpdateByName` string, nullable
      - `createdByName` string, nullable
      - `typedId` string
      - `workflowStatus` 'DRAFT' | 'SUBMITTED' | 'DENIED' | 'APPROVED' | 'NO_APPROVAL_REQUIRED' | 'WITHDRAWN' | 'INVALIDATED'
      - `lastUpdateDate` string, date-time, nullable
      - `approvedBy` integer, nullable
      - `submitDate` string, date-time, nullable
      - `deniedByName` string, nullable
      - `submittedByName` string, nullable
      - `userGroupViewDetails` string, nullable
      - `approvedByName` string, nullable
      - `state` object, nullable
      - `id` integer, nullable
      - `createDate` string, date-time, nullable
      - `submittedBy` integer, nullable
      - `deniedBy` integer, nullable
      - `label` string, nullable
      - `moduleCategoryUN` string, nullable
      - `version` integer, nullable
      - `currentStep` string, nullable
      - `uniqueName` string, nullable
      - `createdBy` integer, nullable
      - `userGroupEdit` string, nullable
      - `modelClassUN` string, nullable
      - `status` 'INVALID' | 'DRAFT' | 'CALCULATING' | 'ERROR' | 'READY'
      - `lastUpdateBy` integer, nullable
    - `status` integer

## Other responses

- `400` — Bad Request. Invalid path.
- `403` — REVOKE_NOT_ALLOWED
- `404` — The model with the specified `typedId` not found.

---

[API](https://skmtc.net/pricefx/apis/the-pricefx-backend-api.md) · [All operations](https://skmtc.net/pricefx/apis/the-pricefx-backend-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/pricefx/the-pricefx-backend-api/versions/0850b5d6be73/schema)
