Skip to main content

Summary

The Data Management API supports CRUD for core CRM and ERP records, plus workflow, report, and property-management endpoints where available.The Deal object is published in the Data Management API under /v1/public/deals. The Expense object is published in the Data Management API under /v1/public/expenses.

Support status

ObjectListRetrieveCreateUpdateDeleteNotes
Deals (/v1/public/deals)Legacy /v1/public/cases aliases may still exist, but the published docs use /deals
CompaniesUpsert by external_id; soft-delete archives the record
ContactsUpsert by external_id; soft-delete archives the record
OrdersSingle & bulk create; soft-delete (archives record)
ItemsUpsert by external_id; soft-delete archives the record
InventoriesUpsert by external_id; soft-delete archives the record
Inventory TransactionsSoft-delete (archives record)
SubscriptionsSoft-delete (archives record)
EstimatesSoft-delete (archives record)
InvoicesSoft-delete (archives record)
Purchase OrdersUpsert by external_id; soft-delete archives the record
Expenses (/v1/public/expenses)Upsert by external_id; soft-delete archives the record
BillsUpsert by external_id; soft-delete archives the record
DisbursementsUpsert by external_id; soft-delete archives the record
SlipsUpsert by external_id; soft-delete archives the record
PaymentsUpsert by external_id; soft-delete archives the record
LocationsUpsert by external_id; soft-delete archives the record
MetersUpsert by external_id; soft-delete archives the record
WorkflowsUpsert by external_id (create/update via POST); GET /v1/public/workflows, POST /v1/public/workflows, GET /v1/public/workflows/actions, GET /v1/public/workflows/{workflow_ref}
ReportsSalesforce-style reportMetadata; delete is soft-delete
Properties (Schema)Write supported for Orders, Items, Inventories, Inventory Transactions, Subscriptions, Invoices, Estimates, Payments, Purchase Orders, Bills, Disbursements, Slips, Contacts, and Companies. Cases/Locations/Meters are read-only.

Example: Deals

Use the public Deals API to create, update, verify, and delete Deal records.

Prepare data

Required fields:
  • Deal external ID (example: DEAL-2026-0001)
  • Deal name (example: Enterprise expansion)
  • Optional company or contact reference (companyExternalId, contactExternalId)
  • Optional stage or status fields (status, caseStatus)

Create a Deal

curl -X POST "https://api.sanka.com/v1/public/deals" \
  -H "Authorization: Bearer <access_token>" \
  -H "Content-Type: application/json" \
  -d '{
    "externalId": "DEAL-2026-0001",
    "name": "Enterprise expansion",
    "status": "open",
    "caseStatus": "Qualified",
    "currency": "USD",
    "companyExternalId": "ACME-001",
    "contactExternalId": "CONTACT-100"
  }'
On success, the response includes case_id, external_id, status, and ctx_id.

Update the Deal

Use the returned case_id to update the record.
curl -X PUT "https://api.sanka.com/v1/public/deals/<case_id>" \
  -H "Authorization: Bearer <access_token>" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Enterprise expansion - renewal",
    "caseStatus": "Proposal",
    "companyExternalId": "ACME-001"
  }'
Verify the result with:
curl -X GET "https://api.sanka.com/v1/public/deals/<case_id>" \
  -H "Authorization: Bearer <access_token>"

Delete the Deal

Delete the record when it is no longer needed:
curl -X DELETE "https://api.sanka.com/v1/public/deals/<case_id>" \
  -H "Authorization: Bearer <access_token>"
Useful follow-up endpoints:
  • List deals: GET /v1/public/deals
  • Get one deal: GET /v1/public/deals/{case_id}
  • List deal pipelines: GET /v1/public/deals/pipelines

AI endpoints

The AI endpoints live in separate API Reference groups because they use the root v1 namespace instead of /v1/public/....
  • Data Enrichment covers POST /v1/enrich for company enrichment, including request patterns, dry_run, and force_refresh
  • Data Scoring covers POST /v1/score for company and deal scoring, including response fields, curl examples, and deterministic scoring payloads

Notes

  • Data Management endpoints use the /v1/public/... namespace.
  • AI endpoints use the root /v1 namespace.
  • Token permissions: Regular (read-only) or Full Access (read + write), plus OAuth scopes for root AI endpoints.