.do
Resources

Businesses

Business entity management

Manage business entities and their metadata.

Endpoints

List Businesses

GET /:namespace/businesses

Query Parameters:

  • limit (integer) - Max items (default: 10)
  • offset (integer) - Skip items (default: 0)
  • industry (string) - Filter by industry

Get Business

GET /:namespace/businesses/:id

Create Business

POST /:namespace/businesses

Body:

{
  "name": "Acme Inc",
  "industry": "Manufacturing",
  "ein": "12-3456789",
  "address": {
    "street": "123 Main St",
    "city": "San Francisco",
    "state": "CA",
    "zip": "94105"
  }
}

Update Business

PUT /:namespace/businesses/:id

Body:

{
  "industry": "Advanced Manufacturing",
  "address": {
    "street": "456 New St",
    "city": "San Francisco",
    "state": "CA",
    "zip": "94105"
  }
}

Delete Business

DELETE /:namespace/businesses/:id

SDK

import { $ } from 'sdk.do'

const client = $('acme.com')

// Create
const business = await client.Business.create({
  name: 'Acme Inc',
  industry: 'Manufacturing',
  ein: '12-3456789',
  address: {
    street: '123 Main St',
    city: 'San Francisco',
    state: 'CA',
    zip: '94105'
  }
})

// List
const businesses = await client.Business.list()

// Filter by industry
const mfg = await client.Business.list({ industry: 'Manufacturing' })

// Get
const biz = await client.Business.get('biz_123')

// Update
await client.Business.update('biz_123', {
  industry: 'Advanced Manufacturing'
})

// Delete
await client.Business.delete('biz_123')