AIR-Api

APIs for Moble App

Auth 2

Login & Logout requests here

Description

Login request using username and pass

Body
KeyValueDescription
usernamea.islam
passwordsavoy123

Distributors 5

Get distributor list by User

Description

Get distributors list by user lat long

Query
KeyValueDescription
lat23.78065065
long90.41623629
Description

Create distributor by user

Distributors field list with label, default value, required/not required.

All fields are required. Fields with default value 0 will be number input
  1. name (Label : Name)
  2. address (Label: Registered address)
  3. trade_license_num (Label: Trade license number)
  4. owner_name (Label: Owner name)
  5. owner_phone (Label: Owner phone number)
  6. owner_address (Label: Owner address)
  7. lat (hidden)
  8. long(hidden)
  9. expected_monthly_sales (Label: Expected monthly sales, default value: 0)
  10. expected_annual_sales (Label: Expected annual sales, default value: 0)
  11. warehouse_rent (Label: Monthly warehouse rent, default value: 0)
  12. warehouse_size (Label: Warehouse size in square feet, default value: 0)
  13. godown_rent (Label: Monthly godwon rent, default value: 0)
  14. godown_size (Label: Godown size in Square Feet, default value: 0)
  15. political_activity (Label: Political activity, Dropdown or radio button with - ‘Yes’,‘No’, value: 1 or 0)
  16. igloo_contribution (Label: Igloo Contribution, default value: 0)
  17. polar_contribution (Label: Polar Contribution, default value: 0)
  18. lovello_contribution (Label: Lovello Contribution, default value: 0)
  19. kazi_contribution (Label: Kazi Contribution, default value: 0)
  20. bloop_contribution (Label: Bloop Contribution, default value: 0)
  21. kwality_contribution (Label: Kwality Contribution, default value: 0)
  22. others_contribution (Label: Others Contribution, default value: 0)
  23. number_of_sdf (Label: Number of Stock Deep Freezers, default value: 0)
  24. number_of_van (Label: Number of Van, default value: 0)
  25. total_capital (Label: Total Capital, default value: 0)
  26. working_capital (Label: Working Capital, default value: 0)
  27. image (Label: as it is)


Body
KeyValueDescription
nameTest_0011
addressGulshan
trade_license_num984988468
owner_nameJoe
owner_addressGulshan
owner_phone+8801651656556
lat23.654655
long90.516556
image
expected_monthly_sales100000
expected_annual_sales9999999
godown_rent0
godown_size1000
warehouse_rent0
warehouse_size3000
political_activity1
igloo_contribution500000
polar_contribution20000
lovello_contribution265522
kazi_contribution0
bloop_contribution0
kwality_contribution0
others_contribution0
number_of_sdf5
number_of_van3
total_capital1000000
working_capital0
Description

Update distributor info by distributor ID

Field lists same as create distributor

** Image field is not required

Body
KeyValueDescription
nameTest_0011111
addressGulshan
trade_license_num984988468
owner_nameJoe
owner_addressGulshan
owner_phone+8801651656556
lat23.654655
long90.516556
image
expected_monthly_sales100000
expected_annual_sales9999999
godown_rent0
godown_size1000
warehouse_rent0
warehouse_size3000
political_activity1
igloo_contribution500000
polar_contribution20000
lovello_contribution265522
kazi_contribution0
bloop_contribution0
kwality_contribution0
others_contribution0
number_of_sdf5
number_of_van3
total_capital1000000
working_capital0

Outlets 8

Get outlet list by user

Description

Create outlet by user

All fields are required except trade_license_num

distributor_id : int

Body
KeyValueDescription
distributor_id1
nameA
addresssdarsea
trade_license_numfzdgfzdgfdz
owner_namesdfaasd
owner_phone846565465466
latsdfsdaf
longsfdasdaf
image
monthly_sale250000
freezer_type[]12
freezer_capacity[]254
monthly_rent[]1224
agreement_months[]124
freezer_monthly_sale[]2
quantity[]2
freezer_type[]2
freezer_capacity[]254
freezer_monthly_sale[]1235
monthly_rent[]876
agreement_months[]5
quantity[]1
exisiting_freezer_id[]1
existing_on_rent[]1
existing_rent_amount[]5000
exisiting_freezer_id[]2
existing_on_rent[]0
existing_rent_amount[]0
Description

Get all freezers by company ID for existing freezers in outlet

Description

Update outlet by ID.

Body
KeyValueDescription
distributor_id1
nameUpdate test01
addresseraaser
trade_license_numsreaerse
owner_nameerearwear
owner_phonereearwear
monthly_sale435435
lat93.5456565
long48.69544
image
exisiting_freezer_id[]12
existing_on_rent[]1
existing_rent_amount[]1111
exisiting_freezer_id[]13
existing_on_rent[]0
existing_rent_amount[]9999

