Append a draft revision (ANALYST+, dashboard user)
const url = 'https://api.invogi.com/v1/data-profiles/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/revisions';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"config":{"version":1,"columns":{"additionalProperty":"example"},"source":{"expectedHeaders":["example"],"sheetName":"example"},"format":{},"currency":{},"payments":{},"statement":{}},"note":"example","expectedLatestRevisionId":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.invogi.com/v1/data-profiles/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/revisions \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "config": { "version": 1, "columns": { "additionalProperty": "example" }, "source": { "expectedHeaders": [ "example" ], "sheetName": "example" }, "format": {}, "currency": {}, "payments": {}, "statement": {} }, "note": "example", "expectedLatestRevisionId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0" }'The active revision is unchanged until an Admin activates the draft. expectedLatestRevisionId must be the newest revision: a concurrent edit returns 409. Repeating an edit that already landed returns the existing revision with 200 instead of adding another.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Header Parameters
Section titled “Header Parameters”For a Clerk session, selects a workspace in which the user has an active membership. If omitted, the remembered accessible workspace is used. API keys remain bound to their own workspace and cannot select another tenant.
Request Bodyrequired
Section titled “Request Bodyrequired”object
Version 1 configuration, validated per dataset kind: columns maps Invogi field keys to source header names; source.expectedHeaders records the confirmed file’s header names (never values); format holds dateFormat (ISO, DAY_MONTH_YEAR, MONTH_DAY_YEAR) and decimalSeparator (‘.’ or ‘,’); currency is {mode: COLUMN} or {mode: CONSTANT, code}; SETTLED_PAYMENTS adds payments.direction (PAYMENTS_POSITIVE, PAYMENTS_NEGATIVE, SEPARATE_COLUMNS) and payments.source; SUPPLIER_STATEMENT_ROWS adds statement.invertAmount. Unknown fields are refused. At most 16,384 characters of JSON.
object
object
object
object
object
object
object
Responses
Section titled “Responses”Identical to the newest revision
object
SHA-256 of the canonical configuration
First activation; set once
Version 1 configuration, validated per dataset kind: columns maps Invogi field keys to source header names; source.expectedHeaders records the confirmed file’s header names (never values); format holds dateFormat (ISO, DAY_MONTH_YEAR, MONTH_DAY_YEAR) and decimalSeparator (‘.’ or ‘,’); currency is {mode: COLUMN} or {mode: CONSTANT, code}; SETTLED_PAYMENTS adds payments.direction (PAYMENTS_POSITIVE, PAYMENTS_NEGATIVE, SEPARATE_COLUMNS) and payments.source; SUPPLIER_STATEMENT_ROWS adds statement.invertAmount. Unknown fields are refused. At most 16,384 characters of JSON.
object
object
object
object
object
object
object
Example
{ "datasetKind": "INVOICE_HISTORY", "config": { "version": 1 }}New draft revision
object
SHA-256 of the canonical configuration
First activation; set once
Version 1 configuration, validated per dataset kind: columns maps Invogi field keys to source header names; source.expectedHeaders records the confirmed file’s header names (never values); format holds dateFormat (ISO, DAY_MONTH_YEAR, MONTH_DAY_YEAR) and decimalSeparator (‘.’ or ‘,’); currency is {mode: COLUMN} or {mode: CONSTANT, code}; SETTLED_PAYMENTS adds payments.direction (PAYMENTS_POSITIVE, PAYMENTS_NEGATIVE, SEPARATE_COLUMNS) and payments.source; SUPPLIER_STATEMENT_ROWS adds statement.invertAmount. Unknown fields are refused. At most 16,384 characters of JSON.
object
object
object
object
object
object
object
Example
{ "datasetKind": "INVOICE_HISTORY", "config": { "version": 1 }}Invalid request
API key lacks required scope/role
Resource not found
Conflicting idempotency key or resource processing state