Recoup

Get started with Recoup.

API REFERENCE

Read an ingestion result

On this page
GET/api/ingestion

Omit action to read a job or stage. Use action only for datasets, imports or records. All responses are private and uncached. The x-recoup-query-schema describes complete valid parameter combinations, including action-specific page sizes.

Authentication

x-api-key in header

bearerAuth bearer

Request

cURL
curl --request GET \
  --url 'https://api.recoupable.dev/api/ingestion?job_id=aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' \
  --header 'x-api-key: YOUR_API_KEY'

Replace the YOUR_ placeholders with your values. Required query parameters are included; optional parameters are listed below.

Try it

Fill in the fields, send the request from your browser, and read the live response. The curl below updates as you type.

Kept in this browser tab only and cleared when it closes.

cURL for this request
curl --request GET \
  --url 'https://api.recoupable.dev/api/ingestion'

Parameters

Query parameters

actionstring · enum

Omit to read a job. The three named actions browse an organization dataset.

Values: "datasets", "imports", "records"

organization_idstring

Required for dataset queries and jobs created in organization scope.

job_idstring

Required for job/stage reads and records.

stagestring · enum

Omit for job status. Used only without action.

Values: "bronze", "silver", "gold"

dataset_idstring

Required for imports and records.

limitinteger

Maximum 50 for datasets/imports, 100 for records.

afterstring

Opaque UUID dataset cursor or 64-character import job cursor. Use the next_after returned by the preceding page.

after_rowinteger

Record cursor from next_after.

Responses

200Returns a job, requested stage or one organization catalog page.

application/json

oneOf · Job 1
job_idstringrequired

pattern: ^[a-f0-9]{64}$

dataset_idstring

format: uuid

statusstring · enumrequired

Values: "queued", "held", "ready", "rejected"

engine_versionstring
source_sha256string

pattern: ^[a-f0-9]{64}$

contract_sha256string

SHA-256 of the validated, canonical contract including defaults. Version 2 workbook completion receipts include this field.

pattern: ^[a-f0-9]{64}$

silver_sha256string

pattern: ^[a-f0-9]{64}$

gold_sha256string | null

pattern: ^[a-f0-9]{64}$

issue_countinteger
issues_truncatedinteger
issuesarray<object>
Item properties for issues
codestringrequired
rowinteger
fieldstring
source_sheetstring
controlsarray<object>
Item properties for controls
fieldstringrequired
expectedstringrequired
actualstringrequired
passedbooleanrequired
source_sheetstring
source_cellstring
rows_readinteger
rows_outputinteger
allOf · any 1

any

oneOf · ArtifactResult 2
job_idstringrequired

pattern: ^[a-f0-9]{64}$

stagestring · enumrequired

Values: "bronze", "silver", "gold"

artifactobjectrequired

Bronze contains filename, format, source_sha256, and content_base64. Silver contains source-grain records. Gold contains the ready records and field types.

oneOf · CatalogPage 3
oneOf · object 1
datasetsarray<object>required
Item properties for datasets

object

next_afterstring | nullrequired
oneOf · object 2
importsarray<object>required
Item properties for imports

object

next_afterstring | nullrequired
oneOf · object 3
recordsarray<object>required
Item properties for records

object

next_afterinteger | nullrequired
400Invalid input, query, or source encoding.

application/json

errorstringrequired
401A valid credential is required.

application/json

errorstringrequired
403Access to the selected scope was denied.

application/json

errorstringrequired
404The scoped job or artifact could not be found.

application/json

errorstringrequired
409The selected version, idempotency key, or artifact conflicts with stored state.

application/json

errorstringrequired
413The request, source, or record exceeds its size limit.

application/json

errorstringrequired
429The caller reached the operation rate limit.

application/json

errorstringrequired
503The operation or its configured infrastructure is unavailable.

application/json

errorstringrequired

Full specification

Download the OpenAPI file for complete schemas, constraints, and examples.

