API Documentation

⌘K
  1. Home
  2. API Documentation
  3. API Documentation
  4. Documentation

Documentation

Welcome to the official API documentation for the Tendo App — a mobile-first platform available on both iOS and Android. This API enables seamless communication between the Tendo mobile applications and the backend services.


🌐 Base URL

https://api.tendoapp.com/v1

All endpoints referenced in this documentation are prefixed with the above base URL.


🔐 Authentication

The Tendo API uses JWT (JSON Web Tokens) for authenticating requests.

Include the token in the Authorization header like so:

Authorization: Bearer <your_token>

Tokens are issued upon successful login or registration.


📦 API Endpoints


📋 Table of Contents

  1. Authentication

  2. User Profile

  3. Products / Services

  4. Orders / Bookings

  5. Notifications

  6. App Settings / Info

  7. Error Handling


1. 🔐 Authentication

POST /auth/register

Register a new user.

Body Parameters:

{
  "name": "Jane Doe",
  "email": "jane@example.com",
  "password": "securePassword123",
  "device_token": "firebase_token_here"
}

Success Response:

{
  "token": "jwt_token_here",
  "user": {
    "id": 101,
    "name": "Jane Doe",
    "email": "jane@example.com"
  }
}

POST /auth/login

Login with email and password.

Body Parameters:

{
  "email": "jane@example.com",
  "password": "securePassword123",
  "device_token": "firebase_token_here"
}

Response:

{
  "token": "jwt_token_here",
  "user": {
    "id": 101,
    "name": "Jane Doe",
    "email": "jane@example.com"
  }
}

POST /auth/logout

Logout the current user and revoke push notification tokens.

Headers:

Authorization: Bearer <token>

2. 👤 User Profile

GET /user/profile

Fetch current user profile.

PUT /user/profile

Update user profile.

Body Parameters:

{
  "name": "Jane Smith",
  "phone": "+1234567890",
  "avatar_url": "https://cdn.tendoapp.com/avatars/101.jpg"
}

POST /user/change-password

Change user password.


3. 🛍️ Products / Services

GET /products

Retrieve all products or services.

Query Parameters:

  • category (optional)

  • limit

  • search

Sample Response:

[
  {
    "id": 201,
    "name": "Virtual Consultation",
    "price": 29.99,
    "description": "One-on-one consultation with a specialist",
    "image_url": "https://cdn.tendoapp.com/products/consultation.jpg"
  }
]

GET /products/{id}

Fetch a single product by ID.


4. 📦 Orders / Bookings

POST /orders

Create a new order or booking.

Body Parameters:

{
  "product_id": 201,
  "quantity": 1,
  "payment_method": "credit_card"
}

Response:

{
  "order_id": "ORD-5566",
  "status": "pending",
  "total": 29.99
}

GET /orders

List user’s order history.


GET /orders/{order_id}

Get details of a specific order.


5. 🔔 Notifications

GET /notifications

Retrieve user notifications.

POST /notifications/mark-as-read

Mark specific notifications as read.


6. ⚙️ App Settings / Info

GET /app/settings

Retrieve app configuration (e.g., support email, version info).

GET /app/faq

Get FAQs and help articles.


7. 🚫 Error Handling

Tendo API uses standard HTTP status codes to indicate success or failure:

Code Meaning Description
200 OK Request succeeded
201 Created Resource created
400 Bad Request Malformed request
401 Unauthorized Authentication failed
403 Forbidden Not enough permissions
404 Not Found Resource doesn’t exist
422 Validation Error Input data is invalid
500 Internal Server Error Server-side error

Sample Error:

{
  "error": "Invalid credentials",
  "code": 401
}

📱 Mobile Platform Notes

  • The Tendo App supports push notifications via Firebase (iOS and Android).

  • Uploads (profile pictures, product images) must be done via multipart/form-data.

  • API versioning is managed via the URL (e.g., /v1/, /v2/).


📧 Support

For any integration issues, contact our API team at: api-support@tendoapp.com

 

How can we help?