iotoms Docs

Update accounting connector settings

PUT
/api/v1/integrations/accounting/connectors/{provider}/config

Updates the sync settings and field mapping for a connected accounting system, identified by its provider slug (for example zoho-books). Returns the updated connector detail.

How to use it

  1. Connect the accounting system first with Start connecting an accounting system; unconnected connectors are rejected.
  2. Send autoSyncInvoices, autoSyncCustomers, syncFrequency and the full fieldMapping; the stored settings are replaced.
  3. The response is the updated connector detail.

Authorization

BearerAuth
headerAuthorizationBearer <JWT>

Path Parameters

provider*string

Accounting connector slug, for example zoho-books (from List accounting connectors).

Header Parameters

Request Body

application/json
  1. body
autoSyncInvoices*boolean

Turn automatic invoice sync on or off. Defaults to false.

autoSyncCustomers*boolean

Turn automatic customer sync on or off. Defaults to false.

syncFrequency*string

Sync frequency to save: MANUAL (default), HOURLY, DAILY or WEEKLY. Stored as a preference; syncs currently run only when started on demand.

Value in"MANUAL""HOURLY""DAILY""WEEKLY"
fieldMapping*

Free-form object mapping your fields to the accounting system's fields. Replaces the stored mapping.

Response Body

OK

*/*
  1. response
status*string

Outcome of the request: SUCCESS when it worked; errors return an error status with the reason in message.

message*string

Short human-readable message describing the outcome.

data?

The connector's connection status, sync settings and field mapping.

Example Request
curl -X PUT 'https://beta.iotoms.com/api/v1/integrations/accounting/connectors/string/config' \  -H 'Content-Type: application/json' \  -d '{  "autoSyncInvoices": true,  "autoSyncCustomers": true,  "syncFrequency": "MANUAL",  "fieldMapping": {    "property1": {},    "property2": {}  }}'
Example Response
{  "status": "string",  "message": "string",  "data": {    "provider": "string",    "displayName": "string",    "isAvailable": true,    "connectionStatus": "NOT_CONNECTED",    "orgId": "string",    "orgName": "string",    "connectedByEmail": "string",    "connectedByName": "string",    "connectedSince": "2019-08-24T14:15:22Z",    "scope": "string",    "syncSettings": {      "autoSyncInvoices": true,      "autoSyncCustomers": true,      "syncFrequency": "MANUAL",      "fieldMapping": {        "property1": {},        "property2": {}      }    },    "lastSyncAt": "2019-08-24T14:15:22Z",    "lastSyncStatus": "PENDING"  }}