---
title: "Bulk save edits to failed roster rows"
method: PATCH
path: "/roster-records/{rosterId}/draft"
tags: ["RosterRecord"]
---

# Bulk save edits to failed roster rows

`PATCH /roster-records/{rosterId}/draft`

Updates Spanner roster_rows in place for rows in VALIDATION_FAILED status. Each entry's rowData is merged into the stored row (partial patch of top-level keys); the same partial payload is appended to draftRows history. Marks the row as isDrafted and keeps status as VALIDATION_FAILED; recordKey must be the existing row_id.

## Path parameters

- `rosterId` string, required

## Headers

- `tenant-id` string, required

## Request body

- RosterRowsDraftBulkRequest — Bulk draft save request
  - `rows` RosterRowDraftEntry[], required — Rows with edited data to persist
    - `recordKey` string, required — Stable row id from roster row list APIs (Spanner row_id)
    - `rowData` JsonNode, required
      - `empty` boolean
      - `valueNode` boolean
      - `containerNode` boolean
      - `missingNode` boolean
      - `array` boolean
      - `object` boolean
      - `nodeType` 'ARRAY' | 'BINARY' | 'BOOLEAN' | 'MISSING' | 'NULL' | 'NUMBER' | 'OBJECT' | 'POJO' | 'STRING'
      - `pojo` boolean
      - `number` boolean
      - `integralNumber` boolean
      - `floatingPointNumber` boolean
      - `short` boolean
      - `int` boolean
      - `long` boolean
      - `float` boolean
      - `double` boolean
      - `bigDecimal` boolean
      - `bigInteger` boolean
      - `textual` boolean
      - `boolean` boolean
      - `null` boolean
      - `binary` boolean

## Response `200`

Draft save result with per-row failures if any

- RosterRowsDraftBulkResponse — Result of a bulk draft save
  - `succeeded` integer — Number of rows whose edits were successfully saved
  - `failures` DraftRowSaveFailure[] — Per-row failures (other rows may still have succeeded)
    - `recordKey` string — recordKey / row_id that failed
    - `message` string — Reason the row was not updated

## Other responses

- `400` — Invalid input or batch too large
- `401` — Unauthorized - Authentication required
- `403` — Forbidden - Insufficient permissions
- `404` — Roster job not found

---

[API](https://skmtc.net/certifyos/apis/certify-api-layer.md) · [All operations](https://skmtc.net/certifyos/apis/certify-api-layer/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/certifyos/certify-api-layer/revisions/3d27e9019c7b/schema)
