Search docs ⌘K
esc
Type to search across all documentation pages
Matching

Matching

Domain-agnostic constrained assignment primitives for solving caller-defined matching problems. Provide your own nodes, capacities, edges, costs, and scores, then let SaaSignal return a deterministic assignment result or async operation.

Boundary: Matching computes assignments. It does not geocode addresses, reserve inventory, mutate orders, or perform side effects in your domain model.

Create Matching Operation

POST
/infra/decisioning/matching/operations
matching:write

Solve one constrained assignment problem, either synchronously or as a persisted async operation.

curl
curl -X POST https://api.saasignal.saastemly.com/infra/decisioning/matching/operations \
  -H "Authorization: Bearer sk_live_..." \
  -H "Content-Type: application/json" \
  -d '{"problem":{}}'
json — 200 OK
{ "status": "ok" }
typescript
const result = await ss.infra.decisioning.matching.createOperation({ problem: { objective: 'min_cost', left_nodes: [{ id: 'driver_1' }], right_nodes: [{ id: 'order_1' }], edges: [{ left_id: 'driver_1', right_id: 'order_1', cost: 2.4 }] } })
  1. Open Dashboard → Decisioning and select your project
  2. Go to the Matching workspace
  3. Paste the solve payload into the matching solver card, run it synchronously or asynchronously, and inspect the returned assignment or operation record.
Body field
Type
Description
problem required
object
async
boolean
default false
idempotency_key
string
max 128 chars
Error responses
400 Bad request
401 Unauthorized
402 Insufficient tokens
403 Forbidden
429 Rate limited

Create Batch Matching Operation

POST
/infra/decisioning/matching/operations/batch
matching:write

Solve multiple matching problems in one request, either synchronously or as a persisted async batch operation.

curl
curl -X POST https://api.saasignal.saastemly.com/infra/decisioning/matching/operations/batch \
  -H "Authorization: Bearer sk_live_..." \
  -H "Content-Type: application/json" \
  -d '{"problems":[]}'
json — 200 OK
{ "status": "ok" }
typescript
const result = await ss.infra.decisioning.matching.createBatchOperation({ problems: [{ left_nodes: [{ id: 'a' }], right_nodes: [{ id: 'b' }], edges: [{ left_id: 'a', right_id: 'b', cost: 1 }] }] })
  1. Open Dashboard → API Console and select your project
  2. Choose POST /infra/decisioning/matching/operations/batch from the route list
  3. Fill in the JSON body or Storage references, then send the request and inspect the response directly in the console
Body field
Type
Description
problems required
array
1–25 items
async
boolean
default false
idempotency_key
string
max 128 chars
Error responses
400 Bad request
401 Unauthorized
402 Insufficient tokens
403 Forbidden
429 Rate limited

Get Matching Operation

GET
/infra/decisioning/matching/operations/{operation_id}
matching:read

Get the status and result of an async matching operation.

curl
curl https://api.saasignal.saastemly.com/infra/decisioning/matching/operations/{operation_id} \
  -H "Authorization: Bearer sk_live_..."
json — 200 OK
{ "status": "ok" }
typescript
const operation = await ss.infra.decisioning.matching.getOperation('mop_123')
  1. Open Dashboard → Decisioning and select your project
  2. Go to the Matching workspace
  3. Enter the `mop_...` identifier in the operator rail to inspect the async solve status, result payload, or error details.
Path param
Type
Description
operation_id required
string
Error responses
401 Unauthorized
403 Forbidden
404 Not found
429 Rate limited

Cancel Matching Operation

POST
/infra/decisioning/matching/operations/{operation_id}/cancel
matching:write

Cancel an in-flight matching operation if it has not completed yet.

curl
curl -X POST https://api.saasignal.saastemly.com/infra/decisioning/matching/operations/{operation_id}/cancel \
  -H "Authorization: Bearer sk_live_..."
json — 200 OK
{ "status": "ok" }
typescript
const operation = await ss.infra.decisioning.matching.cancelOperation('mop_123')
  1. Open Dashboard → Decisioning and select your project
  2. Go to the Matching workspace
  3. Load the async operation in the operator rail, then use the cancel action to stop queued or in-flight solve work.
Path param
Type
Description
operation_id required
string
Error responses
401 Unauthorized
402 Insufficient tokens
403 Forbidden
404 Not found
429 Rate limited

Create Matching Template

POST
/infra/decisioning/matching/templates
matching:write

Persist a reusable matching problem template for later operation creation.

curl
curl -X POST https://api.saasignal.saastemly.com/infra/decisioning/matching/templates \
  -H "Authorization: Bearer sk_live_..." \
  -H "Content-Type: application/json" \
  -d '{"name":"example","problem":{}}'
json — 200 OK
{ "status": "ok" }
typescript
const template = await ss.infra.decisioning.matching.createTemplate({ name: 'dispatch-default', problem: { objective: 'min_cost', left_nodes: [{ id: 'left_seed' }], right_nodes: [{ id: 'right_seed' }], edges: [{ left_id: 'left_seed', right_id: 'right_seed', cost: 1 }] } })
  1. Open Dashboard → API Console and select your project
  2. Choose POST /infra/decisioning/matching/templates from the route list
  3. Fill in the JSON body or Storage references, then send the request and inspect the response directly in the console
