Create a profile and its first draft revision (ANALYST+, dashboard user)
const url = 'https://api.invogi.com/v1/data-profiles';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"name":"Xero bills export","datasetKind":"INVOICE_HISTORY","config":{"version":1,"columns":{"supplierName":"Contact","invoiceNumber":"Bill Number","issueDate":"Bill Date","grossAmount":"Total","externalId":"Bill ID"},"source":{"expectedHeaders":["Contact","Bill Number","Bill Date","Total","Bill ID","Reference"]},"format":{"dateFormat":"DAY_MONTH_YEAR","decimalSeparator":"."},"currency":{"mode":"CONSTANT","code":"GBP"}}}'};
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 \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "name": "Xero bills export", "datasetKind": "INVOICE_HISTORY", "config": { "version": 1, "columns": { "supplierName": "Contact", "invoiceNumber": "Bill Number", "issueDate": "Bill Date", "grossAmount": "Total", "externalId": "Bill ID" }, "source": { "expectedHeaders": [ "Contact", "Bill Number", "Bill Date", "Total", "Bill ID", "Reference" ] }, "format": { "dateFormat": "DAY_MONTH_YEAR", "decimalSeparator": "." }, "currency": { "mode": "CONSTANT", "code": "GBP" } } }'Docs/51. A profile records how to read one source format for one dataset kind, which never changes. It is DRAFT until an Admin activates a revision. Configuration is validated per dataset kind; unknown fields and operations are refused. Saving a profile stores settings only, never rows or files.
Authorizations
Section titled “Authorizations”Parameters
Section titled “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
Statement and purchasing profiles only
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
{ "name": "Xero bills export", "datasetKind": "INVOICE_HISTORY", "config": { "version": 1, "columns": { "supplierName": "Contact", "invoiceNumber": "Bill Number", "issueDate": "Bill Date", "grossAmount": "Total", "externalId": "Bill ID" }, "source": { "expectedHeaders": [ "Contact", "Bill Number", "Bill Date", "Total", "Bill ID", "Reference" ] }, "format": { "dateFormat": "DAY_MONTH_YEAR", "decimalSeparator": "." }, "currency": { "mode": "CONSTANT", "code": "GBP" } }}Responses
Section titled “Responses”The profile with its first revision
object
A newer revision than the active one awaits activation
object
object
object
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", "status": "ACTIVE", "revision": { "datasetKind": "INVOICE_HISTORY", "config": { "version": 1 } }}Invalid request
API key lacks required scope/role
Resource not found