Object API

Use Object API to read and update workspace records such as companies, items, orders, invoices, payments, and inventory.

Last updated: July 5, 2026

Summary

Use Object API when your integration needs to read, create, update, or archive records inside a Sanka workspace. Object endpoints use the /v2/public/... namespace and keep the v1 structure where possible, so external developers can migrate with minimal endpoint changes.v2 migration note: Public API v1 is deprecated. If you still call /v1/public/..., update to /v2/public/... before June 25, 2026 00:00 UTC.

What's included

Object API pages are grouped by the records you work with in Sanka. Open the object page when you need the exact request body, response fields, filters, and playground for that object.
ObjectListRetrieveCreateUpdateDeleteNotes
Deals (/v2/public/deals)Legacy /v1/public/cases aliases may still exist, but published docs use /deals
CompaniesUpsert by external_id; delete archives the record
ContactsUpsert by external_id; delete archives the record
OrdersSingle and bulk create; delete archives the record
ItemsUpsert by external_id; delete archives the record
InventoriesUpsert by external_id; delete archives the record
Inventory TransactionsDelete archives the record
SubscriptionsDelete archives the record
EstimatesDelete archives the record
InvoicesDelete archives the record
Purchase OrdersUpsert by external_id; delete archives the record
Expenses (/v2/public/expenses)Upsert by external_id; delete archives the record
BillsUpsert by external_id; delete archives the record
DisbursementsUpsert by external_id; delete archives the record
RevenueUpsert by external_id; delete archives the record
PaymentsUpsert by external_id; delete archives the record
LocationsUpsert by external_id; delete archives the record
MetersUpsert by external_id; delete archives the record
EmployeesRead employee records and connect HR-related workflows
WorkflowsV2 action parity uses GET /api/v2/public/workflows, POST /api/v2/public/workflows, PATCH /api/v2/public/workflows/{workflow_ref}, GET /api/v2/public/workflows/actions, POST /api/v2/public/workflows/{workflow_ref}/run, and GET /api/v2/public/workflow-runs/{run_id}
ReportsSalesforce-style reportMetadata; delete archives the record
Properties (Schema)Write supported for core commerce, finance, CRM, and HR objects where the object page exposes property endpoints
Workflow, approval, and observability endpoints are shown as separate API groups in the sidebar because they operate across multiple objects. Workflow/action parity uses the V2 public workflow routes: GET /api/v2/public/workflows, POST /api/v2/public/workflows, PATCH /api/v2/public/workflows/{workflow_ref}, GET /api/v2/public/workflows/actions, POST /api/v2/public/workflows/{workflow_ref}/run, and GET /api/v2/public/workflow-runs/{run_id}.

How to use it

  1. Create a Developer API key in Sanka.
  2. Choose the object page that matches the record you want to work with.
  3. Start with GET list or retrieve endpoints to confirm field names and IDs.
  4. Use POST, PUT, or PATCH for writes when the object supports them.
  5. Store the returned Sanka ID and your own external ID so future syncs are repeatable.
Example list request:
cURL
curl "https://api.sanka.com/v2/public/orders" \
  -H "Authorization: Bearer <api_key>" \
  -H "Content-Type: application/json"
When syncing from another system, prefer stable external references such as external_id where the object supports them. This avoids duplicate records and makes retries safer.

GET list or records/query

Use the object-specific GET /v2/public/{object} list endpoint when your integration knows the Sanka object it needs and wants the canonical response for that object. These routes are the simplest path for normal sync jobs, dashboards, and record pickers.Use POST /v2/public/records/query when you are building a generic integration that switches object types at runtime, needs structured filter arrays, or needs to query custom object records through one route.
NeedUse
List companies, contacts, items, orders, invoices, or another known objectGET /v2/public/{object}
Search and page one known object with standard query parametersGET /v2/public/{object}?search=...&limit=...
Build one connector that accepts object_type dynamicallyPOST /v2/public/records/query
Send structured filters in the request bodyPOST /v2/public/records/query
Query custom object records from a generic sync workerPOST /v2/public/records/query
Example records/query request:
cURL
curl -X POST "https://api.sanka.com/v2/public/records/query" \
  -H "Authorization: Bearer <api_key>" \
  -H "Content-Type: application/json" \
  -d '{
    "object_type": "company",
    "limit": 100,
    "sort": "standard:updated_at:asc",
    "filters": [
      {
        "field": "standard:updated_at",
        "operator": "gte",
        "value": "2026-06-01T00:00:00Z"
      }
    ]
  }'

Cursor pagination

For incremental syncs and large exports, prefer cursor pagination over page-based pagination. Cursor pagination keeps a stable order by updated_at, id or created_at, id, so records with the same timestamp still page deterministically.Start with a date sort. Use sort=updated_at for oldest-to-newest syncs, sort=-updated_at for newest-to-oldest reads, or the matching created_at variants when creation time is the right checkpoint.
cURL
curl "https://api.sanka.com/v2/public/items?limit=100&sort=updated_at" \
  -H "Authorization: Bearer <api_key>"
When more records are available, the response includes meta.pagination.next_cursor:
JSON
{
  "success": true,
  "data": {
    "items": []
  },
  "meta": {
    "ctx_id": "ctx_...",
    "pagination": {
      "page": 1,
      "page_size": 100,
      "total": 250,
      "next_cursor": "eyJ2IjoxLCJzb3J0X2ZpZWxkIjoi..."
    }
  }
}
Send that cursor on the next request. The cursor stores the sort field and direction, so sort can be omitted on follow-up calls. If you include sort, it must match the cursor.
cURL
curl "https://api.sanka.com/v2/public/items?limit=100&cursor=eyJ2IjoxLCJzb3J0X2ZpZWxkIjoi..." \
  -H "Authorization: Bearer <api_key>"
For records/query, include cursor in the JSON body:
JSON
{
  "object_type": "item",
  "limit": 100,
  "cursor": "eyJ2IjoxLCJzb3J0X2ZpZWxkIjoi..."
}
Keep the same filters, search term, object type, and limit while walking a cursor. Do not send page with cursor; use page-based pagination only for small interactive pages where users need a specific page number.

Common patterns

GoalStart withThen use
Import customersCompaniesContacts, properties, associations
Sync product master dataItemsInventories, inventory transactions
Create a billing flowOrdersInvoices, payments
Manage purchasingPurchase OrdersBills, disbursements
Track HR operationsEmployeesAbsences, attendance records
Most delete endpoints archive records instead of permanently deleting them. Treat delete operations as record lifecycle changes unless the object page says otherwise.

Next steps

  • Use Authentication to create and rotate Developer API keys.
  • Review Base URL for endpoint namespaces.
  • Open an object page in the sidebar to test a request in the API playground.
  • Use AI API for enrichment and scoring, and Data API for external company discovery.