Skip to main content
Cards

Process a validated card import batch

Process all rows in a previously validated import batch that are classified as create or update and for which the authenticated user holds the required permission (Cards:Create or Cards:Update respectively). Rows classified as invalid, duplicate, or unauthorized are skipped and their existing classification is preserved.

POST
/fm/cards/imports/{import_batch_id}/process

Once processing is complete the gb_imports batch record is updated with a final status and summary counts, and a combined result CSV is generated and persisted.

A batch may only be processed once. Attempting to re-process an already processed batch returns 409 Conflict. Attempting to process a batch that has not yet been validated (i.e. the upload step has not been completed) returns 422 Unprocessable Entity.

This method only requires an authenticated identity. Processing respects the caller's Cards:Create and Cards:Update permissions per row: create rows require Cards:Create and update rows require Cards:Update; rows the caller is not authorised to process are skipped as unauthorized.

Authorizationstringheaderrequired

For accessing the API a valid token must be passed in all the queries in the 'Authorization' header.

A valid token is generated by the API and returned by the /authenticate method by supplying a valid username and password.

The following syntax must be used in the 'Authorization' header :

Bearer aaaaaa/bbbbbb.ccccccc.dddddd
import_batch_idstringrequired

The import_batch_id returned from the upload step.

Maximum string length: 10
Pattern: ^[1-9]{1}[0-9]*$
Audit-User-Idstringheader

(Optional) User Id to use for audit purposes. Requires the Audit:UserIdOverride permission.

Maximum string length: 5
Pattern: ^[1-9]{1}[0-9]*$

Response

application/vnd.catch-e-api.v1+json

Batch processed successfully. All eligible rows have been created or updated. Inspect summary for outcome counts.

import_batch_idstringrequired

The import batch identifier that was processed.

Maximum string length: 10
Example: 42
result_csv_uristring

Relative URI to download the final result CSV for this batch via GET /fm/cards/imports/{import_batch_id}/result. Present only when the result file has been successfully generated.

Example: /fm/cards/imports/42/result
summaryobjectrequired

Counts of rows by processing outcome.