# Set task status to completed

## Transition a task to Completed

> Transition a task to Completed.\
> Allowed only for the owner service or extension. Valid when status is Processing.

```json
{"openapi":"3.0.1","info":{"title":"Marketplace API","version":"5.0.5243-ga0bb7c09"},"servers":[{"url":"https://api.platform.softwareone.com"}],"paths":{"/public/v1/system/tasks/{id}/complete":{"post":{"tags":["Tasks"],"summary":"Transition a task to Completed","description":"Transition a task to Completed.\nAllowed only for the owner service or extension. Valid when status is Processing.","parameters":[{"name":"id","in":"path","description":"The task ID.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Task"}}}}}}}},"components":{"schemas":{"Task":{"type":"object","properties":{"id":{"type":"string"},"audit":{"allOf":[{"$ref":"#/components/schemas/TaskAuditBag"}]},"$meta":{"allOf":[{"$ref":"#/components/schemas/PlatformMetadata"}],"nullable":true},"name":{"type":"string"},"icon":{"type":"string","nullable":true},"revision":{"type":"integer","format":"int32"},"status":{"allOf":[{"$ref":"#/components/schemas/TaskStatus"}],"description":"Task status: a new task is created in the Queued (default) or Blocked status.","nullable":true},"code":{"type":"string","description":"Task code for the workflow, prefixed with the service namespace."},"queue":{"type":"string","description":"Queue name for task execution, prefixed with the controlling service namespace."},"object":{"allOf":[{"$ref":"#/components/schemas/TaskPlatform"}],"description":"Reference to the business object related to the task."},"description":{"type":"string","description":"Parameterized task description."},"parent":{"type":"object","allOf":[{"$ref":"#/components/schemas/TaskRef"}]},"progress":{"type":"number","description":"Progress in percent. 0-100 or not defined for not yet started task.","format":"float","nullable":true},"eta":{"type":"string","description":"Estimated finish time, if any.","format":"date-time","nullable":true},"parameters":{"description":"Optional parameters to store task-specific metadata.","nullable":true},"result":{"type":"string","description":"Result URI or reference to the result resource.","nullable":true},"externalId":{"type":"string","description":"External identifier for task correlation.","nullable":true},"owner":{"type":"object","allOf":[{"$ref":"#/components/schemas/PlatformIdentityRef"}]},"access":{"type":"array","items":{"$ref":"#/components/schemas/PlatformAccountRef"},"description":"List of accounts having access to the task and its result."}},"additionalProperties":false,"description":"The Task represents the state of an asynchronous, usually long running operation."},"TaskAuditBag":{"type":"object","properties":{"created":{"allOf":[{"$ref":"#/components/schemas/PlatformObjectEvent"}],"nullable":true},"updated":{"allOf":[{"$ref":"#/components/schemas/PlatformObjectEvent"}],"nullable":true},"started":{"allOf":[{"$ref":"#/components/schemas/PlatformObjectEvent"}],"nullable":true},"completed":{"allOf":[{"$ref":"#/components/schemas/PlatformObjectEvent"}],"nullable":true},"failed":{"allOf":[{"$ref":"#/components/schemas/PlatformObjectEvent"}],"nullable":true},"rescheduled":{"allOf":[{"$ref":"#/components/schemas/PlatformObjectEvent"}],"nullable":true},"queued":{"allOf":[{"$ref":"#/components/schemas/PlatformObjectEvent"}],"nullable":true}},"additionalProperties":false},"PlatformObjectEvent":{"type":"object","properties":{"at":{"type":"string","format":"date-time","nullable":true},"by":{"type":"object","allOf":[{"$ref":"#/components/schemas/PlatformIdentityRef"}]}},"additionalProperties":false},"PlatformIdentityRef":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"icon":{"type":"string","nullable":true},"revision":{"type":"integer","format":"int32"}},"additionalProperties":false},"PlatformMetadata":{"type":"object","properties":{"omitted":{"type":"array","items":{"type":"string"}}},"additionalProperties":false},"TaskStatus":{"enum":["Queued","Processing","Completed","Failed","Rescheduled"],"type":"string"},"TaskPlatform":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string","nullable":true},"icon":{"type":"string","nullable":true}},"additionalProperties":false},"TaskRef":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"icon":{"type":"string","nullable":true},"revision":{"type":"integer","format":"int32"},"status":{"allOf":[{"$ref":"#/components/schemas/TaskStatus"}],"description":"Task status: a new task is created in the Queued (default) or Blocked status.","nullable":true},"code":{"type":"string","description":"Task code for the workflow, prefixed with the service namespace."}},"additionalProperties":false,"description":"The Task represents the state of an asynchronous, usually long running operation."},"PlatformAccountRef":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"icon":{"type":"string","nullable":true},"revision":{"type":"integer","format":"int32"},"type":{"allOf":[{"$ref":"#/components/schemas/AccountType"}],"nullable":true},"status":{"allOf":[{"$ref":"#/components/schemas/AccountStatus"}],"nullable":true}},"additionalProperties":false},"AccountType":{"enum":["Client","Vendor","Operations"],"type":"string"},"AccountStatus":{"enum":["Active","Enabled","Disabled"],"type":"string"}}}}
```