Freezer 4

Description

Create freezer requisition by user

User can requests multi freezers for multiple outlet for the same distributor.

UI will like Interview section where user can select distributor. Outlet to quantity will be in a card. If user clicks on add, another card will be added.

Body
KeyValueDescription
distributor_id1
outlet_id[]1
freezer_type[]1
freezer_capacity[]1
monthly_sale[]120000
monthly_rent[]5000
agreement_months[]12
quantity[]1
outlet_id[]2
freezer_type[]1
freezer_capacity[]1
monthly_sale[]102360
monthly_rent[]5820
agreement_months[]36
quantity[]1

Questions 3

Survey questions for distributors, Retailers

Description

Get all question lists interface type.
Type list: ‘Distributor’,‘Retail’

if reponse ‘required’ is 1 then that question is mandatory and must be answered,

if ‘required’ is 0 then it will be shown in Select box

Query
KeyValueDescription
typeRetail
Description

Create interview for distributor

Distributor lists be shown by using getAllDistributorsByLatLong API

Body
KeyValueDescription
distributor_id1
question_id[]1
question_id[]0
question_id[]0
question_id[]2
question_detail[]What?
question_detail[]How?
question_detail[]When?
question_detail[]Why?
answer[]Yes
answer[]No
answer[]No
answer[]Yes
image
route_plan_id2
Description

Create interview for outlet by user

Body
KeyValueDescription
outlet_id1
outlet_image
freezer_id[]1
freezer_image[]
question_id1[]1
question_id1[]0
question_id1[]0
question_id1[]2
question_detail1[]What?
question_detail1[]Outlet test question for new entry
question_detail1[]Outlet test question for new entry 2
question_detail1[]Why?
answer1[]Yes
answer1[]No
answer1[]No
answer1[]Yes
freezer_id[]10
freezer_image[]
question_id10[]1
question_id10[]0
question_id10[]0
question_detail10[]What?
question_detail10[]Purety of the freezer?
question_detail10[]Premim percentage?
answer10[]Neeh
answer10[]New
answer10[]5%
route_plan_id3

Orders 5

Description

get product lists by distributor

Note: use dummy ‘no_image.png’ if image field is null

Body
KeyValueDescription
distributor_id1400
Description

Get offer for order from formdata

Here are few notes.

  1. pqty_in_pcs fields will be hidden and value zero.
  2. After getting succesfull response if any offer data is available (msg=true) then show offers and total_payable is the payable after discount. so to show discount on frontend discount = grand_tot - total_payable
  3. to submit order to create make the form like this for offer
    1. if any gift item is available - input will be like - offer_id[39,21], unique_id[‘001’, ‘002’], gift_id39, gift_id21, gift_qty39, gift_qty21
    2. if any cash offer available - input will be like - offer_id[55,57], unique_id[‘0010’, ‘0011’], act_disc_amount55, act_disc_amount57 and value will be discount_amount_for_specific_offer
    3. if any product offer avaible - input will be like - offer_id[41,42], unique_id[‘001’, ‘002’], dis_product41, dis_product42, prodQty41, prodQty42 and quantity value will be ‘total_offer_pcs’

NOTE: For catgeory wise product offer, quantity is calculated, so won’t need another API call. If no offer is available this fields will be unset. For better understanding check createOrderApi

Body
KeyValueDescription
distributor_id121
product_id[]1
product_id[]2
product_id[]3
category[]7
category[]7
category[]7
pqty_in_ctn[]200
pqty_in_ctn[]200
pqty_in_ctn[]200
pqty_in_pcs[]0
pqty_in_pcs[]0
pqty_in_pcs[]0
line_total[]50200
line_total[]96000
line_total[]105600
grand_tot361800.00
total_payable361800.00
product_id[]30
category[]12
pqty_in_ctn[]200
pqty_in_pcs[]0
line_total[]110000
Description

Create order by user

Body
KeyValueDescription
distributor_id1883
product_id[]1
product_id[]2
product_id[]3
category[]7
category[]7
category[]7
pqty_in_ctn[]200
pqty_in_ctn[]200
pqty_in_ctn[]200
pqty_in_pcs[]0
pqty_in_pcs[]0
pqty_in_pcs[]0
line_total[]50200
line_total[]96000
line_total[]105600
grand_tot361800.00
total_payable347350.00
product_id[]30
category[]12
pqty_in_ctn[]200
pqty_in_pcs[]0
line_total[]110000
ctn_price[]251
ctn_price[]480
ctn_price[]520
ctn_price[]550
offer_id[]34
act_disc_amount3415000
offer_id[]41
gift_id411
gift_qty4175
offer_id[]42
dis_product4216
prodQty421560
offer_id[]43
dis_product43137
prodQty432340
outlet_id

