Handle Company Compare To

​

Δ and Impact for one page of the Companies table.

The company counterpart to /compare, with the same shape and the same timeframe options. Four metrics: companies have no CARR/CMRR and no terms-currency figures.

A company deleted between the page load and this call is reported in notFoundCompanyIds rather than omitted.

Body·

required
application/json

A Compare to request for one page of the Companies table.

The client sends the row ids of the page it already holds and gets back only the movement on those rows.

  • Company IDs to compare, normally the current page. Capped so one request cannot fan out across a whole tenant.

  • Comparison timeframe. MTD, QTD and YTD follow the account's fiscal calendar; last30Days and last12Months are counted back from today.

    values
    last30Daysmtdqtdytdlast12Monthscustom
  • Start date, required when period is 'custom' and ignored otherwise

Responses

  • application/json
  • application/json
Request Example for post/companies/compare
curl https://crm.dreamhub.ai/api/v1/contracts/companies/compare \
  --request POST \
  --header 'Content-Type: application/json' \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN' \
  --data '{
  "companyIds": [
    ""
  ],
  "period": "last30Days",
  "customStart": "2026-11-23"
}'
{
  "period": "string",
  "periodStart": "2026-11-23T03:49:25.010Z",
  "companies": [
    {
      "companyId": "string",
      "existed": true,
      "previousCapturedAt": "2026-11-23T03:49:25.010Z",
      "previousSource": "string",
      "metrics": {
        "additionalProperty": {
          "previous": 1,
          "current": 1,
          "delta": 1,
          "impact": "new"
        }
      }
    }
  ],
  "notFoundCompanyIds": [
    "string"
  ]
}