ui integration and rest api includes

This commit is contained in:
2026-05-20 15:34:41 +05:30
parent f4dc2b6a5a
commit 349d152b76
18 changed files with 3631 additions and 589 deletions

View File

@@ -0,0 +1,652 @@
1. User & Authentication APIs
💻 Web Portal
POST Tenant Web Panel Login
URL: https://fiesta.nearle.app/live/api/v1/web/users/tenant/weblogin
Payload:
json
{
"authname": "merchant_admin_01",
"password": "PasswordSecurityHash99!"
}
POST General Application Login
URL: https://fiesta.nearle.app/live/api/v1/web/users/applogin
Payload:
json
{
"authname": "system_operator",
"password": "OperatorSafePasswordSecret",
"deviceid": "device_uuid_8828b",
"devicetype": "android"
}
POST Register New Web Staff Account
URL: https://fiesta.nearle.app/live/api/v1/web/users/create
Payload:
json
{
"authname": "tenant_staff_steve",
"firstname": "Steve",
"lastname": "Rogers",
"password": "SteveSecurePassword12",
"email": "steve.rogers@merchant.com",
"dialcode": "+61",
"contactno": "412345678",
"roleid": 3,
"pin": 1234,
"address": "100 Flinders St",
"suburb": "Melbourne",
"city": "Melbourne",
"state": "VIC",
"postcode": "3000",
"tenantid": 8,
"locationid": 2,
"applocationid": 1,
"status": "active"
}
PUT Update Web Staff User Details
URL: https://fiesta.nearle.app/live/api/v1/web/users/update
Payload:
json
{
"userid": 15,
"firstname": "Steve",
"lastname": "Captain",
"email": "steve.captain@merchant.com",
"contactno": "412345678",
"address": "200 Flinders St",
"suburb": "Melbourne",
"city": "Melbourne",
"state": "VIC",
"postcode": "3000",
"status": "active"
}
📱 Mobile App
POST Rider/Merchant Mobile App Login
URL: https://fiesta.nearle.app/live/api/v1/mob/users/tenant/login
Payload:
json
{
"authname": "rider_john_01",
"password": "RiderSecretKey"
}
POST Create Mobile Staff User
URL: https://fiesta.nearle.app/live/api/v1/mob/users/create
Payload: (Uses the same schema as Web Register New Web Staff Account)
PUT Update Mobile Staff Details
URL: https://fiesta.nearle.app/live/api/v1/mob/users/update
Payload: (Uses the same schema as Web Update Web Staff User Details)
2. Customer Management APIs
📱 Mobile App
POST Passwordless OTP Login (via Phone)
URL: https://fiesta.nearle.app/live/api/v1/mob/customers/login
Payload:
json
{
"contactno": "0499888777"
}
POST Register Customer Account
URL: https://fiesta.nearle.app/live/api/v1/mob/customers/create
Payload:
json
{
"firstname": "Jane",
"lastname": "Smith",
"profileimage": "https://storage.nearle.app/avatars/jane_smith.jpg",
"gender": "Female",
"dob": "1994-11-20",
"dialcode": "+61",
"contactno": "499888777",
"email": "jane.smith@gmail.com",
"deviceid": "uuid_7728b991a",
"devicetype": "ios",
"authmode": 1,
"customertoken": "fcm_token_device_hash_xyz",
"address": "456 Oak Avenue",
"suburb": "Richmond",
"city": "Melbourne",
"state": "VIC",
"postcode": "3121",
"latitude": "-37.8212",
"longitude": "144.9984",
"applocationid": 1,
"status": 1,
"intro": "Regular subscriber of organic morning deliveries."
}
POST Save New Geofenced Location Address
URL: https://fiesta.nearle.app/live/api/v1/mob/customers/createlocations
Payload:
json
{
"customerid": 4082,
"address": "123 High Street",
"suburb": "Prahran",
"city": "Melbourne",
"state": "VIC",
"postcode": "3181",
"latitude": "-37.8502",
"longitude": "144.9924",
"primaryaddress": 1,
"status": 1
}
POST Log Customer Support Ticket Request
URL: https://fiesta.nearle.app/live/api/v1/mob/customers/createcustomerrequest
Payload:
json
{
"customerid": 4082,
"tenantid": 8,
"apptypeid": 1,
"locationid": 2,
"subject": "Delay in Morning Milk Delivery",
"remarks": "Order scheduled for 7:00 AM hasn't arrived.",
"status": 1
}
PUT Update Customer Profile Details
URL: https://fiesta.nearle.app/live/api/v1/mob/customers/update
Payload:
json
{
"customerid": 4082,
"firstname": "Jane",
"lastname": "Miller",
"email": "jane.miller@gmail.com",
"contactno": "499888777",
"address": "789 Pine Road",
"suburb": "Hawthorn",
"city": "Melbourne",
"state": "VIC",
"postcode": "3122",
"status": 1
}
3. Catalog & Product Inventory APIs
💻 Web Portal
POST Add Multi-Product Stock Entry
URL: https://fiesta.nearle.app/live/api/v1/web/products/createproductstock
Payload:
json
[
{
"tenantid": 8,
"locationid": 2,
"productid": 105,
"quantity": 150,
"stocktype": "credit",
"status": "active"
},
{
"tenantid": 8,
"locationid": 2,
"productid": 109,
"quantity": 80,
"stocktype": "credit",
"status": "active"
}
]
POST Create Master Product Catalog Item
URL: https://fiesta.nearle.app/live/api/v1/web/products/create
Payload:
json
{
"applocationid": 1,
"tenantid": 8,
"categoryid": 2,
"subcategoryid": 12,
"productname": "Fresh Cow Milk 1L",
"productimage": "https://storage.nearle.app/products/cow_milk_1l.png",
"productdesc": "Pure farm fresh cow milk pasteurized.",
"productsku": "MILK-COW-1L",
"productunit": "Litre",
"unitvalue": "1",
"productcost": 1.80,
"retailprice": 3.50,
"taxpercent": 5.00,
"productstock": 100,
"productstatus": "available",
"approve": 1
}
POST Map Product to Specific Outlet Location
URL: https://fiesta.nearle.app/live/api/v1/web/products/createproductlocation
Payload:
json
[
{
"tenantid": 8,
"locationid": 2,
"productid": 105,
"catlougeid": 1,
"minquantity": 5,
"maxquantity": 200,
"price": 3.75,
"status": "Active"
}
]
POST Create Product Variant Metadata
URL: https://fiesta.nearle.app/live/api/v1/web/products/createproductvariant
Payload:
json
{
"tenantid": 8,
"variantname": "1.5 Liters Bottle",
"categoryid": 2,
"subcategoryid": 12,
"status": "active"
}
PUT Update Master Product Details
URL: https://fiesta.nearle.app/live/api/v1/web/products/update
Payload:
json
{
"productid": 105,
"productname": "Organic Farm Cow Milk 1L",
"productcost": 1.95,
"retailprice": 3.75,
"productstock": 120,
"productstatus": "available"
}
PUT Update Product Outlet Constraints
URL: https://fiesta.nearle.app/live/api/v1/web/products/updateproductlocation
Payload:
json
{
"productlocationid": 25,
"tenantid": 8,
"locationid": 2,
"productid": 105,
"minquantity": 10,
"maxquantity": 150,
"price": 3.99,
"status": "Active"
}
DELETE Purge Master Product Catalog Entry
URL: https://fiesta.nearle.app/live/api/v1/web/products/delete?productid=105
Parameters:
productid (int, required): Unique ID of the catalog item to be purged.
📱 Mobile App
PUT Mobile Update Product Details
URL: https://fiesta.nearle.app/live/api/v1/mob/products/update
Payload: (Uses the same schema as Web Update Master Product Details)
PUT Mobile Update Product Outlet Config
URL: https://fiesta.nearle.app/live/api/v1/mob/products/updateproductlocation
Payload: (Uses the same schema as Web Update Product Outlet Constraints)
4. Order Orchestration APIs
💻 Web Portal
POST Create New Web Order (Flat JSON Format)
URL: https://fiesta.nearle.app/live/api/v1/web/orders/createorder
Payload:
json
{
"tenantid": 8,
"locationid": 2,
"applocationid": 1,
"moduleid": 1,
"customerid": 4082,
"orderstatus": "pending",
"deliverytype": "standard",
"deliverytime": "2026-05-20 18:00:00",
"pickupaddress": "Shop 4, Central Plaza, Melbourne",
"pickuplat": "-37.8136",
"pickuplong": "144.9631",
"pickupcustomer": "Central Plaza Merchant",
"pickupcontactno": "399887766",
"deliveryaddress": "Apt 4B, Sunset Boulevard, Richmond",
"deliverylat": "-37.8212",
"deliverylong": "144.9984",
"orderamount": 11.48,
"taxamount": 1.10,
"ordervalue": 12.58,
"itemcount": 2,
"paymenttype": 1,
"paymentstatus": 0,
"deliverycharge": 3.00,
"ordernotes": "Please ring doorbell twice.",
"items": [
{
"productid": 105,
"productname": "Organic Whole Milk 1L",
"orderqty": 2,
"price": 3.99,
"taxpercentage": 10.00,
"taxamount": 0.80,
"productsumprice": 7.98
},
{
"productid": 109,
"productname": "Salted Butter 250g",
"orderqty": 1,
"price": 3.50,
"taxpercentage": 10.00,
"taxamount": 0.35,
"productsumprice": 3.50
}
]
}
PUT Update Order Status & Financial Flag
URL: https://fiesta.nearle.app/live/api/v1/web/orders/updateorder
Payload:
json
{
"orderheaderid": 2099,
"orderstatus": "ready",
"paymentstatus": 1,
"remarks": "Order packed and waiting for rider assignment."
}
📱 Mobile App
POST Create Mobile Order (Wrapped JSON Format)
URL: https://fiesta.nearle.app/live/api/v1/mob/orders/createorder
Payload:
json
{
"orders": {
"tenantid": 8,
"locationid": 2,
"applocationid": 1,
"moduleid": 1,
"customerid": 4082,
"orderstatus": "pending",
"deliverytype": "standard",
"deliverytime": "2026-05-20 18:00:00",
"pickupaddress": "Shop 4, Central Plaza, Melbourne",
"pickuplat": "-37.8136",
"pickuplong": "144.9631",
"pickupcustomer": "Central Plaza Merchant",
"pickupcontactno": "399887766",
"deliveryaddress": "Apt 4B, Sunset Boulevard, Richmond",
"deliverylat": "-37.8212",
"deliverylong": "144.9984",
"orderamount": 11.48,
"taxamount": 1.10,
"ordervalue": 12.58,
"itemcount": 2,
"paymenttype": 1,
"paymentstatus": 0,
"deliverycharge": 3.00,
"ordernotes": "Leave in parcel locker.",
"items": [
{
"productid": 105,
"productname": "Organic Whole Milk 1L",
"orderqty": 2,
"price": 3.99,
"taxpercentage": 10.00,
"taxamount": 0.80,
"productsumprice": 7.98
},
{
"productid": 109,
"productname": "Salted Butter 250g",
"orderqty": 1,
"price": 3.50,
"taxpercentage": 10.00,
"taxamount": 0.35,
"productsumprice": 3.50
}
]
}
}
PUT Mobile Update Order Status
URL: https://fiesta.nearle.app/live/api/v1/mob/orders/updateorder
Payload: (Uses the same schema as Web Update Order Status & Financial Flag)
5. Delivery & Rider Logistics APIs
💻 Web Portal
POST Initialize Logistics Delivery Dispatch (Assign Rider)
URL: https://fiesta.nearle.app/live/api/v1/web/deliveries/createdeliveries
Payload:
json
[
{
"orderheaderid": 2100,
"applocationid": 1,
"partnerid": 1,
"tenantid": 8,
"moduleid": 1,
"locationid": 2,
"userid": 15,
"orderid": "ORD-19028-4",
"deliverydate": "2026-05-20",
"orderstatus": "assigned",
"assigntime": "2026-05-20 12:10:00",
"itemcount": 2,
"orderamount": 12.58,
"customerid": 4082,
"pickupcustomer": "Central Merchant Warehouse",
"pickupcontactno": "987654321",
"pickuplocationid": 2,
"pickupaddress": "Shop 4, Central Plaza, Melbourne",
"pickuplat": "-37.8136",
"pickuplon": "144.9631",
"deliverycustomerid": 4082,
"deliverylocationid": 554,
"deliverycustomer": "Jane Smith",
"deliverycontactno": "499888777",
"deliveryaddress": "456 Oak Avenue, Richmond, VIC, 3121",
"droplat": "-37.8212",
"droplon": "144.9984",
"deliverycharges": 3.00,
"deliveryamt": 15.58,
"deliverytype": "standard",
"paymenttype": 1
}
]
PUT Update Rider Pickup Status
URL: https://fiesta.nearle.app/live/api/v1/web/deliveries/updatedelivery
Payload:
json
{
"deliveryid": 8871,
"orderheaderid": 2100,
"userid": 15,
"orderstatus": "picked",
"pickuptime": "2026-05-20 12:20:00",
"riderslat": "-37.8140",
"riderslon": "144.9640"
}
📱 Mobile App
POST Initialize Mobile Logistics Delivery
URL: https://fiesta.nearle.app/live/api/v1/mob/deliveries/createdeliveries
Payload: (Uses the same schema as Web Initialize Logistics Delivery Dispatch)
PUT Rider Update Dispatch Status (Delivered & GPS Tracking)
URL: https://fiesta.nearle.app/live/api/v1/mob/deliveries/updatedelivery
Payload:
json
{
"deliveryid": 8871,
"orderheaderid": 2100,
"userid": 15,
"orderstatus": "delivered",
"deliverytime": "2026-05-20 12:45:00",
"riderslat": "-37.8210",
"riderslon": "144.9980",
"actualkms": "4.2",
"feedback": "Handed over safely.",
"smsdelivery": 1
}
6. Tenant & Location Configuration APIs
💻 Web Portal
POST Link Customer Profile to Tenant Store
URL: https://fiesta.nearle.app/live/api/v1/web/tenants/createtenantcustomer
Payload:
json
{
"moduleid": 1,
"tenantid": 8,
"locationid": 2,
"customerid": 4082,
"customerlocationid": 554,
"status": 1
}
POST Create New Geofenced Store Location
URL: https://fiesta.nearle.app/live/api/v1/web/tenants/createlocation
Payload:
json
{
"tenantid": 8,
"applocationid": 1,
"moduleid": 1,
"locationname": "Hawthorn Daily Fresh Store",
"email": "hawthorn.store@merchant.com",
"contactno": "399443322",
"latitude": "-37.8222",
"longitude": "145.0384",
"address": "12 Glenferrie Rd",
"suburb": "Hawthorn",
"city": "Melbourne",
"state": "VIC",
"postcode": "3122",
"opentime": "07:00:00",
"closetime": "22:00:00",
"partnerid": 1,
"deliveryradius": 5000,
"deliverymins": 30,
"cancelsecs": 60,
"status": "Active"
}
POST Map Tenant Location Linkage Entry
URL: https://fiesta.nearle.app/live/api/v1/web/tenants/createtenantlocation
Payload: (Uses the same schema as Create New Geofenced Store Location)
PUT Update Store Location Configurations
URL: https://fiesta.nearle.app/live/api/v1/web/tenants/updatelocation
Payload:
json
{
"locationid": 2,
"tenantid": 8,
"applocationid": 1,
"locationname": "Richmond Daily Fresh Store",
"email": "richmond.store@merchant.com",
"contactno": "399887766",
"latitude": "-37.8212",
"longitude": "144.9984",
"address": "Shop 4, 100 Church St",
"suburb": "Richmond",
"city": "Melbourne",
"state": "VIC",
"postcode": "3121",
"opentime": "07:00:00",
"closetime": "22:00:00",
"deliveryradius": 8000,
"deliverymins": 45,
"cancelsecs": 120,
"status": "Active"
}
PUT Modify Tenant Location Linkage Config
URL: https://fiesta.nearle.app/live/api/v1/web/tenants/updatetenantlocation
Payload: (Uses the same schema as Update Store Location Configurations)
📱 Mobile App
POST Mobile Link Customer Profile to Tenant Store
URL: https://fiesta.nearle.app/live/api/v1/mob/tenants/createtenantcustomer
Payload: (Uses the same schema as Web Link Customer Profile to Tenant Store)
POST Mobile Create Geofenced Store Location
URL: https://fiesta.nearle.app/live/api/v1/mob/tenants/createlocation
Payload: (Uses the same schema as Web Create New Geofenced Store Location)
POST Onboard/Create New Staff Member Account
URL: https://fiesta.nearle.app/live/api/v1/mob/tenants/createstaff
Payload: (Uses the same schema as Web Register New Web Staff Account)
POST Onboard New Tenant & Admin Profile (Joint Creation)
URL: https://fiesta.nearle.app/live/api/v1/mob/tenants/createtenantuser
Payload:
json
{
"tenantname": "Fresh Organic Greens",
"configid": 1,
"partnerid": 1,
"moduleid": 1,
"tenanttype": "Enterprise",
"registrationno": "ABN-19028-299",
"tenanttoken": "tenant_fcm_token_hash_value_xyz",
"companyname": "Fresh Organic Greens Pty Ltd",
"devicetype": "web",
"firstname": "Arthur",
"primaryemail": "arthur@organicgreens.com",
"primarycontact": "488999000",
"categoryid": 2,
"subcategoryid": 12,
"address": "400 Chapel St",
"suburb": "South Yarra",
"city": "Melbourne",
"state": "VIC",
"postcode": "3141",
"latitude": "-37.8398",
"longitude": "144.9953",
"tenantimage": "https://storage.nearle.app/tenants/organic_greens.png",
"tenantinfo": "Direct farm-to-table organic vegetables delivery provider.",
"paymode1": 1,
"paymode2": 1,
"promotion": 0,
"minorder": 15,
"applocationid": 1,
"approved": 1,
"status": "Active",
"tenantlocations": {
"locationname": "South Yarra Main Warehouse",
"email": "southyarra@organicgreens.com",
"contactno": "488999000",
"latitude": "-37.8398",
"longitude": "144.9953",
"address": "400 Chapel St",
"suburb": "South Yarra",
"city": "Melbourne",
"state": "VIC",
"postcode": "3141",
"opentime": "06:00:00",
"closetime": "21:00:00",
"partnerid": 1,
"deliveryradius": 6000,
"deliverymins": 30,
"cancelsecs": 90,
"status": "Active"
}
}
PUT Mobile Update Store Location Configurations
URL: https://fiesta.nearle.app/live/api/v1/mob/tenants/updatelocation
Payload: (Uses the same schema as Web Update Store Location Configurations)