Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 6 Next »

This is a beta functionality - expect some changes in the default configuration.

Value for companyIdFields will be ["referenceId"] by default, going forward. Avallone will reach out to you if you are affected by this change.

Value for collectionStrategy will be incremental by default, going forward. Avallone will reach out to you if you are affected by this change.

Create or update a relationship

PUT /api/v1/sync
Authorization: Bearer :token
Content-Type: application/json
{
  "config": {
    "companyIdFields": ["referenceId"],
    "collectionStrategy": "incremental"
  },
  "companies": [
    {
      "referenceId": "d",
      "parentCompanies": [
        {
          "referenceId": "b",
          "ownership": 25
        }
      ]
    }
  ]
}

How to delete a relationship incrementally?

Use the delete property

PUT /api/v1/sync
Authorization: Bearer :token
Content-Type: application/json
{
  "config": {
    "companyIdFields": ["referenceId"],
    "collectionStrategy": "incremental"
  },
  "companies": [
    {
      "referenceId": "d",
      "parentCompanies": [
        {
          "referenceId": "b",
          "ownership": 25,
          "delete": true        <--- Set the `delete` prpperty to `true`
        }
      ]
    }
  ]
}
  • No labels