Introduction
The DADDO API is a RESTful API that enables you to manage products, sales, categories, and user data for your inventory management system. The API uses JSON for request and response bodies and follows standard HTTP response codes.Base URL
The API base URL is configured via environment variables:Authentication
The DADDO API uses Bearer token authentication. Most endpoints require a valid JWT token to be included in the request header:localStorage or sessionStorage.
Authentication Guide
Learn how to obtain and use authentication tokens
Request Format
Content Types
The API accepts the following content types:application/json- For most requestsmultipart/form-data- For file uploads (e.g., product images)
Example Request
Response Format
Success Response
Successful requests return a200 or 201 status code with a JSON response:
Error Response
Error responses include an error message and appropriate HTTP status code:HTTP Status Codes
The API uses standard HTTP status codes:| Code | Description |
|---|---|
200 | Success - Request completed successfully |
201 | Created - Resource created successfully |
400 | Bad Request - Invalid request parameters |
401 | Unauthorized - Missing or invalid authentication token |
403 | Forbidden - Insufficient permissions |
404 | Not Found - Resource not found |
500 | Internal Server Error - Server error occurred |
Error Handling
Token Expiration
When a token expires, the API returns a401 status code. The frontend automatically:
- Detects the 401 response via response interceptor
- Clears stored tokens and user data
- Dispatches a logout action
- Redirects to the login page
Automatic Logout
Rate Limiting
Currently, the API does not enforce rate limiting. However, please be mindful of request volume to ensure optimal performance.CORS
The API is configured withwithCredentials: false, meaning cookies are not sent with requests. Authentication is handled via Bearer tokens in the Authorization header.
API Sections
Authentication
User registration, login, and password reset endpoints
Products
Create, read, update, and delete products and categories
Catalog
Access user catalogs with filtering options
Sales
Manage sales transactions and confirmations
Dashboard
Retrieve analytics and dashboard metrics
SDK and Libraries
The frontend uses Axios for HTTP requests with configured interceptors for authentication and error handling. You can use any HTTP client that supports Bearer token authentication.Support
For API support or questions:- Check the specific endpoint documentation
- Review error messages for troubleshooting guidance
- Ensure your authentication token is valid and not expired