Skip to main content
The Jobs API lets applications hand off bulk or batched data for asynchronous processing. Typical use cases include importing policies, financial transactions, and operational events.
Scope: paths and request format. Response examples and full schemas can be added later.

Endpoints

  • POST /api/companies/{company_id}/jobs

Authentication and headers

Send an API key and JSON payload.
Authorization: ApiKey <YOUR_API_KEY>
Content-Type: application/json
Accept-Encoding: gzip

Request format

All job submissions use the same envelope:
{
  "type": "<job-type>",
  "file": {
    "name": "<any-descriptive-file-name>.json.gz.b64",
    "fileContent": "<base64-of-gzipped-json>"
  }
}
  • type is one of: policies, transactions, events.
  • file.fileContent is a base64 string of a gzipped JSON document.
  • file.name is a descriptive filename. It does not have to exist on disk.

Example: submit policies

curl -X POST   "$BASE_URL/api/companies/$COMPANY_ID/jobs"   -H "Authorization: ApiKey $API_KEY"   -H "Content-Type: application/json"   -H "Accept-Encoding: gzip"   -d '{
    "type": "policies",
    "file": {
      "name": "policies.json.gz.b64",
      "fileContent": "<BASE64_GZIP_OF_POLICIES_JSON>"
    },
    "skipAutoGenerateInvoices": true
  }'
Notes:
  • skipAutoGenerateInvoices is supported for policy imports when invoices should not be auto generated during a bulk policy load.

Example: submit financial transactions

curl -X POST   "$BASE_URL/api/companies/$COMPANY_ID/jobs"   -H "Authorization: ApiKey $API_KEY"   -H "Content-Type: application/json"   -H "Accept-Encoding: gzip"   -d '{
    "type": "transactions",
    "file": {
      "name": "financials.json.gz.b64",
      "fileContent": "<BASE64_GZIP_OF_INVOICES_JSON>"
    }
  }'

Example: submit events

curl -X POST   "$BASE_URL/api/companies/$COMPANY_ID/jobs"   -H "Authorization: ApiKey $API_KEY"   -H "Content-Type: application/json"   -H "Accept-Encoding: gzip"   -d '{
    "type": "events",
    "file": {
      "name": "events.json.gz.b64",
      "fileContent": "<BASE64_GZIP_OF_EVENTS_JSON>"
    }
  }'

Packaging the payload

Your JSON document is gzipped, then base64 encoded. Example workflow:
  1. Create your JSON array or object.
  2. Gzip the bytes.
  3. Base64 encode the gzipped bytes.
  4. Place the result in file.fileContent.
Any language or tool can produce this. Keep UTF-8 encoding for the JSON before gzipping.

After submission

Jobs are processed asynchronously. If you need to verify that an event appeared after an events job, you can query:
  • POST /api/companies/{company_id}/events/list Filter by identifiers such as a historical event id and page through results as needed.

Parameters

  • company_id is a required path parameter.