Skip to main content
PATCH
Patch Import Rows
← Imports Correct cells of a validated import session and revalidate the corrected rows. Use this to fix validation errors without re-uploading the file. Send exactly one of:
  • corrections: one entry per cell, each naming its row and column. The response returns the corrected rows.
  • match and values: set each column in values on every row that Get Import Rows lists for the errors_only and filters in match, the same rows a match picks in Delete Rows, whether your client has loaded them or not. The response returns how many rows were corrected, not the rows: read them back with Get Import Rows.
Either way the values are coerced and checked as one-by-one corrections are, every earlier correction of a corrected row is checked again, and the counters of Get Import Status are updated.
A request corrects at most 10,000 cells: 10,000 corrections, or, with a match, the matching rows times the columns in values. A larger match is refused whole (IMPORT_CORRECTION_MATCH_TOO_LARGE): narrow it with filters.

Request

Headers

string
required
Your API key for authenticationExample: sk_live_1234567890abcdef
string
required
Your organization UUIDExample: a8315ef3-dd50-43f8-b7ce-d839e68d51fa

Path Parameters

string
required
UUID of the import sessionExample: "11111111-1111-1111-1111-111111111111"

Body Parameters

array[object]
List of cell-level corrections (max 10,000). Send it or match, not both.
object
Correct every row that Get Import Rows lists for these parameters. Requires values. Unknown fields answer 422, and errors_only has no default, so a misspelt field never widens the correction to the valid rows.Example: {"errors_only": true, "filters": {"client": ["Acme"]}}
object
The value to set on each matching row, by column key: {"column_key": value}, 1 to 100 columns. A value is a string, number, boolean or null (clears the cell), as in a correction. Only with match.Example: {"vehicle_type": "truck"}

Response

array[object]
The corrected rows after revalidation, each with row_index, data, and errors. Empty for a match.
integer
Number of rows corrected. 0 when the match lists no row, in which case nothing changes.
integer
Total number of rows with errors remaining in the entire session after applying corrections

Example

Successful Response

Successful Response (match)

Common Errors

400 Bad Request

Cause: The session is not validated. If it is not validated yet, or was sent back to mapping, validate it with Validate Import. If it is being submitted, wait for the submit to finish.
Cause: The session was already submitted.
Cause: A column in corrections or values is not a column of the template. Nothing is changed.
Cause: A column in corrections or values takes the import’s constant (the value set for the whole import) and can’t be corrected row by row.
Cause: The match selects more cells than a request corrects (10,000: matching rows times columns in values). Nothing is changed: narrow the match with filters.

401 Unauthorized

Cause: Missing or invalid API key

403 Forbidden

Cause: The authenticated user is not a member of the organization

404 Not Found

Cause: The import session does not exist or belongs to another organization. Both cases return the same response, so a session id from another organization is indistinguishable from one that does not exist.
Cause: The session’s project is no longer one your organization can import into (for example, the organization was unlinked from it). Every step of the session answers this, not only the submit. Create a new session on a project you work in.

422 Unprocessable Entity

Cause: Invalid corrections format or missing required fields; none or both of corrections and match; match without values or values without match; or a match with an unknown field, without errors_only or with invalid filters. Nothing is changed.

Get Import Rows

View rows and identify errors

Delete Rows

Remove rows instead of fixing them

Submit Import

Submit once all errors are resolved