Entities API
Manage business entities (retailers, wholesalers, cultivators).
Endpoints
Get Current Entity
GET /api/v1/entity
Authorization: Bearer {token}
Response:
{
"id": "entity-uuid",
"type": "retailer",
"name": "Main Street Dispensary",
"legal_name": "Main Street Cannabis LLC",
"license_number": "C10-0000001-LIC",
"license_type": "Type 10 - Adult-Use Retail",
"license_expiry": "2027-01-01",
"address": {
"street": "123 Main Street",
"city": "San Francisco",
"state": "CA",
"zip": "94102"
},
"contact": {
"email": "contact@mainst.com",
"phone": "+1-415-555-0123"
},
"settings": {
"auto_sync": true,
"sync_frequency": "realtime",
"low_stock_threshold": 10
},
"locations": [
{
"id": "loc-uuid",
"name": "Main Store",
"address": "..."
}
],
"created_at": "2025-01-01T00:00:00Z"
}
Update Entity
PATCH /api/v1/entity
Authorization: Bearer {token}
{
"contact": {
"email": "new-email@mainst.com"
},
"settings": {
"low_stock_threshold": 15
}
}
Locations
List Locations
GET /api/v1/entity/locations
Add Location
POST /api/v1/entity/locations
Authorization: Bearer {token}
{
"name": "Downtown Branch",
"address": {
"street": "456 Market St",
"city": "San Francisco",
"state": "CA",
"zip": "94105"
},
"license_number": "C10-0000002-LIC"
}
Update Location
PATCH /api/v1/entity/locations/{id}
Delete Location
DELETE /api/v1/entity/locations/{id}
Entity Types
| Type | Description |
|---|---|
retailer | Cannabis retail dispensary |
wholesaler | Distribution/wholesale company |
cultivator | Cannabis cultivation facility |
Team Members
List Team Members
GET /api/v1/entity/team
Invite Team Member
POST /api/v1/entity/team/invite
Authorization: Bearer {token}
{
"email": "newuser@example.com",
"role": "manager",
"locations": ["loc-uuid-1", "loc-uuid-2"]
}
Update Member Role
PATCH /api/v1/entity/team/{user_id}
Remove Member
DELETE /api/v1/entity/team/{user_id}
Roles & Permissions
| Role | Description |
|---|---|
owner | Full access, can delete entity |
admin | Full access, cannot delete entity |
manager | Manage inventory and orders |
viewer | Read-only access |
Connections
Manage relationships with other entities.
List Connections
GET /api/v1/entity/connections
Request Connection
POST /api/v1/entity/connections/request
{
"entity_id": "target-entity-uuid",
"message": "We'd like to establish a wholesale relationship"
}
Accept/Reject Connection
POST /api/v1/entity/connections/{id}/accept
POST /api/v1/entity/connections/{id}/reject