REST API v1 — Sales Force (Postman ready)
JWT API for the Flutter field-sales app. Copy any request below into Postman as-is.
https://sales.anoopjewellers.co.in/api/v1/https://sales.anoopjewellers.co.in/api/v1/GET https://sales.anoopjewellers.co.in/api/v1docs/API.mdPostman — import & test in 2 minutes
- Import collection file:
docs/postman/Anoop_Jewellers_Sales_API.postman_collection.json - Set collection variable
base_urltohttps://sales.anoopjewellers.co.in/api/v1 - Run Auth → Login first (token is saved automatically)
- Run any other request — Bearer token is already set
Sales person accounts are created in Admin → Sales Persons (no public register). Login with that email/mobile + password.
Headers
Public (login / refresh / forgot-password):
Content-Type: application/json Accept: application/json
Protected (everything else):
Authorization: Bearer {{access_token}}
Content-Type: application/json
Accept: application/json
Photo upload: use multipart/form-data (no JSON Content-Type). Keep Bearer token.
Response format
Success
{
"status": true,
"message": "Success",
"data": {}
}
Error
{
"status": false,
"message": "Validation failed",
"errors": {
"mobile": ["Customer mobile must be unique"]
}
}
Pagination
{
"status": true,
"message": "Success",
"data": {
"data": [],
"meta": {
"current_page": 1,
"per_page": 20,
"total": 42,
"last_page": 3
}
}
}
Auth flow
POST /login→ saveaccess_token+refresh_token- Send
Authorization: Bearer access_tokenon protected calls - On
401→POST /refresh-token - If refresh fails → logout to login screen
Authentication
Login
Login with email OR mobile + password. Sales person must be approved.
Postman
POST https://sales.anoopjewellers.co.in/api/v1/login
Content-Type: application/json
Accept: application/json
{
"email": "sales1@example.com",
"password": "Password@123"
} Or use mobile:
{
"mobile": "9876500001",
"password": "Password@123"
}
Success 200
{
"status": true,
"message": "Login successful",
"data": {
"access_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9...",
"token_type": "Bearer",
"expires_in": 3600,
"refresh_token": "a1b2c3d4e5...",
"user": {
"id": 3,
"name": "Amit Kumar",
"email": "sales1@example.com",
"mobile": "9876500001",
"role": "sales_person",
"avatar": null
},
"sales_person": {
"id": 5,
"full_name": "Amit Kumar",
"mobile": "9876500001",
"city": "Delhi",
"team_id": 1,
"approval_status": "approved",
"profile_photo": null
}
}
}
Errors
401Invalid credentials / not approved422Missing email/mobile or password429Too many attempts
Logout
Revoke refresh token.
Postman
POST https://sales.anoopjewellers.co.in/api/v1/logout
Authorization: Bearer {{access_token}}
Content-Type: application/json
Accept: application/json
{
"refresh_token": "{{refresh_token}}"
}{
"status": true,
"message": "Logged out",
"data": []
}
Refresh token
Get new access + refresh tokens.
Postman
POST https://sales.anoopjewellers.co.in/api/v1/refresh-token
Content-Type: application/json
Accept: application/json
{
"refresh_token": "{{refresh_token}}"
} Response shape same as login data.
Forgot password
Always returns generic success.
Postman
POST https://sales.anoopjewellers.co.in/api/v1/forgot-password
Content-Type: application/json
Accept: application/json
{
"email": "sales1@example.com"
} Change password
Change password for logged-in user.
Postman
POST https://sales.anoopjewellers.co.in/api/v1/change-password
Authorization: Bearer {{access_token}}
Content-Type: application/json
Accept: application/json
{
"current_password": "Password@123",
"password": "NewPass@123",
"password_confirmation": "NewPass@123"
} Profile
Get profile
User + sales_person profile.
Postman
GET https://sales.anoopjewellers.co.in/api/v1/profile
Authorization: Bearer {{access_token}}
Content-Type: application/json
Accept: application/json{
"status": true,
"message": "Success",
"data": {
"id": 3,
"name": "Amit Kumar",
"email": "sales1@example.com",
"mobile": "9876500001",
"role": "sales_person",
"avatar": null,
"sales_person": {
"id": 5,
"full_name": "Amit Kumar",
"mobile": "9876500001",
"city": "Delhi",
"address": "Connaught Place",
"pin_code": "110001",
"vehicle_number": "DL01AB1234"
}
}
}
Update profile
Update user + sales person fields.
Postman
PUT https://sales.anoopjewellers.co.in/api/v1/profile
Authorization: Bearer {{access_token}}
Content-Type: application/json
Accept: application/json
{
"name": "Amit Kumar",
"mobile": "9876500001",
"email": "sales1@example.com",
"alternate_mobile": "9876500099",
"address": "Connaught Place",
"pin_code": "110001",
"city": "Delhi",
"vehicle_number": "DL01AB1234"
} Upload profile photo
Multipart form-data. Field: image OR photo OR profile_photo. Alias: POST /profile/image
POST https://sales.anoopjewellers.co.in/api/v1/profile/photo
Authorization: Bearer {{access_token}}
Body → form-data:
key: image type: File value: (select photo.jpg)
{
"status": true,
"message": "Profile photo uploaded",
"data": {
"path": "profile/ab12cd.jpg",
"url": "https://sales.anoopjewellers.co.in/uploads/profile/ab12cd.jpg"
}
}
Dashboard
Dashboard KPIs
Today sales, targets, attendance timer, customers, orders.
Postman
GET https://sales.anoopjewellers.co.in/api/v1/dashboard
Authorization: Bearer {{access_token}}
Content-Type: application/json
Accept: application/json{
"status": true,
"message": "Dashboard data",
"data": {
"today_sales": 125000,
"today_target": 50000,
"weekly_target": 250000,
"monthly_target": 1000000,
"achievement_percent": 42.5,
"total_customers": 18,
"total_orders": 12,
"today_visits": 3,
"working_timer": 145,
"working_minutes": 145,
"check_in_status": "checked_in",
"checked_in": true,
"targets": {},
"orders_summary": {},
"attendance_today": {}
}
}
Summary (alias)
Same payload as GET /dashboard.
Postman
GET https://sales.anoopjewellers.co.in/api/v1/summary
Authorization: Bearer {{access_token}}
Content-Type: application/json
Accept: application/json Monthly sales chart
Last 12 months order totals for the logged-in sales person.
Postman
GET https://sales.anoopjewellers.co.in/api/v1/sales/monthly
Authorization: Bearer {{access_token}}
Content-Type: application/json
Accept: application/json{
"status": true,
"message": "Success",
"data": {
"rows": [
{ "month": "2026-01", "total": "80000.00", "orders": 4 },
{ "month": "2026-02", "total": "120000.00", "orders": 6 }
]
}
}
Sales summary
Today / week / month order counts and sales totals.
Postman
GET https://sales.anoopjewellers.co.in/api/v1/sales/summary
Authorization: Bearer {{access_token}}
Content-Type: application/json
Accept: application/json{
"status": true,
"message": "Success",
"data": {
"today_orders": 2,
"weekly_orders": 8,
"monthly_orders": 12,
"total_sales": 540000,
"today_sales": 125000
}
}
Attendance
Check in
Start work session. Optional GPS. Returns attendance_check_id for periodic location pings.
Postman
POST https://sales.anoopjewellers.co.in/api/v1/attendance/check-in
Authorization: Bearer {{access_token}}
Content-Type: application/json
Accept: application/json
{
"lat": 28.6139,
"lng": 77.2090
}{
"status": true,
"message": "Checked in successfully",
"data": {
"attendance_id": 10,
"session_id": 22,
"attendance_check_id": 22,
"status": "present",
"check_in_at": "2026-08-11 09:05:00",
"checked_in": true
}
}
Periodic Location Ping
Post periodic GPS location (every 5 minutes) during an active check-in session.
Postman
POST https://sales.anoopjewellers.co.in/api/v1/attendance/location
Authorization: Bearer {{access_token}}
Content-Type: application/json
Accept: application/json
{
"attendance_check_id": 22,
"lat": 28.6139,
"lng": 77.2090,
"recorded_at": "2026-08-11 09:10:00"
}{
"status": true,
"message": "Location logged successfully",
"data": {
"log_id": 101,
"attendance_check_id": 22,
"sales_person_id": 5,
"lat": 28.6139,
"lng": 77.209,
"recorded_at": "2026-08-11 09:10:00"
}
}
Check out
End open session. Optional GPS.
Postman
POST https://sales.anoopjewellers.co.in/api/v1/attendance/check-out
Authorization: Bearer {{access_token}}
Content-Type: application/json
Accept: application/json
{
"lat": 28.6139,
"lng": 77.2090
} Today attendance
Today row + open session + working minutes.
Postman
GET https://sales.anoopjewellers.co.in/api/v1/attendance/today
Authorization: Bearer {{access_token}}
Content-Type: application/json
Accept: application/json{
"status": true,
"message": "Success",
"data": {
"attendance": { "id": 10, "status": "present", "working_minutes": 120 },
"checked_in": true,
"open_session": { "id": 22, "check_in_at": "2026-08-11 09:05:00" },
"working_minutes": 145,
"working_timer": 145
}
}
Attendance history
Paginated attendance rows.
Postman
GET https://sales.anoopjewellers.co.in/api/v1/attendance/history?page=1
Authorization: Bearer {{access_token}}
Content-Type: application/json
Accept: application/json Attendance calendar
Days for a month. Query: month=YYYY-MM
Postman
GET https://sales.anoopjewellers.co.in/api/v1/attendance/calendar?month=2026-08
Authorization: Bearer {{access_token}}
Content-Type: application/json
Accept: application/json{
"status": true,
"message": "Success",
"data": {
"month": "2026-08",
"days": [
{
"attendance_date": "2026-08-01",
"status": "present",
"working_minutes": 480,
"check_in_at": "2026-08-01 09:10:00",
"check_out_at": "2026-08-01 18:00:00"
}
]
}
}
Monthly attendance summary
Counts by status. Query: month=YYYY-MM
Postman
GET https://sales.anoopjewellers.co.in/api/v1/attendance/monthly?month=2026-08
Authorization: Bearer {{access_token}}
Content-Type: application/json
Accept: application/json{
"status": true,
"message": "Success",
"data": {
"month": "2026-08",
"summary": {
"present": 18,
"late": 2,
"absent": 1,
"on_leave": 1,
"holiday": 0,
"working_minutes": 9000
}
}
}
Targets
Daily target
Current daily target + achievement.
Postman
GET https://sales.anoopjewellers.co.in/api/v1/targets/daily
Authorization: Bearer {{access_token}}
Content-Type: application/json
Accept: application/json{
"status": true,
"message": "Success",
"data": {
"period_type": "daily",
"target_amount": 50000,
"achieved_amount": 12500,
"achievement_percent": 25
}
}
Weekly target
Current weekly target.
Postman
GET https://sales.anoopjewellers.co.in/api/v1/targets/weekly
Authorization: Bearer {{access_token}}
Content-Type: application/json
Accept: application/json Monthly target
Current monthly target.
Postman
GET https://sales.anoopjewellers.co.in/api/v1/targets/monthly
Authorization: Bearer {{access_token}}
Content-Type: application/json
Accept: application/json Customers
POST /customers auto-assigns to the logged-in sales person (do not send assigned_sales_person_id).Required on create:
name, mobile, latitude + longitude.GPS aliases: lat =
lat | alt | latitude · lng = lng | lang | long | longitude.Status:
pending | not_interested | interested | reschedule (if reschedule → reschedule_date_time required).List / show / update / delete / follow-up / photo = own customers only. Mobile must be unique.
Location fields (create / update / follow-up)
| Stored as | Accepted request keys | Required on create? |
|---|---|---|
lat | lat, alt, latitude | Yes |
lng | lng, lang, long, longitude | Yes |
Response always returns lat and lng. Example using Flutter-style aliases: {"alt":28.61,"lang":77.20}
List my customers
Only customers assigned to logged-in sales person. Supports search + status + date filters.
Postman
GET https://sales.anoopjewellers.co.in/api/v1/customers?page=1&per_page=20&search=rahul&status=reschedule&customer_type=retail&from_date=2026-08-01&to_date=2026-08-31
Authorization: Bearer {{access_token}}
Content-Type: application/json
Accept: application/json Query params
| Param | Description |
|---|---|
page, per_page | Pagination (default 20) |
search | name / mobile / email / pin_code / summary |
status | pending | not_interested | interested | reschedule |
customer_type | e.g. retail |
date | Exact created date YYYY-MM-DD |
from_date / to_date | Created date range (aliases: start_date / end_date) |
Success sample
{
"status": true,
"message": "Success",
"data": {
"data": [
{
"id": 10,
"name": "Priya Verma",
"mobile": "9876543210",
"email": "priya@example.com",
"address": "Mumbai",
"pin_code": "400001",
"customer_type": "retail",
"notes": null,
"status": "interested",
"reschedule_date_time": null,
"summary": "Wants gold set",
"lat": "28.6139390",
"lng": "77.2090210",
"assigned_sales_person_id": 5,
"last_visit_at": "2026-08-30 10:00:00",
"created_at": "2026-08-30 10:00:00"
}
],
"meta": { "current_page": 1, "per_page": 20, "total": 1, "last_page": 1 }
}
}
Check if customer mobile exists
Also available as GET/POST /customers/check_mobile, /check-customer-mobile, /check_customer_mobile. Optional ignore_id when editing.
Postman
POST https://sales.anoopjewellers.co.in/api/v1/customers/check-mobile
Authorization: Bearer {{access_token}}
Content-Type: application/json
Accept: application/json
{
"mobile": "9876543210",
"ignore_id": null
}{
"status": true,
"message": "Customer mobile number is available",
"data": {
"exists": false,
"name": null,
"mobile": "9876543210",
"customer": null
}
}
Get customer details, follow-ups & photos
Must be assigned to you. Includes follow_ups[] and visit_photos[].
Postman
GET https://sales.anoopjewellers.co.in/api/v1/customers/2
Authorization: Bearer {{access_token}}
Content-Type: application/json
Accept: application/json{
"status": true,
"message": "Success",
"data": {
"id": 2,
"name": "Rahul Sharma",
"mobile": "9000000002",
"email": "rahul@example.com",
"address": "Delhi",
"pin_code": "110001",
"customer_type": "retail",
"notes": null,
"assigned_sales_person_id": 5,
"status": "reschedule",
"reschedule_date_time": "2026-08-25 15:30:00",
"summary": "Callback requested",
"lat": "28.6139390",
"lng": "77.2090210",
"assigned_sales_person": {
"id": 5,
"full_name": "Amit Kumar",
"mobile": "9876500001"
},
"follow_ups": [
{
"id": 12,
"status": "reschedule",
"reschedule_date_time": "2026-08-25 15:30:00",
"summary": "Callback requested",
"lat": "28.6139390",
"lng": "77.2090210",
"created_at": "2026-08-23 12:00:00"
}
],
"visit_photos": [
{
"id": 4,
"photo_path": "customer_photos/abc123.jpg",
"url": "https://sales.anoopjewellers.co.in/uploads/customer_photos/abc123.jpg",
"notes": "Initial visit photo"
}
]
}
}
Create customer (auto-assign)
Requires name, mobile, lat/alt and lng/lang. Optional photo multipart. Optional device_id (must be approved).
Postman
POST https://sales.anoopjewellers.co.in/api/v1/customers
Authorization: Bearer {{access_token}}
Content-Type: application/json
Accept: application/json
{
"name": "Priya Verma",
"mobile": "9876543210",
"lat": 28.613939,
"lng": 77.209021,
"status": "reschedule",
"reschedule_date_time": "2026-08-26 11:00:00",
"summary": "Meeting rescheduled for Wednesday morning",
"email": "priya@example.com",
"address": "Mumbai",
"pin_code": "400001",
"customer_type": "retail",
"notes": "Interested in gold set",
"device_id": "unique_device_uuid_12345"
} Same create using aliases alt / lang:
{
"name": "Priya Verma",
"mobile": "9876543210",
"alt": 28.613939,
"lang": 77.209021,
"status": "pending"
}
Fields
| Field | Required | Notes |
|---|---|---|
name | Yes | Max 150 |
mobile | Yes | Unique |
lat / alt / latitude | Yes | GPS latitude |
lng / lang / long / longitude | Yes | GPS longitude |
status | No | Default pending |
reschedule_date_time | If status=reschedule | Also accepts rescheduled_at |
summary | No | Also accepts description |
email, address, pin_code, customer_type, notes | No | — |
device_id | No* | If sent, device must be approved (or header X-Device-Id) |
photo / image / visit_photo | No | multipart/form-data file |
Success 201
{
"status": true,
"message": "Customer created and assigned to you",
"data": {
"id": 10,
"status": "reschedule",
"reschedule_date_time": "2026-08-26 11:00:00",
"summary": "Meeting rescheduled for Wednesday morning",
"lat": 28.613939,
"lng": 77.209021,
"photo_path": null,
"photo_url": null,
"assigned_sales_person_id": 5,
"assigned_sales_person": {
"id": 5,
"full_name": "Amit Kumar",
"mobile": "9876500001"
}
}
}
Errors
422— missing lat/lng (lang), validation, duplicate mobile, missing reschedule_date_time403— device not approved
Update customer
Same fields as create. Own customers only. lat/lng optional (keeps previous if omitted).
Postman
PUT https://sales.anoopjewellers.co.in/api/v1/customers/10
Authorization: Bearer {{access_token}}
Content-Type: application/json
Accept: application/json
{
"name": "Priya Verma",
"mobile": "9876543210",
"email": "priya@example.com",
"address": "Mumbai Andheri",
"pin_code": "400053",
"customer_type": "retail",
"notes": "Follow up next week",
"status": "interested",
"summary": "Confirmed interested in gold bangles set",
"lat": 28.613939,
"lng": 77.209021
} Add follow-up entry
Also POST /customers/{id}/follow_up. Updates customer status + logs follow-up. Optional photo.
Postman
POST https://sales.anoopjewellers.co.in/api/v1/customers/10/follow-up
Authorization: Bearer {{access_token}}
Content-Type: application/json
Accept: application/json
{
"status": "reschedule",
"reschedule_date_time": "2026-08-28 14:00:00",
"summary": "Call back on Friday afternoon",
"lat": 28.613939,
"lng": 77.209021
}{
"status": true,
"message": "Follow-up recorded successfully",
"data": {
"follow_up_id": 15,
"customer_id": 10,
"status": "reschedule",
"reschedule_date_time": "2026-08-28 14:00:00",
"summary": "Call back on Friday afternoon",
"photo_path": null,
"photo_url": null
}
}
Upload visit photo
multipart/form-data. Field: photo | image | visit_photo.
POST https://sales.anoopjewellers.co.in/api/v1/customers/10/photo
Authorization: Bearer {{access_token}}
Body → form-data:
photo = (file)
lat = 28.613939 (optional; also alt)
lng = 77.209021 (optional; also lang)
notes = Store front photo
Delete customer
Soft-delete own customer.
Postman
DELETE https://sales.anoopjewellers.co.in/api/v1/customers/10
Authorization: Bearer {{access_token}}
Content-Type: application/json
Accept: application/json{
"status": true,
"message": "Customer deleted",
"data": []
}
Orders
List my orders
Orders created by logged-in sales person.
Postman
GET https://sales.anoopjewellers.co.in/api/v1/orders?page=1&per_page=20&status=pending&search=ORD
Authorization: Bearer {{access_token}}
Content-Type: application/json
Accept: application/json Get order + items
Order detail with line items.
Postman
GET https://sales.anoopjewellers.co.in/api/v1/orders/1
Authorization: Bearer {{access_token}}
Content-Type: application/json
Accept: application/json{
"status": true,
"message": "Success",
"data": {
"id": 1,
"order_number": "ORD20260800001",
"customer_id": 10,
"customer_name": "Priya Verma",
"sales_person_id": 5,
"total_amount": "48500.00",
"status": "pending",
"payment_mode": "upi",
"payment_status": "pending",
"order_date": "2026-08-11",
"items": [
{
"id": 1,
"item_name": "Gold Ring 22K",
"quantity": 1,
"price": "45000.00"
},
{
"id": 2,
"item_name": "Silver Chain",
"quantity": 1,
"price": "3500.00"
}
]
}
}
Create order
At least one item required. customer_id must be yours.
Postman
POST https://sales.anoopjewellers.co.in/api/v1/orders
Authorization: Bearer {{access_token}}
Content-Type: application/json
Accept: application/json
{
"customer_id": 10,
"payment_mode": "upi",
"payment_status": "pending",
"status": "pending",
"notes": "Deliver after festival",
"order_date": "2026-08-11",
"items": [
{ "item_name": "Gold Ring 22K", "quantity": 1, "price": 45000 },
{ "name": "Silver Chain", "quantity": 1, "price": 3500 }
]
} Required
customer_id, items[] with price and item_name (or name), optional quantity (default 1)
Success 201
{
"status": true,
"message": "Order created",
"data": {
"id": 1,
"order": { }
}
}
Status values: pending, approved, rejected, completed, cancelled
Update order
Update payment/status/notes (not line items).
Postman
PUT https://sales.anoopjewellers.co.in/api/v1/orders/1
Authorization: Bearer {{access_token}}
Content-Type: application/json
Accept: application/json
{
"payment_mode": "cash",
"payment_status": "paid",
"status": "completed",
"notes": "Collected in full"
} Leave
Request leave
Creates pending leave; notifies admins.
Postman
POST https://sales.anoopjewellers.co.in/api/v1/leave/request
Authorization: Bearer {{access_token}}
Content-Type: application/json
Accept: application/json
{
"leave_date": "2026-08-20",
"leave_to_date": "2026-08-21",
"leave_type": "casual",
"reason": "Family function",
"notes": "Will be reachable on phone"
} leave_type examples: casual, sick, emergency
{
"status": true,
"message": "Leave request submitted",
"data": { "id": 7 }
}
Leave history
Last 100 leave requests.
Postman
GET https://sales.anoopjewellers.co.in/api/v1/leave/history
Authorization: Bearer {{access_token}}
Content-Type: application/json
Accept: application/json Pending leave status
Only pending requests.
Postman
GET https://sales.anoopjewellers.co.in/api/v1/leave/status
Authorization: Bearer {{access_token}}
Content-Type: application/json
Accept: application/json{
"status": true,
"message": "Success",
"data": {
"pending": [],
"count": 0
}
}
Team
Team performance
Your team members + daily/monthly sales.
Postman
GET https://sales.anoopjewellers.co.in/api/v1/team/performance
Authorization: Bearer {{access_token}}
Content-Type: application/json
Accept: application/json{
"status": true,
"message": "Success",
"data": {
"team": { "id": 1, "name": "North Zone" },
"members": [
{
"id": 5,
"full_name": "Amit Kumar",
"mobile": "9876500001",
"monthly_sales": "540000.00",
"daily_sales": "125000.00"
}
]
}
}
Leaderboard
Query: period=daily|weekly|monthly
Postman
GET https://sales.anoopjewellers.co.in/api/v1/team/leaderboard?period=monthly
Authorization: Bearer {{access_token}}
Content-Type: application/json
Accept: application/json{
"status": true,
"message": "Success",
"data": {
"period": "monthly",
"leaderboard": [
{
"rank": 1,
"id": 5,
"full_name": "Amit Kumar",
"city": "Delhi",
"team_name": "North Zone",
"total_sales": "540000.00",
"orders_count": 12
}
]
}
}
Notifications
List notifications
Paginated. Query: page
Postman
GET https://sales.anoopjewellers.co.in/api/v1/notifications?page=1
Authorization: Bearer {{access_token}}
Content-Type: application/json
Accept: application/json{
"status": true,
"message": "Success",
"data": {
"data": [
{
"id": 3,
"title": "Leave approved",
"body": "Your leave on 2026-08-20 was approved",
"type": "leave",
"is_read": 0
}
],
"unread": 1,
"meta": {
"current_page": 1,
"per_page": 30,
"total": 1,
"last_page": 1
}
}
}
Mark notification read
Body: id or notification_id
Postman
POST https://sales.anoopjewellers.co.in/api/v1/notification/read
Authorization: Bearer {{access_token}}
Content-Type: application/json
Accept: application/json
{
"id": 3
} Register FCM Push Token
Body: fcm_token, device_type
Postman
POST https://sales.anoopjewellers.co.in/api/v1/subscribe_notification
Authorization: Bearer {{access_token}}
Content-Type: application/json
Accept: application/json
{
"fcm_token": "fcm_token_sample_string",
"device_type": "android"
} Devices & Security
Request Device Approval
Body: device_id, device_name, device_model, os_version
Postman
POST https://sales.anoopjewellers.co.in/api/v1/request_device_access
Authorization: Bearer {{access_token}}
Content-Type: application/json
Accept: application/json
{
"device_id": "unique_device_uuid_12345",
"device_name": "Samsung S23",
"device_model": "SM-S911B",
"os_version": "Android 14"
} Check Device Approval Status
Body: device_id or Header: X-Device-Id
Postman
POST https://sales.anoopjewellers.co.in/api/v1/check_device_status
Authorization: Bearer {{access_token}}
Content-Type: application/json
Accept: application/json
{
"device_id": "unique_device_uuid_12345"
} DB migration (browser)
MIGRATION_KEY in .env.production (live) or .env.local (local).
Set a long random secret before use. Prefer SSH php database/migrate.php on production when possible.
Run database migration
Upgrades DB schema. Not under /api/v1 — lives at site root /migrate.php
URL (production)
GET https://sales.anoopjewellers.co.in/migrate.php?key=YOUR_MIGRATION_KEY&type=all
URL (local WAMP)
GET https://sales.anoopjewellers.co.in/migrate.php?key=local_migration_key_change_me&type=all
Query params
| Param | Required | Values |
|---|---|---|
key | Yes | MIGRATION_KEY from env file |
type | No | all (default), main, unique_mobile |
Success 200
{
"status": true,
"message": "Migration completed",
"data": {
"type": "all",
"lines": [
"Running customer column upgrades...",
"Main migration complete.",
"Unique mobile migration complete."
]
}
}
Errors
403— wrong or missingkey503—MIGRATION_KEYnot configured500— database / SQL failure
Error codes
| HTTP | Meaning | Typical cause |
|---|---|---|
200 | OK | Successful read/update |
201 | Created | Customer / order / leave created |
400 | Bad request | Business rule (already checked in, etc.) |
401 | Unauthorized | Missing/invalid/expired JWT |
404 | Not found | Unknown id or not assigned to you |
422 | Validation failed | See errors object |
429 | Too many requests | Rate limit / login throttle |
500 | Server error | Check server logs |
Flutter / Postman checklist
- Import
docs/postman/Anoop_Jewellers_Sales_API.postman_collection.json - Set
base_url→https://sales.anoopjewellers.co.in/api/v1 - Login with a sales person account from Admin
- Suggested order: Login → Dashboard → Check-in → Create Customer → Create Order → Targets → Leave → Logout
Dio snippet
final dio = Dio(BaseOptions(
baseUrl: 'https://sales.anoopjewellers.co.in/api/v1/',
headers: {'Accept': 'application/json'},
));
dio.options.headers['Authorization'] = 'Bearer $accessToken';
final res = await dio.get('dashboard');
Anoop Jewellers Sales API v1 · Flutter Android · Same DB as Admin Panel