Skip to main content

API Overview

Cascadia exposes a RESTful JSON API for programmatic access to all functionality.

Base URL

https://your-instance.com/api

Authentication

All API requests require authentication. See Authentication for details.

curl -H "Authorization: Bearer <token>" \
https://your-instance.com/api/parts

Response Format

All responses are JSON with a consistent structure:

Success Response

{
"data": { ... },
"meta": {
"total": 100,
"page": 1,
"limit": 20
}
}

Error Response

{
"error": {
"code": "VALIDATION_ERROR",
"message": "Invalid item number format",
"details": [
{ "field": "itemNumber", "message": "Must start with a letter" }
]
}
}

HTTP Status Codes

CodeDescription
200Success
201Created
400Bad Request - Invalid input
401Unauthorized - Authentication required
403Forbidden - Insufficient permissions
404Not Found
500Internal Server Error

Pagination

List endpoints support pagination:

GET /api/parts?page=1&limit=20

Response includes meta information:

{
"data": [...],
"meta": {
"total": 150,
"page": 1,
"limit": 20,
"totalPages": 8
}
}

Filtering

Filter results using query parameters:

GET /api/parts?state=Released&makeBuy=make

Sorting

Sort results using the sort parameter:

GET /api/parts?sort=itemNumber:asc
GET /api/parts?sort=updatedAt:desc

Available Endpoints

Items

MethodEndpointDescription
GET/api/itemsList all items
GET/api/items/:idGet item by ID
POST/api/itemsCreate item
PUT/api/items/:idUpdate item
DELETE/api/items/:idDelete item

Parts

MethodEndpointDescription
GET/api/partsList parts
GET/api/parts/:idGet part
POST/api/partsCreate part
PUT/api/parts/:idUpdate part
DELETE/api/parts/:idDelete part
GET/api/parts/:id/bomGet BOM
POST/api/parts/:id/bomAdd BOM item

Documents

MethodEndpointDescription
GET/api/documentsList documents
GET/api/documents/:idGet document
POST/api/documentsCreate document
PUT/api/documents/:idUpdate document
POST/api/documents/:id/filesUpload file
GET/api/documents/:id/files/:fileIdDownload file

Change Orders

MethodEndpointDescription
GET/api/change-ordersList change orders
GET/api/change-orders/:idGet change order
POST/api/change-ordersCreate change order
PUT/api/change-orders/:idUpdate change order
POST/api/change-orders/:id/submitSubmit for approval
POST/api/change-orders/:id/approveApprove
POST/api/change-orders/:id/releaseRelease

Users

MethodEndpointDescription
GET/api/usersList users
GET/api/users/:idGet user
POST/api/usersCreate user
PUT/api/users/:idUpdate user
GET/api/users/meGet current user

Programs

MethodEndpointDescription
GET/api/programsList programs
GET/api/programs/:idGet program
POST/api/programsCreate program
PUT/api/programs/:idUpdate program

Products

MethodEndpointDescription
GET/api/productsList products
GET/api/products/:idGet product
POST/api/productsCreate product
PUT/api/products/:idUpdate product
GET/api/products/:id/branchesList branches
GET/api/products/:id/commitsList commits

Rate Limiting

API requests are rate limited:

  • Default: 100 requests per minute
  • Authenticated: 1000 requests per minute

Rate limit headers are included in responses:

X-RateLimit-Limit: 1000
X-RateLimit-Remaining: 999
X-RateLimit-Reset: 1640000000

Webhooks

Coming Soon

Webhook support for real-time event notifications is planned.

Next Steps