Академический Документы
Профессиональный Документы
Культура Документы
E-Commerse_API_Interface_1.6
Document
Revision
Author
Modification
Date
Description of Changes
1.0
Mazhar Ahmed
1.1
Naveed Ahmad
1.2
Naveed Ahmad
1.3
Naveed Ahmad
1.4
1.5
Naveed Ahmad
Naveed Ahmad
1.6
Contents
Enterprise Management Interface ........................................................................................................... 3
add_enterprise () ................................................................................................................................. 3
remove_enterprise ()........................................................................................................................... 3
add branch () ....................................................................................................................................... 3
remove_branch () ................................................................................................................................ 4
Enterprise Stock Interface ....................................................................................................................... 4
add_item_branch_category ().............................................................................................................. 4
remove_item_branch_category() ........................................................................................................ 4
add_item_quantity_branch_category()................................................................................................ 5
subtract_item_quantity_branch_category()......................................................................................... 5
order_enterprise_for_items() .............................................................................................................. 5
get _order_for_branch() ...................................................................................................................... 6
Enterprise Stock/Purchase Analytics Interface ......................................................................................... 6
get_item_stock_status() ...................................................................................................................... 6
Enterprise Returns Interface .................................................................................................................... 7
process_return_on_enterprise () ......................................................................................................... 7
Service Interface...................................................................................................................................... 7
set_enterprise_customer_credit_limit ().............................................................................................. 7
get_enterprise_customer_credit_limit () ............................................................................................. 7
set_enterprise_customer_subscription_time () ................................................................................... 8
get_enterprise_customer_subscription_time () ................................................................................... 8
Parameters
Input
enterprise_name (varchar)
enterpise_website_address (varchar)
enterprise_address (varchar)
enterprise_telephone (varchar)
enterpise_country (int)
Output
enterprise_id (int)
remove_enterprise ()
This function will remove/unregister an enterprise
Parameters
Input
enterprise_id (int)
Output
0 or 1 for failure or success respectively
add branch ()
This function will add/register a branch for an enterprise.
Parameters
Input
branch_name (varchar)
branch_address (varchar)
branch_telephone (varchar)
Output
branch_id (int)
remove_branch ()
This function will remove/unregister a branch for an enterprise
Parameters
Input
branch_id (int)
Output
0 or 1 for failure or success respectively
select_database_for_enterprise_operation()
This function will select an enterprise database for enterprise/branch level operations.
Parameters
Input
enterprise_id(int)
Output
Database connection handler.
Parameters
Input
branch_ids (array of [int])
item_name (varchar)
item_category (boolean): 0 or 1 for physical or digital
category_id (int)
item_type (int)
item_sub_type (int)
item_sales_price (int)
Output
item_id (int)
remove_item_branch_repository()
This function will remove an item from a repository of an enterprise in a particular branch
4
Parameters
Input
branch_id (int)
item_id (int)
Output
0 or 1 for failure or success respectively
add_item_quantity_branch_repository()
This function will add to the quantity of an item in the repository of an enterprise in a particular branch
Parameters
Input
branch_id (int)
item_id (int)
quantity_to_add (int)
Output
0 or 1 for failure or success respectively
subtract_item_quantity_branch_category()
This function will subtract from the quantity of an item in the repository of an enterprise in a particular
branch
Parameters
Input
branch_id (int)
item_id (int)
quantity_to_subtract (int)
Output
0 or 1 for failure or success respectively
order_enterprise_for_items()
This function will be used to
1. Place an order for the customer for home delivery on credit through mobile
2. Place an order for the customer based for home delivery on credit through web
3. Place an order for the customer for home delivery on payment through mobile
4. Place an order for the customer for home delivery on payment through web
5. Place an order for the customer for picking at the shop on credit through mobile
6. Place an order for the customer for picking at the shop on credit through web
5
7. Place an order for the customer for picking at the shop on payment through mobile
8. Place an order for the customer for picking at the shop on payment through web
Parameters
Input
branch_id (int)
qairus_id (int)
payment_type (boolean): 0 or 1 for credit or cash
delivery_type (boolean): 0 or 1 for shipment or pick-from-shop
order_type (boolean): 0 or 1 for product or service
order_source (boolean): 0 for mobile and 1 for web
item_list (list of items): Each item contains item_id (int) and item_quantity (int)
delivery_info (varchar): Will contain shop_address for pick from shop and home address for home
delivery
subscription_info (boolean): monthly or yearly subscription if order_type is service
Output
order_id (int)
get _order_for_branch()
This function will search the order of a customer based upon customer id and order id from the pick
from shop queue of a particular branch
Parameters
Input
branch_id (int)
qairus_id (int)
order_id (int)
Output
payment_type (boolean): 0 or 1 for credit or cash
item_list (list of items): Each item contains item_id (int) and item_quantity (int)
Parameters
Input
branch_id (int)
item_id (int)
item_quantity (int)
Output
0 or 1 for failure or success respectively
Parameters
Input
branch_id (int)
qairus_id (int)
order_id (int)
Output
0 or 1 for failure or success respectively
Service Interface
set_enterprise_customer_credit_limit ()
This functions will specify the credit limit for the customer of an enterprise
Parameters
Input
qairus_id (int)
credit_limit (int)
Output
0 or 1 for failure or success respectively
get_enterprise_customer_credit_limit ()
This function will get the remaining credit limit for the customer of an enterprise
Parameters
Input
qairus_id (int)
Output
credit_limit (int)
set_enterprise_customer_subscription_time ()
This function will set the subscription time
Parameters
Input
qairus_id (int)
subscription_start_date (date)
subscription_end_date (date)
Output
0 or 1 for failure or success respectively
get_enterprise_customer_subscription_time ()
This function will get the subscription time
Parameters
Input
qairus_id (int)
Output
subscription_start_date (date)
subscription_end_date (date)