Connections

Update authorization

Update data connection's authorization.

put/companies/{companyId}/connections/{connectionId}/authorization

Request body

object required

Response

OK

idSchema required— unresolved $ref
integrationIdstring uuid required

A Codat ID representing the integration.

integrationKeystring

A unique four-character ID that identifies the platform of the company's data connection. This ensures continuity if the platform changes its name in the future.

sourceIdSourceId required— unresolved $ref
sourceTypeSourceType required— unresolved $ref
platformNamestring required

Name of integration connected to company.

linkUrlstring uri required

The link URL your customers can use to authorize access to their business application.

statusDataConnectionStatus required— unresolved $ref
lastSyncCreated — unresolved $ref
createdstring required

In Codat's data model, dates and times are represented using the <a class="external" href="https://en.wikipedia.org/wiki/ISO_8601" target="_blank">ISO 8601 standard</a>. Date and time fields are formatted as strings; for example:

2020-10-08T22:40:50Z
2021-01-01T00:00:00

When syncing data that contains DateTime fields from Codat, make sure you support the following cases when reading time information:

  • Coordinated Universal Time (UTC): 2021-11-15T06:00:00Z
  • Unqualified local time: 2021-11-15T01:00:00
  • UTC time offsets: 2021-11-15T01:00:00-05:00

Time zones

Not all dates from Codat will contain information about time zones.
Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced.

dataConnectionErrorsDataConnectionError[] nullable— unresolved $ref
connectionInfoobject nullable

Example response

{
  "id": "ee2eb431-c0fa-4dc9-93fa-d29781c12bcd",
  "integrationId": "bf083d72-62c7-493e-aec9-81b4dbba7e2c",
  "integrationKey": "dfxm",
  "sourceId": "bdd831ce-eebd-4896-89a7-20e5ee8989ee",
  "platformName": "Basiq",
  "linkUrl": "https://link-api.codat.io/companies/86bd88cb-44ab-4dfb-b32f-87b19b14287f/connections/ee2eb431-c0fa-4dc9-93fa-d29781c12bcd/start",
  "status": "Linked",
  "lastSync": "2022-10-27T10:22:43.6464237Z",
  "created": "2022-10-27T09:53:29Z",
  "sourceType": "Banking"
}

Changes

Changed in 9 of the 52 revisions of this API.4316

    • the response property integrationKey became optional for the status 200

      response-property-became-optional

    • the response property dataConnectionErrors became nullable for the status 200

      response-property-became-nullable

    • the response property connectionInfo became nullable for the status 200

      response-property-became-nullable

    • the response property lastSync became nullable for the status 200

      response-property-became-nullable

    • removed the optional property additionalProperties from the response with the 200 status

      response-optional-property-removed

    • added the optional property dataConnectionErrors/items/resolvedOnUtc to the response with the 200 status

      response-optional-property-added

    • added the optional property dataConnectionErrors/items/status to the response with the 200 status

      response-optional-property-added

    • added the optional property validation to the response with the 401 status

      response-optional-property-added

    • added the optional property validation to the response with the 402 status

      response-optional-property-added

    • added the optional property validation to the response with the 403 status

      response-optional-property-added

    • added the optional property validation to the response with the 404 status

      response-optional-property-added

    • added the optional property validation to the response with the 429 status

      response-optional-property-added

    • added the optional property validation to the response with the 500 status

      response-optional-property-added

    • added the optional property validation to the response with the 503 status

      response-optional-property-added

    • added the new Expense enum value to the sourceType response property for the response status 200

      response-property-enum-value-added

    • added the new BankFeed enum value to the sourceType response property for the response status 200

      response-property-enum-value-added

    • added the non-success response with the status 401

      response-non-success-status-added

    • added the non-success response with the status 402

      response-non-success-status-added

    • added the non-success response with the status 403

      response-non-success-status-added

    • added the non-success response with the status 404

      response-non-success-status-added

    • added the non-success response with the status 429

      response-non-success-status-added

    • added the non-success response with the status 500

      response-non-success-status-added

    • added the non-success response with the status 503

      response-non-success-status-added