Login
API Documentation
Environment: PHPBase URL: https://mypetkart.co.in/api
| Endpoint | Method | Description | Params / Body |
|---|---|---|---|
/login.php |
POST | User login with email/phone and password |
- email or mobile- password
|
/login_otp.php |
POST | Request OTP for login |
- mobile
|
/verify_otp.php |
POST | Verify received OTP |
- mobile- otp
|
/register.php |
POST | Create a new user |
- name, email, mobile, password
|
/profile.php |
GET | Get user profile |
- Header Authorization: Bearer <token>
|
/update-profile.php |
POST | Update user profile (admin-api) |
- name, email, mobile
|
/address.php |
POST | Add or list addresses |
- user_id, address, lat, lng
|
/area.php |
GET | List serviceable areas |
- optional pincode
|
/cat.php |
GET | List categories | - |
/subcategory.php |
GET | List subcategories by category |
- cat_id
|
/product.php |
GET | List products (filters supported) |
- cat_id, subcat_id, q
|
/related.php |
GET | Related products |
- product_id
|
/search.php |
GET | Search products |
- q
|
/order.php |
POST | Create order |
- user_id, items[], address_id, payment_method
|
/history.php |
GET | Order history |
- user_id
|
/ocancle.php |
POST | Cancel order |
- order_id
|
/rate.php |
POST | Rate product/order |
- product_id or order_id, rating, comment
|
/couponlist.php |
GET | Available coupons | - |
/check_coupon.php |
POST | Validate coupon for cart |
- code, cart_total
|
/offerslider.php, /couponslider.php |
GET | Offer and coupon sliders | - |
/home.php |
GET | Homepage sections data | - |
/notices.php, /noti.php |
GET | Notifications & notices | - |
/wallet.php |
GET | Wallet balance |
- user_id
|
/wallet_up.php |
POST | Wallet top-up |
- user_id, amount
|
/paymentgateway.php |
GET | Payment gateways configuration | - |
/timeslot.php |
GET | Delivery time slots | - |
Authentication
Some endpoints require a token. Pass it using header Authorization: Bearer <token>. Obtain token via /login.php or OTP flow.
Sample Requests
POST {{BASE_URL}}/login.php
Content-Type: application/x-www-form-urlencoded
email=user@example.com&password=secret
GET {{BASE_URL}}/product.php?cat_id=1
Authorization: Bearer <token>
Looking for admin operational APIs? See
/admin-api/ endpoints like order_status.php, complete_order.php, cancel_order.php.