Documentation
README
API Design Conventions
These are the API design standards for our project. Apply these conventions whenever working with API endpoints.
URL Naming
- Use plural nouns for resources:
/users,/orders,/products - Use kebab-case for multi-word resources:
/order-items,/user-profiles - Nested resources for belongsTo relationships:
/users/{id}/orders - Maximum two levels of nesting; beyond that, use query parameters
- Use query parameters for filtering:
/orders?status=active&limit=20
Response Format
All API responses must follow this structure:
{
"data": {},
"error": null,
"meta": {
"page": 1,
"limit": 20,
"total": 100
}
}
data: ๆๅๆถ่ฟๅ็ไธๅกๆฐๆฎerror: ้่ฏฏๆถ่ฟๅ้่ฏฏๅฏน่ฑก{ code, message, details }๏ผๆๅๆถไธบnullmeta: ๅ้กตๅๅ ไฟกๆฏ๏ผๅ่กจๆฅๅฃๅฟ ้กป่ฟๅ
This is the opening of the README. Read the full README on GitHub.