Body field
Type
Description
name required
string
1–120 chars
description
mixed
problem required
object
default_options
mixed
Error responses
400 Bad request
401 Unauthorized
402 Insufficient tokens
403 Forbidden
409 Conflict
429 Rate limited

List Matching Templates

GET
/infra/decisioning/matching/templates
matching:read

List saved matching templates for the active project.

curl
curl https://api.saasignal.saastemly.com/infra/decisioning/matching/templates \
  -H "Authorization: Bearer sk_live_..."
json — 200 OK
{ "status": "ok" }
typescript
const { templates } = await ss.infra.decisioning.matching.listTemplates()
  1. Open Dashboard → API Console and select your project
  2. Choose GET /infra/decisioning/matching/templates from the route list
  3. Fill in the JSON body or Storage references, then send the request and inspect the response directly in the console
Error responses
401 Unauthorized
403 Forbidden
429 Rate limited

Get Matching Template

GET
/infra/decisioning/matching/templates/{template_id}
matching:read

Get one saved matching template.

curl
curl https://api.saasignal.saastemly.com/infra/decisioning/matching/templates/{template_id} \
  -H "Authorization: Bearer sk_live_..."
json — 200 OK
{ "status": "ok" }
typescript
const template = await ss.infra.decisioning.matching.getTemplate('mtpl_123')
  1. Open Dashboard → API Console and select your project
  2. Choose GET /infra/decisioning/matching/templates/{template_id} from the route list
  3. Fill in the JSON body or Storage references, then send the request and inspect the response directly in the console
Path param
Type
Description
template_id required
string
Error responses
401 Unauthorized
403 Forbidden
404 Not found
429 Rate limited

Update Matching Template

PATCH
/infra/decisioning/matching/templates/{template_id}
matching:write

Update mutable matching template fields.

curl
curl -X PATCH https://api.saasignal.saastemly.com/infra/decisioning/matching/templates/{template_id} \
  -H "Authorization: Bearer sk_live_..." \
  -H "Content-Type: application/json" \
  -d '{}'
json — 200 OK
{ "status": "ok" }
typescript
const template = await ss.infra.decisioning.matching.updateTemplate('mtpl_123', { description: 'Default driver assignment constraints' })
  1. Open Dashboard → API Console and select your project
  2. Choose PATCH /infra/decisioning/matching/templates/{template_id} from the route list
  3. Fill in the JSON body or Storage references, then send the request and inspect the response directly in the console
Path param
Type
Description
template_id required
string
Body field
Type
Description
name
string
1–120 chars
description
mixed
problem
object
default_options
mixed
Error responses
400 Bad request
401 Unauthorized
402 Insufficient tokens
403 Forbidden
404 Not found
429 Rate limited

Delete Matching Template

DELETE
/infra/decisioning/matching/templates/{template_id}
matching:write

Delete a saved matching template.

curl
curl -X DELETE https://api.saasignal.saastemly.com/infra/decisioning/matching/templates/{template_id} \
  -H "Authorization: Bearer sk_live_..."
typescript
await ss.infra.decisioning.matching.deleteTemplate('mtpl_123')
  1. Open Dashboard → API Console and select your project
  2. Choose DELETE /infra/decisioning/matching/templates/{template_id} from the route list
  3. Fill in the JSON body or Storage references, then send the request and inspect the response directly in the console
Path param
Type
Description
template_id required
string
Error responses
401 Unauthorized
402 Insufficient tokens
403 Forbidden
404 Not found
429 Rate limited

Create Template Matching Operation

POST
/infra/decisioning/matching/templates/{template_id}/operations
matching:write

Solve a saved matching template with optional overrides, either synchronously or as a persisted async operation.

curl
curl -X POST https://api.saasignal.saastemly.com/infra/decisioning/matching/templates/{template_id}/operations \
  -H "Authorization: Bearer sk_live_..." \
  -H "Content-Type: application/json" \
  -d '{}'
json — 200 OK
{ "status": "ok" }
typescript
const result = await ss.infra.decisioning.matching.createTemplateOperation('mtpl_123', { override: { left_nodes: [{ id: 'driver_1' }], right_nodes: [{ id: 'order_1' }], edges: [{ left_id: 'driver_1', right_id: 'order_1', cost: 1.2 }] } })
  1. Open Dashboard → API Console and select your project
  2. Choose POST /infra/decisioning/matching/templates/{template_id}/operations from the route list
  3. Fill in the JSON body or Storage references, then send the request and inspect the response directly in the console
Path param
Type
Description
template_id required
string
Body field
Type
Description
override
object
async
boolean
default false
idempotency_key
string
max 128 chars
Error responses
400 Bad request
401 Unauthorized
402 Insufficient tokens
403 Forbidden
404 Not found
429 Rate limited