---
title: "Send a rejected ticket back to Needs review"
method: POST
path: "/tickets/{id}/restore"
tags: ["Tickets"]
---

# Send a rejected ticket back to Needs review

`POST /tickets/{id}/restore`

## Request

- Base URL: `https://app.fieldstub.com/v1`
- URL: `https://app.fieldstub.com/v1/tickets/{id}/restore`
- Auth: HTTP bearer

Sets status to submitted. Does not write to Procore. Idempotent if the ticket is already in Needs review. Refused if it is already in Procore.

## Path parameters

- `id` string, required

## Response `200`

OK

- Ticket
  - `id` string, uuid
  - `status` 'submitted' | 'written' | 'rejected'
  - `project_id` string
  - `description` string
  - `reason` string: Why the work is out of scope.
  - `directed_by` string: Who on the GC side authorized it.
  - `captured_at` string, date-time
  - `captured_via` string: qr, sms, link or api.
  - `captured_by` string, nullable
  - `total` number
  - `labor` LaborLine[]
    - `trade` string, required
    - `workers` number
    - `hours` number, required
    - `rate` number
    - `costCode` string: Optional. Helps route the line automatically.
  - `equipment` EquipmentLine[]
    - `description` string
    - `hours` number
    - `rate` number
    - `costCode` string
  - `materials` MaterialLine[]
    - `description` string
    - `quantity` number
    - `unitCost` number
    - `costCode` string
  - `signature` object, nullable
  - `photos` Photo[]
    - `name` string
    - `taken_at` string, nullable
    - `coords` object, nullable
  - `photo_count` integer
  - `link_token` string, nullable
  - `approved_by` string, nullable: Who released the ticket into Procore: a reviewer's email address, or "key:<name> (<prefix>)" when an API key or an agent approved it. Null when the approval predates this field or no actor could be established. Procore's own audit shows the service account that wrote the change event, so this is the only record of the person.
  - `approved_at` string, date-time, nullable
  - `decisions` object[]: Every state change a caller made, oldest first, appended and never rewritten. A ticket that was rejected and then approved anyway keeps both entries, which is the sequence an audit asks about.
    - `action` 'approved' | 'rejected' | 'restored'
    - `by` string, nullable
    - `at` string, date-time
  - `procore` object, nullable: Populated once the ticket has been written to Procore.
    - `destination` 'change_event' | 'daily_log': Where it went. A change event is money on a budget code. A daily log is a dated record that bills nothing, used when the project has no Project Financials. Always present on a written ticket, so nothing has to be inferred from which id is null.
    - `change_event_id` integer, nullable
    - `manpower_log_id` integer, nullable: Set instead of change_event_id when destination is daily_log.
    - `number` string, nullable
    - `written_at` string, date-time
    - `url` string
    - `note` string, nullable: Present on a daily log write, spelling out what that record is and is not.
  - `routing` RoutingLine[]: Where each line of money will land. Present on single-ticket reads and on approve. The most important field in the payload.
    - `line` integer: Index. Use it as the key in routes on approve.
    - `description` string
    - `cost_type` string, nullable
    - `quantity` number, nullable
    - `unit_cost` number, nullable
    - `amount` number
    - `budget_code` string, nullable: Flat code, e.g. 01-000.E.
    - `budget_code_id` integer, nullable
    - `routed` boolean
    - `exact` boolean: False means a fallback code was used.
    - `needs_review` boolean
  - `warnings` string[]

## Other responses

- `404`: Error
- `409`: Error

---

[API](https://skmtc.dev/fieldstub/apis/fieldstub-api.md) · [All operations](https://skmtc.dev/fieldstub/apis/fieldstub-api/llms.txt) · [OpenAPI document](https://skmtc.dev/fieldstub/apis/fieldstub-api/revisions/f0365e1796fe?raw)