Invoice 7

Description

Everything will be like order offer except product offer.

Example -

if there are two product offer - input will be like -

offer_id[43,100],

unique_id[‘001’, ‘002’],

dis_product43 = product_id,

dis_product100 = product_id,

prodQty43 = offer_qty_in_ctn (Editable - If user get 100 CTN, he can deliver 0-100 CTN if he wants)

prodQty100 = offer_qty_in_ctn (Editable - If user get 10 CTN, he can deliver 0-10 CTN if he wants)

prodOdrQty43 = total_deliverable_pcs

prodOdrQty100 = total_deliverable_pcs

Body
KeyValueDescription
order_id92
distributor_id121
product_id[]1
product_id[]2
product_id[]3
product_id[]22
category[]7
category[]7
category[]7
category[]18
pqty_in_ctn[]150
pqty_in_ctn[]150
pqty_in_ctn[]150
pqty_in_ctn[]200
pqty_in_pcs[]0
pqty_in_pcs[]0
pqty_in_pcs[]0
pqty_in_pcs[]0
line_total[]50200
line_total[]96000
line_total[]105600
line_total[]70400
grand_tot322200.00
total_payable322200.00
Description

Create invoice

Use store id 146 to get stock for creating invoice. Other store don’t have enough product to delivery, so use those to check stock validation.

Body
KeyValueDescription
order_id89
distributor_id121
store_id146
product_id[]1
product_id[]2
product_id[]3
product_id[]22
category[]7
category[]7
category[]7
category[]18
pqty_in_ctn[]150
pqty_in_ctn[]150
pqty_in_ctn[]150
pqty_in_ctn[]200
pqty_in_pcs[]0
pqty_in_pcs[]0
pqty_in_pcs[]0
pqty_in_pcs[]0
ctn_price[]251
ctn_price[]480
ctn_price[]520
ctn_price[]550
line_total[]37650
line_total[]72000
line_total[]78000
line_total[]110000
grand_tot297650
total_payable282650
offer_id[]34
unique_id[]OFR-23-000001
act_disc_amount3415000
offer_id[]41
unique_id[]OFR-23-000005
gift_id411
gift_qty4165
offer_id[]43
unique_id[]OFR-23-000006
dis_product4316
prodQty4350
prodOdrQty431950
offer_id[]100
unique_id[]OFR-23-000031
dis_product1001
prodQty1003
prodOdrQty10090

Location 1

Description

Update distributor or outlet location

Body
KeyValueDescription
distributor_id1
outlet_id
lat23.584565
long90.64655

Working Time 1

Store working time

Description

type = 1 is work starting

type = 0 is work ending

Body
KeyValueDescription
type1

Collection 3

Description

Create collection by user

Body
KeyValueDescription
distributor_id1883
amount50000
money_receipt_numberSC89974
noteFor order SO-0000001

Route Plan 9

Create daily route plan for user

Body
KeyValueDescription
date2023-12-21
point_type[]Distributor
point_type[]Distributor
point_type[]Outlet
point_type[]Outlet
point_id[]1
point_id[]43
point_id[]3
point_id[]4
Body
KeyValueDescription
nameTest template 2
distributor_id143
outlet_id[]1
outlet_id[]23
outlet_id[]4
Description

Check in on a point of route plan by route plan ID.

parameter: route_plan_id from getOneRoutePlanByDate API

Description

Check in a point of route plan by route plan ID

Body
KeyValueDescription
route_plan_id1
latitude23.5845650
longitude90.64650
Description

Check out from a point of route plan by route plan ID
parameter: route_plan_id from getOneRoutePlanByDate


Body
KeyValueDescription
route_plan_id1

App Status 1

Complementary Invoices 3

Available Variables 2

KeyValueType
AIRURLhttp://air.goldengroup-bd.com:89string
TOKENeyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOlwvXC9haXIuZ29sZGVuZ3JvdXAtYmQuY29tOjg5XC9hcGlcL2xvZ2luIiwiaWF0IjoxNzAyMTMyMTEwLCJleHAiOjE3MDk5MDgxMTAsIm5iZiI6MTcwMjEzMjExMSwianRpIjoiTGZ6TWRIWnk1eFlYTlE3aSIsInN1YiI6MzU4LCJwcnYiOiIyM2JkNWM4OTQ5ZjYwMGFkYjM5ZTcwMWM0MDA4NzJkYjdhNTk3NmY3In0.YLr1EYGjPjCNsnleJ_ohHEJwCHnS2jH31WDZn4qmMVostring