Download ingestion.json
View operation source
json
{
  "summary": "Read an ingestion result",
  "operationId": "readIngestion",
  "description": "Omit action to read a job or stage. Use action only for datasets, imports or records. All responses are private and uncached. The x-recoup-query-schema describes complete valid parameter combinations, including action-specific page sizes.",
  "security": [
    {
      "apiKeyAuth": []
    },
    {
      "bearerAuth": []
    }
  ],
  "parameters": [
    {
      "name": "action",
      "in": "query",
      "description": "Omit to read a job. The three named actions browse an organization dataset.",
      "schema": {
        "type": "string",
        "enum": [
          "datasets",
          "imports",
          "records"
        ]
      }
    },
    {
      "name": "organization_id",
      "in": "query",
      "description": "Required for dataset queries and jobs created in organization scope.",
      "schema": {
        "type": "string",
        "format": "uuid"
      }
    },
    {
      "name": "job_id",
      "in": "query",
      "description": "Required for job/stage reads and records.",
      "schema": {
        "type": "string",
        "pattern": "^[a-f0-9]{64}$"
      }
    },
    {
      "name": "stage",
      "in": "query",
      "description": "Omit for job status. Used only without action.",
      "schema": {
        "type": "string",
        "enum": [
          "bronze",
          "silver",
          "gold"
        ]
      }
    },
    {
      "name": "dataset_id",
      "in": "query",
      "description": "Required for imports and records.",
      "schema": {
        "type": "string",
        "format": "uuid"
      }
    },
    {
      "name": "limit",
      "in": "query",
      "description": "Maximum 50 for datasets/imports, 100 for records.",
      "schema": {
        "type": "integer",
        "minimum": 1,
        "maximum": 100
      }
    },
    {
      "name": "after",
      "in": "query",
      "description": "Opaque UUID dataset cursor or 64-character import job cursor. Use the next_after returned by the preceding page.",
      "schema": {
        "type": "string"
      }
    },
    {
      "name": "after_row",
      "in": "query",
      "description": "Record cursor from next_after.",
      "schema": {
        "type": "integer",
        "minimum": 0,
        "maximum": 10000
      }
    }
  ],
  "responses": {
    "200": {
      "description": "Returns a job, requested stage or one organization catalog page.",
      "content": {
        "application/json": {
          "schema": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/Job"
              },
              {
                "$ref": "#/components/schemas/ArtifactResult"
              },
              {
                "$ref": "#/components/schemas/CatalogPage"
              }
            ]
          }
        }
      }
    },
    "400": {
      "description": "Invalid input, query, or source encoding.",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/Error"
          }
        }
      }
    },
    "401": {
      "description": "A valid credential is required.",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/Error"
          }
        }
      }
    },
    "403": {
      "description": "Access to the selected scope was denied.",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/Error"
          }
        }
      }
    },
    "404": {
      "description": "The scoped job or artifact could not be found.",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/Error"
          }
        }
      }
    },
    "409": {
      "description": "The selected version, idempotency key, or artifact conflicts with stored state.",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/Error"
          }
        }
      }
    },
    "413": {
      "description": "The request, source, or record exceeds its size limit.",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/Error"
          }
        }
      }
    },
    "429": {
      "description": "The caller reached the operation rate limit.",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/Error"
          }
        }
      }
    },
    "503": {
      "description": "The operation or its configured infrastructure is unavailable.",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/Error"
          }
        }
      }
    }
  },
  "x-recoup-query-schema": {
    "examples": [
      {
        "job_id": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
      }
    ],
    "oneOf": [
      {
        "$ref": "#/components/schemas/JobQuery"
      },
      {
        "$ref": "#/components/schemas/Datasets"
      },
      {
        "$ref": "#/components/schemas/Imports"
      },
      {
        "$ref": "#/components/schemas/Records"
      }
    ]
  }
}

Read a job with ?job_id=<job_id>. Add the original organization_id for an organization-scoped job. Omit the action parameter when reading a job or artifact. Responses are private and uncached.

StateWhat you can read
queuedThe job is awaiting completion. The original becomes available after capture.
readyValidation passed. Read the row counts, controls, digests and normalized records.
heldReview the recorded issues and mapped data. Supply a new idempotency key to submit a corrected contract.
rejectedThe reader or an input limit prevented processing. Inspect the recorded reason and original.

A stage query selects the captured original (bronze), mapped source records (silver) or accepted output (gold). Monetary decimals and identifiers in gold stay strings so a client can preserve subcent precision and leading zeros. Gold is available for ready jobs.

For a completed version 2 workbook, retain source_sha256, contract_sha256 and engine_version together. They identify which bytes, mapping and engine produced the result. A mapping edit changes the contract digest even if its author reuses the same version label.

Browse organization datasets

Query actionRequired parametersCursor for the next page
datasetsorganization_idPass the returned next_after as after.
importsorganization_id, dataset_idPass next_after as after.
recordsorganization_id, dataset_id, job_idPass next_after as after_row.

A null cursor marks the end. Records are tied to one import version. Reading different versions and combining their records can count the same underlying activity twice. See process private data for creation and explicit delivery.