api for purpletree multivendor marketplace€¦ · 07/02/2018  · • click on save button on top...

87
API FOR PURPLETREE MULTIVENDOR MARKETPLACE

Upload: others

Post on 10-Aug-2020

2 views

Category:

Documents


0 download

TRANSCRIPT

API FOR PURPLETREE MULTIVENDOR MARKETPLACE

CONTENTS

Important Notes........................................................................................................................................ 4

Initial Setup ............................................................................................................................................... 4

API FOR SELLER DATA ............................................................................................................................... 5

1. GET DATA FROM DASHBOARD...................................................................................................... 5

2. GET ALL ORDERS OF SELLER .......................................................................................................... 7

3. GET SELLER ORDER DETAILES ........................................................................................................ 9

4. ADD SELLER ORDER HISTORY ...................................................................................................... 11

5. GET DETAILS OF SELLER ORDER HISTORY ................................................................................... 13

6. GET ALL Products OF SELLER ....................................................................................................... 14

7. ADD NEW SELLER PRODUCT ....................................................................................................... 16

8. Get product information of seller ............................................................................................... 22

9. EDIT AND SAVE SELLER PRODUCT INFORMATION ...................................................................... 27

10. Create duplicate seller product............................................................................................... 32

11. Delete multiple seller products ............................................................................................... 33

12. Get manufacturers (Brand) for seller products ...................................................................... 34

13. Get categories for seller product ............................................................................................ 35

14. Get filters for seller product.................................................................................................... 36

15. Search download items with name......................................................................................... 37

16. Search seller products with product name ............................................................................. 38

17. Search attribute name for Seller Product ............................................................................... 39

18. Get product options by product name ................................................................................... 40

19. Get list of download items of seller ........................................................................................ 42

20. Add new DOWNLOADABLE ITEM ............................................................................................ 43

21. Edit downloadable item of seller ............................................................................................ 45

22. Delete download items of seller ............................................................................................. 47

23. upload file of download item for seller................................................................................... 48

24. Show Seller store information ................................................................................................ 49

25. Edit store information of seller ............................................................................................... 51

26. Get seller store view information ........................................................................................... 55

27. Get seller reviews .................................................................................................................... 58

28. Add review for seller store ...................................................................................................... 59

29. Removal request for seller store ............................................................................................. 60

30. Listing of payments received by seller .................................................................................... 61

31. Get all sellers (Brows sellers) .................................................................................................. 62

32. Get all shipping rates of seller ................................................................................................. 64

33. Delete shipping rates of seller ................................................................................................ 67

34. Delete multiple shipping rates ................................................................................................ 68

35. Get list of customer enquiries for seller ................................................................................. 69

36. Customer enquiries to seller by customer .............................................................................. 70

37. Customer enquiry reply list from seller to customer .............................................................. 71

38. Customer enquiry/reply list from customer to seller ............................................................. 73

39. List of seller commissions ....................................................................................................... 74

API for Customer Data ........................................................................................................................... 76

1. Customer Registration ................................................................................................................ 76

2. Get shopping cart products for customer ................................................................................... 77

3. Get customer orders listing ........................................................................................................ 81

4. Get customer order details ......................................................................................................... 82

5. Get product details with seller information ............................................................................... 84

IMPORTANT NOTES

This API provides data for customer and seller accounts.

For customer and seller, the API assumes that opencart session is available with seller/customer

logged in. Values from opencart session are used to fetch corresponding data.

INITIAL SETUP

We use opencart’s API subsystem for setup of our API.

Steps:

Login to admin Panel.

Go to System > Users > API

Create New API.

Enter API Username as “purpletreemultivendor”.

Generate API Key.

Set Status to Enable.

In IP Address Tab, enter your IP address. This is just a required field. We are not using this IP

Address in calling API as anyone can access API data only with API Username and API KEY

Click on Save button on top right.

Now with each request from mobile. This username as key and API Key as value must be passed

in Header request.

Send Data in header request as below in each request– Value will be your API Key generated

Example:

Key: purpletreemultivendor

Value:

”knO27Zf3bcX8HSAdUla56g8BMN16zSyPedPVlUIqn5pHULrF3alckyoCPUqatiZM5OsKZEDRRSkS2

ElU6gZMdkFq3ord1rylvSf4iLnBCcHK85nbmDgLkUhCReZtH23J2ZRSyL8rV1ec7WGHcNe6gnJpfsxQ

D7gBEa6QIxSQpegLyfdfdfdfgdyO6uem7YJ1IrIaCkX67oXz6XxwYkwn4adZDPm7kk8Z8H4O2m7hbo

yMKdCo0XG6dBr6PfaQMGNPSQpb”

API FOR SELLER DATA

1. GET DATA FROM DASHBOARD

REQUEST URL:

OPENCART 3X <BASE_BASE_URL>/index.php?route=extension/account/purpletree_multivendor/api/

sellerproduct

OPENCART 2X

<BASE_BASE_URL>/index.php?route=account/purpletree_multivendor/api/dashboard

NORMAL RESPONSE

{ "status": "success", "message": "",

"data": { "seller_orders": [ { "order_id": "32",(Order Id) "customer": "punit kumar",(Name of Customer) "admin_order_status": "Complete",(Status of Order for Ex. Complete, Refunded "order_status": "Pending", (Status of order like: - Delivered, Dispatched, Canceled) "total": "$102.00”,(Total Amount of Commission Charged by Admin from Seller). "commission": "$0.00",(Charged by Admin per Order ). "date_added": "02/07/2018",(Date of Order Placed by Customer). "date_modified": "02/07/2018"(Date of Modifying Order Status). }.... ], "total_sale": "$1,967.98" ,(Total Sale of All Orders). "total_pay": 0,(Total Amount Pay to Seller by Admin). "total_commission": 0, (Total Amount of Commission Charged by Admin from Seller). "order_total": "11", (Total Number of Order). "total_payments": "$100.00",(Total Amount Send by Admin to Seller). "seller_payments": [ (Total Amount of Send to Seller by Admin). { "transaction_id": "54544525445", (Transaction Id) "amount": "$100.00",(Total Number of Amount pay to seller by admin). "payment_mode": "Cod", (Payment Mode like Net Banking, Mobile Banking, Paypal Etc.) "status": "success", "created_at": "05/07/2018” (Date of Transaction). } ], "seller_commissions": [(Commissions of Admin charged From Seller) { "order_id": "32", (Id of order). "product_name": "HTC Touch HD"(Name of Product) "price": "$100.00",(Price of Product) "commission": "$0.00",(Amount of Commission charged by Admin From Seller). "created_at": "02/07/2018"(Date of creating Commission). },..... ], "pending_payments": "$75.50",(Total pending payments of seller). "total_order_commission": "$19.50”, (All order commission of seller)

"order_statuses": [ { "order_status_id": "7",(Order status id) "name": "Canceled" (Order status type.) },......

] } }

ERROR RESPONSE:-

status = error (API)

message = Permission Error. Check API credentials

status = error (Login)

message = Seller Not Logged In

status = error ( Is Seller)

message = Seller Not Approved

status = error (License)

message = Invalid License

status = error_warning (Session)

message = error_warning

status = error

message = No Data

2. GET ALL ORDERS OF SELLER

REQUEST URL:

OPENCART 3X:-

<BASE_BASE_URL>/ index.php?route=extension/account/purpletree_multivendor/api/ sellerorder

OPENCART2X:-

<BASE_BASE_URL>/ index.php?route=account/purpletree_multivendor/api/sellerorder

PARAMETERS:

GET Request:

page= page number

limit = Number of items on page

NORMAL RESPONSE:-

{ "data": { "seller_orders": [ { "order_id": "36",(Order Id) "customer": "demo customer007",(Customer Name) "admin_order_status": "Complete",(Order status base of admin) "order_status": "Complete",(Seller order status) "total": "$80.00",(Order total)

"commission": "$8.00",(Commissionof seller)

"date_added": "06/07/2018",(Data of order place) "date_modified": "06/07/2018",(Data Of order Status Update)

"shipping_code": "purpletree_shipping.purpletree_shipping” (Type of shipping like Flat)

} ], "total_sale": "$80.00",(Total Amount All Orders) "total_pay": "$72.00",(Total amount to pay seller) "total_commission": "$8.00",(Total commission on complete order.)

"filter_order_status": "5", (Filter order, base of seller order status.)

"filter_admin_order_status": "5",(Filter order, base of admin order status.) "filter_date_from": "2018-06-06",(filter date from. (filter base of the given date)) "filter_date_to": "2018-07-06",(filter date to. (Filter base of the given date)) "order_statuses": [ {

"order_status_id": "7",(Order status id)

"name": "Canceled"(Order status type) }, …… ], "pagination": {

"total": "1", (Number of page) "page": 1,(Current page)

"limit": "2"(Number of item like product per page). }, "results": "Showing 1 to 1 of 1 (1 Pages)"(Number of page (Results of Pagination)) }, "message": "", "status": "success" }

Error response:

status = error (API)

message = Permission Error. Check API credentials

status = error (Login)

message = Seller Not Logged In

status = error ( Is Seller)

message = Seller Not Approved

status = error (License)

message = Invalid License

3. GET SELLER ORDER DETAILES

REQUEST URL:

OPENCART3X:-

<BASE_BASE_URL>/index.php?route=extension/account/purpletree_multivendor/api/sellerorde

r/seller_order_info&order_id=36

OPENCART 2X:-

<BASE_BASE_URL>/ INDEX.PHP?ROUTE=ACCOUNT/PURPLETREE_MULTIVENDOR/API/

SELLERORDER/SELLER_ORDER_INFO&ORDER_ID=36

PARAMETERS:

GET Request:

order_id= Order id

NORMAL RESPONSE:

{ "data": { "manage_order": "1",(Status of manage order) "admin_order_status_id": "5", (Id of admin order status) "module_purpletree_multivendor_commission_status": "5",(Commission Status) "order_id": "36", (Order id) "seller_id": "14",(Seller id) "store_id": "0",(Store id) "store_name": "seller store", (Store name) "store_url": "",(Store URL) "invoice_no": "", (Invoice number) "date_added": "06/07/2018", (Date of place order) "firstname": "demo",(Customer first name) "lastname": "customer007",(Customer last name) "customer": "19",(Link of customer Account Edit) "customer_group": "Default",(Customer group name)

"email": "[email protected]",(Customer email) "telephone": "1231231231",(Customer telephone number) "shipping_method": "Shipping Charge", (Shipping method type) "payment_method": "Cash On Delivery",(Payment method type) "payment_address": "demo customer007<br />demo<br />demo<br />demo 123123<br />Delhi<br />India",(Payment address detail) "shipping_address": "demo customer007<br />demo<br />demo<br />demo 123123<br />Delhi<br />India",(Shipping address detail) "products": [ { "order_product_id": "253", (Order product id base of number of product order) "product_id": "31",(Product id base of all product). "name": "Nikon D300",(Product name). "model": "Product 4",(Product model). "option": [],(Product option). "quantity": "1",(Quantity of order product). "shipping": "$2.00",(Shipping Charge). "seller_name": "seller demo1", (Seller Name). "seller_id": "14",(Seller Id). "price": "$80.00",(Product price). "total": "$80.00",(Total of all product in order). "href": "31"(Product link). } ],

"vouchers": [], (Discount vouchers) "totals": [ { "title": "Sub-Total",(Name of type of totals like subtotal, tax etc) "text": "$80.00"(Amount of total) }, {

"title": Amount of total "text": "$2.00""Seller Shipping Total", (Total of all amount like product price tax .etc))

}, { "title": "Total",(Amount of total) "text": "$82.00"(Total of all amount like product price , tax ..etc) } ], "comment": "", (Any additional comment about order) "reward": 0,(Number of reward point) "reward_total": "0",(Reward point total) "affiliate_firstname": "", (Affiliate person first name) "affiliate_lastname": "",(Affiliate person last name) "affiliate": "",(Affiliate data) "commission": "$0.00",(Commission amount) "commission_total": "", (Commission amount total) "order_status": "Complete",

"order_statuses": [ {

"order_status_id": "7", (Order status id base of order status type) "name": "Canceled"(Order status type name) },……… ], "order_status_id": "5", "account_custom_field": null,(Account custom field data). "account_custom_fields": [], (Number of account custom fields) "payment_custom_fields": [], (Payment custom fields data) "shipping_custom_fields": [], (Shippingcustomfieldsdata) "tabs": [](tabs data) }, "status": "success" }

ERROR RESPONSE:

Status = error (API)

message = Permission Error. Check API credentials

status = error (Login)

message = Seller Not Logged In

status = error ( Is Seller)

message = Seller Not Approved

status = error (License)

message = Invalid License

status = error (Order)

message = NO Order id providedNo Data

status = error

message = No Data

status = error (Commission Status)

message = module_purpletree_multivendor_commission_status_warning

1

4. ADD SELLER ORDER HISTORY

REQUEST URL:

OPENCART 3X:-

<BASE_BASE_URL>/index.php?route=extension/account/purpletree_multivendor/api/sellerorder/seller

_order_info&order_id=36 sellerorder/history&order_id=36

OPENCART 2X:-

<BASE_BASE_URL>/

index.php?route=account/purpletree_multivendor/api/sellerorder/history&order_id=36

PARAMETERS:

GET request:

order_id= Order id

POST request:-

order_status_id= Order status id base of order status

comment= Any additional comment

notify= for customer notify or not (Yes Or No)

override= Override Order history or not (Yes Or No)

NORMAL RESPONSE:- {

"data": [], "status": "success", "message": "Success: You have modified orders!"

}

ERROR RESPONSE:- status = error (API)

message = Permission Error. Check API credentials

status = error (Login)

message = Seller Not Logged In

status = error ( Is Seller)

message = Seller Not Approved

status = error (License)

message = Invalid License

status = error

message = No Data

5. GET DETAILS OF SELLER ORDER HISTORY

REQUESTURL:-

OPENCART3X:-

<BASE_BASE_URL>/ index.php?route=extension/purpletree_multivendor/api /sellerorder/

historylist&order_id=36

OPENCART 2X:-

<BASE_BASE_URL>/ index.php?route=account/purpletree_multivendor/api/sellerorder/

historylist&order_id=36

PARAMETERS:

GET Request:

order_id= Order id

page= page number

limit = Number of items on page

NORMAL RESPONSE:

{ "status": "success"

"data": { "histories": [ { "notify": "No",(value of notify like yes or no) "status": "Pending",(Order status) "comment": "",(Any additional comment) "date_added": "06/07/2018"(Update order status date) },…….. ], "pagination": { "total": "4",(Number of page) "page": 1,(current page) "limit": "15"(Number of item like product perpage) }, "results": "Showing 1 to 4 of 4 (1 Pages)" (Number of page in pagination)

} }

ERROR RESPONSE:-

status = error (API)

message = Permission Error. Check API credentials

status = error (Login)

message = Seller Not Logged In

status = error ( Is Seller)

message = Seller Not Approved

status = error (License)

message = Invalid License

status = error

message = No Data

6. GET ALL Products OF SELLER

REQUEST URL:

OPENCART3X:-

<BASE_BASE_URL>/index.php?route=extension/account/purpletree_multivendor/api/sellerorder/seller

_order_info&order_id=36

OPENCART 2X:-

<BASE_BASE_URL>/ index.php?route=account/purpletree_multivendor/api/sellerproduct

PARAMETERS:

GET Request:

page= page number

limit = Number of items

NORMAL RESPONSE:

"data": { "text_all": "All",(Product status like all ,enable ,disable) "products": [ { "product_id": "28", (product id base of all product)

"image": "http://opencart3020test.purpletreedemo.com/image/cache/catalog/htc_touch_hd_1-40x40.jpg",(Product image link) "name": "HTC Touch HD",(Product name) "model": "Product 1",(Product modal) "price": 100,(Product price) "special": false,(Product special price) "quantity": "935"(Product quantity), "status": "Disabled",(Product status) "is_approved": "Yes"(Product approval Yes or No) },…….. ],

"selected": [],(Selected data (multiple product id for delete) ) "pagination": { "total": "10",(Number of page) "page": 1,(current page)

"limit": "2"(Number of item like product per pages) }, "results": "Showing 1 to 2 of 10 (5 Pages)",(Number of page (pagination result))

"filter_name": null,(Product name data) "filter_model": null,(Product model data) "filter_price": null,(Product price data) "filter_quantity": null,(Product quantity data) "filter_status": null,( Product status data) "sort": "pd.name",(Sorting type data like base of name etc) "order": "ASC"(Sorting order data) }, "message": "", "status": "success" }

ERROR RESPONSE:-

status = error (API)

message = Permission Error. Check API credentials

status = error (Login)

message = Seller Not Logged In

status = error ( Is Seller)

message = Seller Not Approved

status = error (License)

message = Invalid License

7. ADD NEW SELLER PRODUCT

REQUEST URL:

OPENCART3X:-

<BASE_BASE_URL>/index.php?route=extension/account/purpletree_multivendor/api/sellerproduct/add

OPENCART 2X:-

<BASE_BASE_URL>/ index.php?route=account/purpletree_multivendor/api/ sellerproduct/add

PARAMETERS:

POST REQUEST:

Example of post request:

Array ( [seller_id] => 1 [seller_name] => demo seller [is_approved] => [product_description] => Array ( [1] => Array ( [name] => mp3 player [description] =><p>mp3 player mp3 player mp3 player mp3 player mp3 player mp3 player mp3 player mp3 player mp3 player mp3 player <br></p> [meta_title] => mp3 player [meta_description] => mp3 player mp3 player mp3 player mp3 player [meta_keyword] => mp3 player [tag] => mp3 ) ) [model] => mp31 [sku] => [upc] => [ean] => [jan] => [isbn] => [mpn] => [location] => [price] => 100

[tax_class_id] => 9 [quantity] => 10 [minimum] => 1 [subtract] => 1 [stock_status_id] => 6 [shipping] => 1 [date_available] => 2018-06-27 [length] => [width] => [height] => [length_class_id] => 1 [weight] => [weight_class_id] => 1 [status] => 1 [sort_order] => 1 [manufacturer] => Apple [manufacturer_id] => 8 [category] => [product_category] => Array ( [0] => 34 ) [filter] => [product_store] => Array ( [0] => 0 ) [download] => [related] => [product_related] => Array ( [0] => 34 [1] => 32 ) [product_attribute] => Array ( [0] => Array ( [name] => test 1 [attribute_id] => 4 [product_attribute_description] => Array ( [1] => Array (

[text] => mp3 player ) ) ) ) [option] => [product_option] => Array ( [0] => Array ( [product_option_id] => [name] => Checkbox [option_id] => 2 [type] => checkbox [required] => 1 ) ) [product_discount] => Array ( [0] => Array ( [customer_group_id] => 1 [quantity] => 1 [priority] => 3 [price] => 89 [date_start] => 2018-06-27 [date_end] => 2018-06-30 ) ) [product_special] => Array ( [0] => Array ( [customer_group_id] => 1 [priority] => 2 [price] => 64 [date_start] => 2018-06-27 [date_end] => 2018-06-28 )

) [image] => [points] => 100 [product_reward] => Array ( [1] => Array ( [points] => 10 ) ) [product_seo_url] => Array ( [0] => Array ( [1] => mp3player ) ) )

NORMAL RESPONSE:-

{

"data": { "text_form": "Product Added",(Form name) "languages": {(Name of language) "en-gb": { "language_id": "1", "name": "English", "code": "en-gb",(Language code) "locale": "en-US,en_US.UTF-8,en_US,en-gb,english",(Language location) "image": "gb.png",(Language image name) "directory": "english",(Language directory name) "sort_order": "1",(Language shorting order) "status": "1"(Language status enable or disable) } }, "related_approval": "1",(Related To seller Approval) "limit_approval": "100",(Limit of Seller Approval)

"seller_id": "1",(ID of seller) "seller_name": "demo seller",(Name of Seller) "is_approved": "", "stores": [ { "store_id": 0,(ID of store) "name": "Default" } ], "tax_classes": [ { "tax_class_id": "9",(ID of tax class) "title": "Taxable Goods",(Title of tax class) "description": "Taxed goods",(Description about tax) "date_added": "2009-01-06 23:21:53",(Date of adding the tax) "date_modified": "2011-09-23 14:07:50"(Date of change the Tax class) },…………… ], "stock_statuses": [ { "stock_status_id": "6",(ID of stock Status) "name": "2-3 Days"(In stock or not) },…………… ], "weight_classes": [ { "weight_class_id": "1",(Id of Weight Class) "value": "1.00000000",(Value of weight class) "language_id": "1",(Id of language) "title": "Kilogram", (Title like gram, pound etc.) "unit": "kg"(Unit like kg, gm etc) },…………… ], "length_classes": [(Length class of products) { "length_class_id": "1",(Length Class Id) "value": "1.00000000",(Value of Length class) "language_id": "1",(ID of language) "title": "Centimeter",(Like Cm, m,km,miles etc ) "unit": "cm" },…………… ], "customer_groups": [ { "customer_group_id": "1",(Customer id) "approval": "0",(Approvals of customer groups)

"sort_order": "1", () "language_id": "1", "name": "Default", "description": "test" } ], "thumb": "<BASE_BASE_URL>/image/cache/no_image-100x100.png", "placeholder": "<BASE_BASE_URL>/image/cache/no_image-100x100.png", }, "message": "", "status": "success" }

ERROR RESPONSE:-

status = error (API)

message = error_permission

status = error (Login)

message = Seller Not Logged In

message = error_permission

status = error (Login)

message = Seller Not Logged In

status = error ( Is Seller)

message = Seller Not Approved

status = error (License)

message = error_license

status = error (product name)

message = Product Name must be greater than 3 and less than 255 characters!

status= error (meta title)

message= Meta Title must be greater than 3 and less than 255 characters!

status= error (product weight)

message= Product Weight must be greater than 0!

status= error (product price extra type)

message= Extra Price Type is must, Please select either Fixed or Percentage!

status= error (product extra price)

message= Extra Price must be greater than 0!

status= error (product model)

message= Product Model must be greater than 1 and less than 64 characters!

status= error(product seo keyword)

message= SEO URL already in use!

8. Get product information of seller

REQUESTURL:-

OPENCART3X:-

<BASE_BASE_URL>/ index.php?route=extension/purpletree_multivendor/ api /

sellerproduct/edit&product_id=30

OPENCART 2X:-

<BASE_BASE_URL>/index.php?route=account/purpletree_multivendor/api/

sellerproduct/edit&product_id=30

PARAMETERS:

GET REQUEST

product_id=30

NORMAL RESPONSE:

"data": { "text_form": "Edit Product",(Form name)

"languages": {(Languages To get Seller) "en-gb": { "language_id": "1",( Language id base of all language) "name": "English",(Name of language) "code": "en-gb", (Language code) "locale": "en-US,en_US.UTF-8,en_US,en-gb,english",(Language location) "image": "gb.png",( Language image name) "directory": "english",(Language directory name) "sort_order": "1",(Language shorting order) "status": "1" (Language status enable or disable) }, "related_approval": "1", (Product approval status) "limit_approval": "11", (Product limit approval)

"seller_id": "14", (Seller id) "seller_name": "seller demo1", (Name of seller) "is_approved": "1",( Product approve required status) "product_description": { "1": { "name": "HTC Touch HD",(Product name) "description": (Product description) "&lt;p&gt;\r\n\tHTC Touch - in High Definition. Watch music videos and streaming content in awe-inspiring high definition clarity for a mobile experience you never thought possible. Seductively sleek, the HTC Touch HD provides the next generation of mobile functionality, all at a simple touch. Fully integrated with Windows Mobile Professional 6.1, ultrafast 3.5G, GPS, 5MP camera, plus lots more - all delivered on a breathtakingly crisp 3.8&quot; WVGA touchscreen - you can take control of your mobile world with the HTC Touch HD.&lt;/p&gt;\r\n&lt;p&gt;\r\n\t&lt;strong&gt;Features&lt;/strong&gt;&lt;/p&gt;\r\n&lt;ul&gt;\r\n\t&lt;li&gt;\r\n\t\tProcessor Qualcomm® MSM 7201A™ 528 MHz&lt;/li&gt;\r\n\t&lt;li&gt;\r\n\t\tWindows Mobile® 6.1 Professional Operating System&lt;/li&gt;\r\n\t&lt;li&gt;\r\n\t\tMemory: 512 MB ROM, 288 MB RAM&lt;/li&gt;\r\n\t&lt;li&gt;\r\n\t\tDimensions: 115 mm x 62.8 mm x 12 mm / 146.4 grams&lt;/li&gt;\r\n\t&lt;li&gt;\r\n\t\t3.8-inch TFT-LCD flat touch-sensitive screen with 480 x 800 WVGA resolution&lt;/li&gt;\r\n\t&lt;li&gt;\r\n\t\tHSDPA/WCDMA: Europe/Asia: 900/2100 MHz; Up to 2 Mbps up-link and 7.2 Mbps down-link speeds&lt;/li&gt;\r\n\t&lt;li&gt;\r\n\t\tQuad-band GSM/GPRS/EDGE: Europe/Asia: 850/900/1800/1900 MHz (Band frequency, HSUPA availability, and data speed are operator dependent.)&lt;/li&gt;\r\n\t&lt;li&gt;\r\n\t\tDevice Control via HTC TouchFLO™ 3D &amp; Touch-sensitive front panel buttons&lt;/li&gt;\r\n\t&lt;li&gt;\r\n\t\tGPS and A-GPS ready&lt;/li&gt;\r\n\t&lt;li&gt;\r\n\t\tBluetooth® 2.0 with Enhanced Data Rate and A2DP for wireless stereo headsets&lt;/li&gt;\r\n\t&lt;li&gt;\r\n\t\tWi-Fi®: IEEE 802.11 b/g&lt;/li&gt;\r\n\t&lt;li&gt;\r\n\t\tHTC ExtUSB™ (11-pin mini-USB 2.0)&lt;/li&gt;\r\n\t&lt;li&gt;\r\n\t\t5 megapixel color camera with auto focus&lt;/li&gt;\r\n\t&lt;li&gt;\r\n\t\tVGA CMOS color camera&lt;/li&gt;\r\n\t&lt;li&gt;\r\n\t\tBuilt-in 3.5 mm audio jack, microphone, speaker, and FM radio&lt;/li&gt;\r\n\t&lt;li&gt;\r\n\t\tRing tone formats: AAC, AAC+, eAAC+, AMR-NB, AMR-WB, QCP, MP3, WMA, WAV&lt;/li&gt;\r\n\t&lt;li&gt;\r\n\t\t40 polyphonic and standard MIDI format 0 and 1 (SMF)/SP MIDI&lt;/li&gt;\r\n\t&lt;li&gt;\r\n\t\tRechargeable Lithium-ion or Lithium-ion polymer 1350 mAh battery&lt;/li&gt;\r\n\t&lt;li&gt;\r\n\t\tExpansion Slot: microSD™ memory card (SD 2.0 compatible)&lt;/li&gt;\r\n\t&lt;li&gt;\r\n\t\tAC Adapter Voltage range/frequency: 100 ~ 240V AC, 50/60 Hz DC output: 5V and 1A&lt;/li&gt;\r\n\t&lt;li&gt;\r\n\t\tSpecial Features: FM Radio, G-Sensor&lt;/li&gt;\r\n&lt;/ul&gt;\r\n", "meta_title": "\t HTC Touch HD", (Product Meta title) "meta_description": "", (ProductMeta description) "meta_keyword": "",(Product Meta keyword) Language id[tag] = (Product Meta tag)

}, "2": { "name": "HTC Touch HD", "description": "&lt;p&gt;\r\n\tHTC Touch - in High Definition. Watch music videos and streaming content in awe-inspiring high definition clarity for a mobile experience you never thought possible. Seductively sleek, the HTC Touch HD provides the next generation of mobile functionality, all at a simple touch. Fully integrated with Windows Mobile Professional 6.1, ultrafast 3.5G, GPS, 5MP camera, plus lots more - all delivered on a breathtakingly crisp 3.8&quot; WVGA touchscreen - you can take control of your mobile world with the HTC Touch HD.&lt;/p&gt;\r\n&lt;p&gt;\r\n\t&lt;strong&gt;Features&lt;/strong&gt;&lt;/p&gt;\r\n&lt;ul&gt;\r\n\t&lt;li&gt;\r\n\t\tProcessor Qualcomm® MSM 7201A™ 528 MHz&lt;/li&gt;\r\n\t&lt;li&gt;\r\n\t\tWindows Mobile® 6.1 Professional Operating System&lt;/li&gt;\r\n\t&lt;li&gt;\r\n\t\tMemory: 512 MB ROM, 288 MB RAM&lt;/li&gt;\r\n\t&lt;li&gt;\r\n\t\tDimensions: 115 mm x 62.8 mm x 12 mm / 146.4 grams&lt;/li&gt;\r\n\t&lt;li&gt;\r\n\t\t3.8-inch TFT-LCD flat touch-sensitive screen with 480 x 800 WVGA resolution&lt;/li&gt;\r\n\t&lt;li&gt;\r\n\t\tHSDPA/WCDMA: Europe/Asia: 900/2100 MHz; Up to 2 Mbps up-link and 7.2 Mbps down-link speeds&lt;/li&gt;\r\n\t&lt;li&gt;\r\n\t\tQuad-band GSM/GPRS/EDGE: Europe/Asia: 850/900/1800/1900 MHz (Band frequency, HSUPA availability, and data speed are operator dependent.)&lt;/li&gt;\r\n\t&lt;li&gt;\r\n\t\tDevice Control via HTC TouchFLO™ 3D &amp; Touch-sensitive front panel buttons&lt;/li&gt;\r\n\t&lt;li&gt;\r\n\t\tGPS and A-GPS ready&lt;/li&gt;\r\n\t&lt;li&gt;\r\n\t\tBluetooth® 2.0 with Enhanced Data Rate and A2DP for wireless stereo headsets&lt;/li&gt;\r\n\t&lt;li&gt;\r\n\t\tWi-Fi®: IEEE 802.11 b/g&lt;/li&gt;\r\n\t&lt;li&gt;\r\n\t\tHTC ExtUSB™ (11-pin mini-USB 2.0)&lt;/li&gt;\r\n\t&lt;li&gt;\r\n\t\t5 megapixel color camera with auto focus&lt;/li&gt;\r\n\t&lt;li&gt;\r\n\t\tVGA CMOS color camera&lt;/li&gt;\r\n\t&lt;li&gt;\r\n\t\tBuilt-in 3.5 mm audio jack, microphone, speaker, and FM radio&lt;/li&gt;\r\n\t&lt;li&gt;\r\n\t\tRing tone formats: AAC, AAC+, eAAC+, AMR-NB, AMR-WB, QCP, MP3, WMA, WAV&lt;/li&gt;\r\n\t&lt;li&gt;\r\n\t\t40 polyphonic and standard MIDI format 0 and 1 (SMF)/SP MIDI&lt;/li&gt;\r\n\t&lt;li&gt;\r\n\t\tRechargeable Lithium-ion or Lithium-ion polymer 1350 mAh battery&lt;/li&gt;\r\n\t&lt;li&gt;\r\n\t\tExpansion Slot: microSD™ memory card (SD 2.0 compatible)&lt;/li&gt;\r\n\t&lt;li&gt;\r\n\t\tAC Adapter Voltage range/frequency: 100 ~ 240V AC, 50/60 Hz DC output: 5V and 1A&lt;/li&gt;\r\n\t&lt;li&gt;\r\n\t\tSpecial Features: FM Radio, G-Sensor&lt;/li&gt;\r\n&lt;/ul&gt;\r\n", "meta_title": "\t HTC Touch HD",",( Product meta title) "meta_description": "",(Product meta title) "meta_keyword": "",( Product meta description) "tag": ""(Product Meta tag) } }, "metal": "0", "price_extra": "0.0000",

"price_extra_type": "0", "model": "Product 1", "sku": "", "upc": "", "ean": "", "jan": "", "isbn": "", "mpn": "", "location": "", "stores": [ { "store_id": 0, "name": "Default" } ], "product_store": [ "0" ], "keyword": "htc-touch-hd", "shipping": "1", "price": "100.0000", "tax_classes": [ { "tax_class_id": "9", "title": "Taxable Goods", "description": "Taxed goods", "date_added": "2009-01-06 23:21:53", "date_modified": "2011-09-23 14:07:50" },…….. ], "tax_class_id": "9",(Product tax class id base of tax type) "date_available": "2009-02-03",(Product available data) "quantity": "935",(Quantity of products) "minimum": "1",(Product quantity) "subtract": "1",(Product subtract or not in quantity when product sold, status like yes or no) "sort_order": "0", "stock_statuses": [ { "stock_status_id": "6", "name": "2-3 Days" },….…. ], "stock_status_id": "7", "status": "0", "weight": "146.40000000", "weight_classes": [

{ "weight_class_id": "1", "value": "1.00000000", "language_id": "1", "title": "Kilogram", "unit": "kg" },……………. ], "weight_class_id": "2", "length": "0.00000000", "width": "0.00000000", "height": "0.00000000", "length_classes": [ { "length_class_id": "1", "value": "1.00000000", "language_id": "1", "title": "Centimeter", "unit": "cm" },…….. ], "length_class_id": "1", "manufacturer_id": "5", "manufacturer": "HTC", "product_categories": [ { "category_id": "20", "name": "Desktops" }, { "category_id": "24", "name": "Phones &amp; PDAs" } ], "product_seo_url": [ { "1": "htc-touch-hd" } ], "customer_groups": [ { "customer_group_id": "1", "approval": "0", "sort_order": "1", "language_id": "1", "name": "Default", "description": "test"

} ], "image": "catalog/htc_touch_hd_1.jpg", "thumb": "<BASE_BASE_URL>//image/cache/catalog/htc_touch_hd_1-100x100.jpg", "placeholder": "<BASE_BASE_URL>//image/cache/no_image-100x100.png", "product_images": [ { "image": "catalog/htc_touch_hd_3.jpg", "thumb": "<BASE_BASE_URL>//image/cache/catalog/htc_touch_hd_3-100x100.jpg", "sort_order": "0" }, { "image": "catalog/profile-45x45.png", "thumb": "<BASE_BASE_URL>//image/cache/catalog/profile-45x45-100x100.png", "sort_order": "0" } ], "points": "200", "product_reward": { "1": { "points": "400" } } }, "message": "", "status": "success" }

1.1.1

9. EDIT AND SAVE SELLER PRODUCT INFORMATION

REQUES URLT:

OPENCART3X:-

<BASE_BASE_URL>/index.php?route=extension/purpletree_multivendor/api /

sellerproduct/edit&product_id=30

OPENCART 2X:-

<BASE_BASE_URL>/ index.php?route=account/purpletree_multivendor/api/ sellerproduct/

edit&product_id=30

PARAMETERS:

Product_id

EXAMPLE OF POST REQUEST:-

Array ( [seller_id] => 1 [seller_name] => demo seller [product_description] => Array ( [1] => Array ( [name] => mp3 player [description] =><p>mp3 player mp3 player mp3 player mp3 player mp3 player mp3 player mp3 player mp3 player mp3 player mp3 player <br></p> [meta_title] => mp3 player [meta_description] => mp3 player mp3 player mp3 player mp3 player [meta_keyword] => mp3 player [tag] => mp3 ) ) [model] => mp31 [sku] => [upc] => [ean] => [jan] => [isbn] => [mpn] => [location] => [price] => 100 [tax_class_id] => 9 [quantity] => 10 [minimum] => 1 [subtract] => 1 [stock_status_id] => 6 [shipping] => 1 [date_available] => 2018-06-27 [length] => [width] => [height] => [length_class_id] => 1

[weight] => [weight_class_id] => 1 [status] => 1 [sort_order] => 1 [manufacturer] => Apple [manufacturer_id] => 8 [category] => [product_category] => Array ( [0] => 34 ) [filter] => [product_store] => Array ( [0] => 0 ) [download] => [related] => [product_related] => Array ( [0] => 34 [1] => 32 ) [product_attribute] => Array ( [0] => Array ( [name] => test 1 [attribute_id] => 4 [product_attribute_description] => Array ( [1] => Array ( [text] => mp3 player ) ) ) ) [option] => [product_option] => Array

( [0] => Array ( [product_option_id] => [name] => Checkbox [option_id] => 2 [type] => checkbox [required] => 1 ) ) [product_discount] => Array ( [0] => Array ( [customer_group_id] => 1 [quantity] => 1 [priority] => 3 [price] => 89 [date_start] => 2018-06-27 [date_end] => 2018-06-30 ) ) [product_special] => Array ( [0] => Array ( [customer_group_id] => 1 [priority] => 2 [price] => 64 [date_start] => 2018-06-27 [date_end] => 2018-06-28 ) ) [image] => [points] => 100 [product_reward] => Array ( [1] => Array ( [points] => 10 )

) [product_seo_url] => Array ( [0] => Array ( [1] => mp3player ) ) )

NORMAL RESPONSE:

{ "data": [], "status": "success", "message": " Success: Success: You have modified products!"

}

ERROR RESPONSE:-

status = error (API)

message = Permission Error. Check API credentials

status = error (Login)

message = Seller Not Logged In

status = error ( Is Seller)

message = Seller Not Approved

status = error (License)

message = Invalid License

status = error

message = No Data

status = error (product name)

message = Product Name must be greater than 3 and less than 255 characters!

status= error (meta title)

message= Meta Title must be greater than 3 and less than 255 characters!

status= error (product weight)

message= Product Weight must be greater than 0!

status= error (product price extra type)

message= Extra Price Type is must, Please select either Fixed or Percentage!

status= error (product extra price)

message= Extra Price must be greater than 0!

status= error (product model)

message= Product Model must be greater than 1 and less than 64 characters!

status= error(product seo keyword)

message= SEO URL already in use!

2

10. Create duplicate seller product

REQUEST URL:

OPENCART3X:-

<BASE_BASE_URL>/

index.php?route=extension/account/purpletree_multivendor/api/sellerproduct/copy&product_id=28

OPENCART 2X:-

<BASE_BASE_URL>/index.php?route=account/purpletree_multivendor/api/sellerproduct/

copy&product_id=28

PARAMETERS:

GET request:

product_id = Product id

NORMAL RESPONSE:

{ "product_id":133, "status":"success", "message":"Success: You have modified products!"

}

ERROR RESPONSE:-

status = error (API) message = Permission Error. Check API credentials status = error (Login) message = Seller Not Logged In status = error ( Is Seller) message = Seller Not Approved status = error (License) message = Invalid License status = error message = No Data

11. Delete multipleseller products

REQUEST URL:

OPENCART3X:-

<BASE_BASE_URL>/extension/account/purpletree_multivendor/api/sellerproduct/deletes

OPENCART 2X:-

<BASE_BASE_URL>/index.php?route=account/purpletree_multivendor/api/sellerproduct/

deletes

PARAMETERS:

Post request:

EXAMPLE:

Array ( [selected] => Array ( [0] => 30 [1] => 34 ) )

Selected = collection of one or more then one product

[0] =>30( selected product id )

NORMAL RESPONSE:

{ "status": "success", "message": " Success: Success: You have modified products!" }

ERROR RESPONSE:-

status = error (API)

message = Permission Error. Check API credentials

status = error (Login)

message = Seller Not Logged In

status = error ( Is Seller)

message = Seller Not Approved

status = error (License)

message = Invalid License

status = error

message = No Data

12. Get manufacturers (Brand)forseller products

REQUEST URL:

OPENCART3X:-

<BASE_BASE_URL>/

index.php?route=extension/account/purpletree_multivendor/api/sellerproduct/manufacturer&filter_n

ame=Canon

OPENCART 2X:-

<BASE_BASE_URL>/ index.php?route=account/purpletree_multivendor/api/ sellerproduct/

manufacturer&filter_name=Canon

PARAMETERS:

GET request:

filter_name = Manufacturer name

NORMAL RESPONSE:

{ "manufacturer_id": "9",(Manufacturer Id of product) "name": "Canon"(Manufacturer name) },

ERROR RESPONSE:-

status = error (API) message = Permission Error. Check API credentials status = error (Login) message = Seller Not Logged In status = error ( Is Seller) message = Seller Not Approved status = error (License) message = Invalid License status = error message = No Data

13. Get categories for seller product

REQUEST URL:

OPENCART3X:-

<BASE_BASE_URL>/

index.php?route=extension/account/purpletree_multivendor/api/sellerproduct/category&filter_name=

C

OPENCART 2X:-

<BASE_BASE_URL>/ index.php?route=account/purpletree_multivendor/api/sellerproduct/

category&filter_name=C

GETPARAMETERS:

GET Request:

filter_name = category name

NORMAL RESPONSE:

{ "category_id": "33",(Category Id of product) "name": "Cameras"(Category name) }, ……………

ERROR RESPONSE:-

status = error (API) message = Permission Error. Check API credentials status = error (Login) message = Seller Not Logged In status = error ( Is Seller) message = Seller Not Approved status = error (License) message = Invalid License status = error message = No Data

14. Get filters for seller product

REQUEST URL:

OPENCART3X:-

<BASE_BASE_URL>/ /index.php?route=extension/account/purpletree_multivendor/api/sellerproduct

/filter&filter_name=C

OPENCART 2X:-

<BASE_BASE_URL>/ index.php?route=account/purpletree_multivendor/api/sellerproduct/

filter&filter_name=C

GET PARAMETERS:

GET Request:

filter_name = filter name

NORMAL RESPONSE:

{ "filter_id": "33",(filter Id of product) "name": "catogy"(filter name) },

……………

ERROR RESPONSE:-

status = error (API) message = Permission Error. Check API credentials status = error (Login) message = Seller Not Logged In status = error ( Is Seller) message = Seller Not Approved status = error (License) message = Invalid License status = error message = No Data

15. Search download items with name

REQUEST URL:

OPENCART3X:-

<BASE_BASE_URL>/ index.php?route=extension/account/purpletree_multivendor/api/sellerproduct

/download&filter_name=a

OPENCART 2X:-

<BASE_BASE_URL>/index.php?route=account/purpletree_multivendor/api/sellerproduct/

download&filter_name=a

GET Parameters:

GET Request

filter_name = download name

NORMAL RESPONSE:

{ "download_id": "7",(download Id of product) "name": "adv"(download file name) }, ………………

ERROR RESPONSE:-

status = error (API)

message = Permission Error. Check API credentials

status = error (Login)

message = Seller Not Logged In

status = error ( Is Seller)

message = Seller Not Approved

status = error (License)

message = Invalid License

status = error

message = No Data

16. Search seller products with product name

REQUEST URL:

OPENCART3X:-

<BASE_BASE_URL>/index.php?route=extension/account/purpletree_multivendor/api/sellerproduct/pro

duct&filter_name=a

OPENCART 2X:-

<BASE_BASE_URL>/ index.php?route=account/purpletree_multivendor/api/sellerproduct/

product&filter_name=a

GET PARAMETERS:-

GET Request:

filter_name = product name

NORMAL RESPONSE:

{ "product_id": "30",(product id) "name": "Canon EOS 5D",(product name) "model": "Product 3",(product model) "option": [(product option data array) { "product_option_id": "226", "product_option_value": [ {

"product_option_value_id": "15", "option_value_id": "39", "name": "Red", "price": false, "price_prefix": "+" }, ], "option_id": "5", "name": "Select", "type": "select", "value": "", "required": "1" } ], "price": "100.0000"(product price) }, ……………..

ERROR RESPONSE:-

status = error (API) message = Permission Error. Check API credentials status = error (Login) message = Seller Not Logged In status = error ( Is Seller) message = Seller Not Approved status = error (License) message = Invalid License status = error message = No Data

17. Search attribute name for Seller Product

REQUEST URL:

OPENCART3X:-

<BASE_BASE_URL>/index.php?route=extension/account/purpletree_multivendor/api/sellerproduct/attr

ibute&filter_name=c

OPENCART 2X:-

<BASE_BASE_URL>/index.php?route=account/purpletree_multivendor/

api/sellerproduct/ attribute&filter_name=c

GET PARAMETERS:-

GET Request:

filter_name = attribute name

NORMAL RESPONSE:

{ "attribute_id": "3",(attribute Id of product) "name": "Clockspeed",( Attribute file name) "attribute_group": "Processor"(Name of attribute group) }, …………

ERROR RESPONSE:-

status = error (API)

message = error_permission

status = error (Login)

message = Seller Not Logged In

message = error_permission

status = error (Login)

message = Seller Not Logged In

status = error ( Is Seller)

message = Seller Not Approved

status = error (License)

message = error_license

18. Get product options by product name

REQUEST URL:

OPENCART3X:-

<BASE_BASE_URL>/index.php?route=extension/account/purpletree_multivendor/api/sellerproduct/opt

ion&filter_name=t

OPENCART 2X:-

<BASE_BASE_URL>/ index.php?route=account/purpletree_multivendor/api/ sellerproduct/

option&filter_name=t

GET PARAMETERS:

GET Request:

filter_name = option name

NORMAL RESPONSE:

{ "option_id": "4",(Option id of product) "name": "Text",(Option file name) "category": "Input",(Category name of option) "type": "text",(Option type) "option_value": [](Option value) }, { "option_id": "6", "name": "Textarea", "category": "Input", "type": "textarea", "option_value": [] }, { "option_id": "9", "name": "Time", "category": "Date", "type": "time", "option_value": [] }

ERROR RESPONSE:-

status = error (API) message = Permission Error. Check API credentials status = error (Login) message = Seller Not Logged In status = error ( Is Seller) message = Seller Not Approved

status = error (License) message = Invalid License status = error message = No Data

19. Get list of downloaditems of seller

REQUEST URL:

OPENCART3X:-

<BASE_BASE_URL>/ index.php?route=extension/account/purpletree_multivendor/api/

downloads

OPENCART 2X:-

<BASE_BASE_URL>/ index.php?route=account/purpletree_multivendor/api/ downloads

PARAMETERS:

GET Request:

page= page number

limit = Number of items

NORMAL RESPONSE:

{ "download_id": "2",(Download Id) "name": "downlaodable2",(Download language name like English, Arabic etc) "date_added": "13/06/2018"(The Date Downloads language created) }, { "download_id": "8", "name": "fdfd", "date_added": "13/06/2018" }, …………….

ERROR RESPONSE:-

status = error (API)

message = Permission Error. Check API credentials

status = error (Login)

message = Seller Not Logged In

status = error ( Is Seller)

message = Seller Not Approved

status = error (License)

message = Invalid License

3

20. Add new DOWNLOADABLE ITEM

REQUEST URL:

OPENCART3X:-

<BASE_BASE_URL>/ index.php?route=extension/account/purpletree_multivendor/api/ downloads/add

OPENCART 2X:-

<BASE_BASE_URL>/ index.php?route=account/purpletree_multivendor/api/ downloads/add

PARAMETERS:

POST Request:

Example of post request:

Array ( [download_description] => Array ( [1] => Array ( [name] => demo ) ) [filename] => Jellyfish.jpg.wzV6UCMtMfrxRH4NTRJigF8cXAcnrOcU [mask] => Jellyfish.jpg )

download_descriptionb [1] = Language id

Language id [name] = Download Name

filename = You can upload via the upload button or use FTP to upload to the download directory

and enter the details below

mask = The filename and the mask are different to stop people trying to directly link to your

downloads.

NORMAL RESPONSE:

{

"data": { "text_form": "Add Download",(Form name) "languages": { (Name of language) "en-gb": { "language_id": "1", "name": "English", "code": "en-gb",(Language code) "locale": "en-US,en_US.UTF-8,en_US,en-gb,english",(Language location) "image": "gb.png",(Language image name) "directory": "english", (Language directory name) "sort_order": "1",(Language shorting order) "status": "1"(Language status enable or disable) }……… } }, "message": "", "status": "success"(API status)

}

ERROR RESPONSE:-

status = error (API)

message = Permission Error. Check API credentials

status = error (Login)

message = Seller Not Logged In

status = error ( Is Seller)

message = Seller Not Approved

status = error (License)

message = Invalid License

status = error

message = No Data

status = error (download name)

message = Download Name must be between 3 and 64 characters!

status = error (filename)

message = Filename must be between 3 and 128 characters!

status = error(mask)

message = Mask must be between 3 and 128 characters!

21. Edit downloadable item of seller

REQUEST URL:

OPENCART3X:-

<BASE_BASE_URL>/ index.php?route=extension/account/purpletree_multivendor/api/ downloads/

edit&download_id=1

OPENCART 2X:-

<BASE_BASE_URL>/ index.php?route=account/purpletree_multivendor/api/downloads/

edit&download_id=1

PARAMETERS:

GET Request:

download_id = Download id base of all download

POST request:

EXAMPLE:-

Array

( [download_description] => Array ( [1] => Array ( [name] => demo ) ………….. ) [filename] => Jellyfish.jpg.wzV6UCMtMfrxRH4NTRJigF8cXAcnrOcU

[mask] => Jellyfish.jpg )

download_descriptionb [1] = Language id

Language id [name] = Download Name

filename = You can upload via the upload button or use FTP to upload to the download directory

and enter the details below

mask = The filename and the mask are different to stop people trying to directly link to your

downloads.

NORMAL RESPONSE:

{ "data": { "text_form": "Edit Download",(Form name) "languages": { "en-gb": { "language_id": "1",(Language id base of all language) "name": "English",(Name of language) "code": "en-gb",(Language code) "locale": "en-US,en_US.UTF-8,en_US,en-gb,english",(Language location) "image": "gb.png",(Language image name) "directory": "english", (Language directory name) "sort_order": "1",(Language shorting order) "status": "1"(Language status enable or disable) },……… }, "download_id": "2", "download_description": { (Language id) "1": { "name": "downlaodable2"(Download Name 1) }, "2": { "name": "downlaodable2"(Download Name 2) } }, "filename": "Desert.jpg.EBzBXhXtg0Cq6r7LKG70QCCORABGEkOl",(Name of a File). "mask": "Desert.jpg" }, "message": "", "status": "success" }

ERROR RESPONSE:-

status = error (API)

message = Permission Error. Check API credentials

status = error (Login)

message = Seller Not Logged In

status = error ( Is Seller)

message = Seller Not Approved

status = error (License)

message = Invalid License

status = error

message = No Data

status = error (download name)

message = Download Name must be between 3 and 64 characters!

status = error (filename)

message = Filename must be between 3 and 128 characters!

status = error(mask)

message = Mask must be between 3 and 128 characters!

22. Delete download items of seller

REQUEST URL:

OPENCART3X:-

<BASE_BASE_URL>/ index.php?route=extension/account/purpletree_multivendor/api/ downloads/

delete

OPENCART 2X:-

<BASE_BASE_URL>/ index.php?route=account/purpletree_multivendor/api/downloads/ delete

PARAMETERS:

GET Request:

EXAMPLE OF GET REQUEST:

Array (

[0] => 1 )

1

[0]=>1 = Download id

Normal response:-

{ "data": [], "status": "success", "message": "Your file was successfully deleted!"

}

ERROR RESPONSE:-

status = error (API)

message = Permission Error. Check API credentials

status = error (Login)

message = Seller Not Logged In

status = error ( Is Seller)

message = Seller Not Approved

status = error (License)

message = Invalid License

status = error

message = No Data

23. upload file of download item for seller

REQUEST URL:

OPENCART3X:-

<BASE_BASE_URL>/ index.php?route=extension/account/purpletree_multivendor/api/ downloads/

upload

OPENCART 2X:-

<BASE_BASE_URL>/ index.php?route=account/purpletree_multivendor/api/downloads/ upload

PARAMETERS:

Request:

file =>data from file stream

NORMAL RESPONSE:

{ "data": [], "status": "success", "message": "Your file was successfully uploaded!"

}

ERROR RESPONSE:-

status = error (API)

message = Permission Error. Check API credentials

status = error (Login)

message = Seller Not Logged In

status = error ( Is Seller)

message = Seller Not Approved

status = error (License)

message = Invalid License

status = error

message = No Data

24. Show Seller store information

REQUEST URL:

OPENCART3X:-

<BASE_BASE_URL>/ index.php?route=extension/account/purpletree_multivendor/api/ sellerstore

OPENCART 2X:-

<BASE_BASE_URL>/ index.php?route=account/purpletree_multivendor/api /sellerstore

NORMAL RESPONSE:

{

"status": "success",

"message": "", "data": { "store_id": "16",( Id of Store) "seller_id": "14",(Id of Seller.) "seller_name": "seller demo1",(Name of Seller) "store_live_chat_enable": "1",(Store live chat status like yes or no) "store_live_chat_code": "<!--Start of Tawk.to Script--><script type=\"text/javascript\"> var Tawk_API=Tawk_API||{}, Tawk_LoadStart=new Date(); (function(){ var s1=document.createElement(\"script\"),s0=document.getElementsByTagName(\"script\")[0]; s1.async=true; s1.src='https://embed.tawk.to/5b31bb5feba8cd3125e32b40/default'; s1.charset='UTF-8'; s1.setAttribute('crossorigin','*'); s0.parentNode.insertBefore(s1,s0); })(); </script><!--End of Tawk.to Script-->", (Store live chat script) "store_seo": "seller-stor",(Search Engine Optimization (SEO) of Store.) "store_name": "seller store",(Name of Store.) "store_email": "[email protected]",(Email of Store.) "store_phone": "12345678907410",(Phone of Store) "store_description": "&lt;p&gt;fdf&lt;/p&gt;",(Description of Store.) "store_address": "fdbjjkbjk",(Address of Store.) "store_country": "99",(Country of Store.) "store_state": "1505",(State of Store.) "store_city": "demo",(City of Store.) "store_zipcode": "8989898",(Area Zipcode of Store.) "store_shipping_policy": "",(Policies of Store.) "store_return_policy": "",(Product Return Policy.) "store_meta_keywords": "jkhjh",(help to tell search engine what the topic of the page.) "store_meta_description": "kjjkjk",( summarizes a page's content down the page link

in search engine)

"store_bank_details": "kkjhj",( Details of Bank Like Account no. , Branch, IFSC code.) "store_tin": "",(Text Id of Store) "store_shipping_type": "pts_flexible_shipping",(like Flate rate, advanced Shipping) "store_shipping_order_type": "pts_product_wise",( Like product_wise, Order Wise) "store_shipping_charge": "2.00",(Shipping charge of a store) "store_status": "1", "store_logo": "", (Logo of Store.) "thumb": "http://opencart3020test.purpletreedemo.com/image/cache/no_image-100x100.png",(Path of Logo Directory.) "store_banner": "", (Banner of store) "banner_thumb": "< BASE_URL>/image/cache/catalog/purpletree_banner-100x100.jpg",( Path Of Banner Directory.) "placeholder": "< BASE_URL>/image/cache/no_image-100x100.png",( Link of Placeholder.) "countries": [

{ "country_id": "244",(Id of Country,) "name": "Aaland Islands",(Name of country) "iso_code_2": "AX",(International Code 2) "iso_code_3": "ALA", ( "address_format": "",(Format Of Address,) "postcode_required": "0",(Postcode,) "status": "1"(like success or failed ) }, ] } }

ERROR RESPONSE:-

3.1

status = error (API)

message = Permission Error. Check API credentials

status = error (Login)

message = Seller Not Logged In

status = error ( Is Seller)

message = Seller Not Approved

status = error (License)

message = Invalid License

25. Edit store information of seller

REQUEST URL:

OPENCART3X:-

<BASE_BASE_URL>/ index.php?route=extension/account/purpletree_multivendor/api/

/sellerstoreOPENCART 2X:-

<BASE_BASE_URL>/ index.php?route=account/purpletree_multivendor/api /sellerstore

PARAMETERS: -

POST Request: store_id : Id of Store

seller_id: Id of Seller.

seller_name: Name of Seller

store_live_chat_enable: Store live chat status like yes or no store_live_chat_code: Store live chat script

store_seo: Search Engine Optimization (SEO) of Store.

store_name: Name of Store.

store_email: Email of Store.

store_phone: Phone of Store.

store_description: Description of Store.

store_address: Address of Store.

store_country: Country of Store.

store_state: State of Store.

store_city: City of Store.

store_zipcode: Area Zipcode of Store.

store_shipping_policy : Policies of Store.

store_return_policy: Product Return Policy.

store_meta_keywords: help to tell search engine what the topic of the page.

store_meta_description: summarizes a page's content down the page link in search

engine.

store_bank_details: Details of Bank Like Account no. , Branch, IFSC code.

store_tin: Text Id of Store

store_shipping_type: like Flate rate, advanced Shipping.

store_shipping_order_type : Like product_wise, Order Wise.

store_shipping_charge: Shipping chage of a store.

store_status:

store_logo: Logo of Store.

thumb: Path of Logo Directory.

store_banner: Banner of store.

Thumb : Path Of Banner Directory.

Placeholder: Link of Placeholder.

NORMAL RESPONSE:

{ "status": "success", "message": "", "data": { "store_id": "16",(Id of Store)

"seller_id": "14",(Id of Seller.)

"seller_name": "seller demo1",(Name of Seller) "store_live_chat_enable": "1",(Store live chat status like yes or no)

"store_live_chat_code": "<!--Start of Tawk.to Script--><script type=\"text/javascript\"> var Tawk_API=Tawk_API||{}, Tawk_LoadStart=new Date(); (function(){ var s1=document.createElement(\"script\"),s0=document.getElementsByTagName(\"script\")[0]; s1.async=true;s1.src='https://embed.tawk.to/5b31bb5feba8cd3125e32b40/default'; s1.charset='UTF-8'; s1.setAttribute('crossorigin','*'); s0.parentNode.insertBefore(s1,s0); })(); </script><!--End of Tawk.to Script-->",(Store live chat script) "store_seo": "seller-store",(Search Engine Optimization (SEO) of Store) "store_name": "seller store", (Name of Store.) "store_email": "[email protected]", (Email of Store.) "store_phone": "12345678907410", (Phone of Store) "store_description": "&lt;p&gt;fdf&lt;/p&gt;",(Description of Store.) "store_address": "fdbjjkbjk",(Address of Store.) "store_country": "99",(Country of Store.) "store_state": "1505",(State of Store) "store_city": "demo",(City of Store.) "store_zipcode": "8989898",(Area Zipcode of Store.) "store_shipping_policy": "",(Policies of Store.) "store_return_policy": "",(Product Return Policy.)

"store_meta_keywords": "jkhjh",(help to tell search engine what the topic of the

page.

) "store_meta_description": "kjjkjk", (summarizes a page's content down the page link in search engine) "store_bank_details": "kkjhj", (Details of Bank Like Account no. , Branch, IFSC code) "store_tin": "",(Text Id of Store) "store_shipping_type": "pts_flexible_shipping",(like Flate rate, advanced Shipping) "store_shipping_order_type": "pts_product_wise", (Like product_wise, Order Wise.) "store_shipping_charge": "2.00",( Shipping chage of a store) "store_status": "1", "store_logo": "",(Logo of Store.) "thumb": "http://opencart3020test.purpletreedemo.com/image/cache/no_image-100x100.png",(Path of Logo Directory.) "store_banner": "",(Banner of store.)

"banner_thumb": "< BASE_URL>/image/cache/catalog/purpletree_banner-100x100.jpg",(Path Of Banner Directory.) "placeholder": "< BASE_URL>/image/cache/no_image-100x100.png", "countries": [ { "country_id": "244",(Id of Country,) "name": "Aaland Islands",(Name of Country)

"iso_code_2": "AX",(International Code 2)

"iso_code_3": "ALA",(International Code 3) "address_format": "",(Format of Address) "postcode_required": "0",(Postcode) "status": "1"(like success or failed) }, ] } }

ERROR RESPONSE:-

status = error (API)

message = Permission Error. Check API credentials

status = error (Login)

message = Seller Not Logged In

status = error ( Is Seller)

message = Seller Not Approved

status = error (License)

message = Invalid License

status = error

message = No Data

status = error (store_seo)

message = Do not enter Space or Special characters for SEO URL. Allowed characters are: a-z,0-

9, hyphen (i.e.-") and underscore (i.e. "_")

status = error (error_file_upload)

message = error Error in File Upload.

status = error (store_phone)

message = error in Phone

status = error (store_address)

message = error in price.

status = error (store_city)

message = error in Store City.

status = error (store country)

message = error in Store Country.

26. Get seller store view information

REQUEST URL:

OPENCART3X:-

<BASE_BASE_URL>/ index.php?route=extension/account/purpletree_multivendor/api/ sellerstore/

storeview

OPENCART 2X:-

<BASE_BASE_URL>/ index.php?route=account/purpletree_multivendor/api/sellerstore/ storeview

PARAMETERS:

GET Request:

seller_store_id = 1

NORMAL RESPONSE:

{ "data": { "seller_products": [ { "product_id": "29",(Id of product)

"name": "Palm Treo Pro",(Name of Product like)

"price": "$279.99",(Price Of Product) "image": "<BASE_URL>//image/cache/catalog/palm_treo_pro_1-150x150.jpg",( Path of image.) "special": false,(Special Price of Product.) "minimum": "1",(Minimum products that can only customer buy a particular Product.)

"description": "\n\tRedefine your workday with the Palm Treo Pro smartphone. Perfectly balanced, you can respond to bu.." (Description of product like features etc.)(Description of Product) }, { "product_id": "28", "name": "HTC Touch HD", "price": "$100.00", "image": "<BASE_URL>//image/cache/catalog/htc_touch_hd_1-150x150.jpg", "special": false, "minimum": "1", "description": "\r\n\tHTC Touch - in High Definition. Watch music videos and streaming content in awe-inspiring high de.." }, { "product_id": "31", "name": "Nikon D300", "price": "$80.00", "image": "<BASE_URL>/image/cache/catalog/nikon_d300_1-150x150.jpg", "special": false, "minimum": "1", "description": "\n\t\n\t\tEngineered with pro-level features and performance, the 12.3-effective-megapixel D300 combines .." }, { "product_id": "40", "name": "iPhone", "price": "$101.00", "image": "<BASE_URL>//image/cache/catalog/iphone_1-150x150.jpg", "special": false, "minimum": "1", "description": "\r\n\tiPhone is a revolutionary new mobile phone that allows you to make a call by simply tapping a nam.." } ], "toatl_seller_products": [], "store_rating": { "rating": null, "count": "0" }, "module_purpletree_multivendor_store_email": "1",(status value of purpletree multivenfor store email) "module_purpletree_multivendor_store_phone": "1",(value of purpletree multivenfor store phone) "module_purpletree_multivendor_store_address": "1",( value of purpletree multivenfor store address) "store_name": "seller store",(Name of Store)

"seller_name": "seller demo1",(Name of Seller) "store_email": "[email protected]", (Email of Store.) "store_phone": "12345678907410", (Phone no. of store.) "store_tin": "",(text Id of store.) "store_zipcode": "8989898", (Area code of Store.) "store_description": "<p>fdf</p>",(About the Store.) "store_address": "fdbjjkbjk",(Address of store where the store located.) "seller_review_status": "1",(Seller review Status data.) "store_logo": "<BASE_URL>//image/cache/no_image-150x150.png",( Link of Store Logo.) "store_banner": "<BASE_URL>//image/cache/catalog/purpletree_banner-900x300.jpg",(Link of store Banner) "limits": [ { "text": null,(Name of sorts type) "value": null,(Value of sorts) "seller_store_id": "16" },………. ], "pagination": { "total": "4", "page": 1, "limit": "15" }, "results": "Showing 1 to 4 of 4 (1 Pages)", "sort": "p.sort_order", "order": "ASC", "limit": "15" }, "status": "success" }

ERROR RESPONSE:-

status = error (API)

message = Permission Error. Check API credentials

status = error (Login)

message = Seller Not Logged In

status = error ( Is Seller)

message = Seller Not Approved

status = error (License)

message = Invalid License

27. Get seller reviews

REQUEST URL:

OPENCART3X:-

<BASE_BASE_URL>/index.php?route=extension/account/purpletree_multivendor/api/

/sellerstore/sellerreview

OPENCART 2X:-

<BASE_BASE_URL>/ index.php?route=account/purpletree_multivendor/api /sellerstore/sellerreview

NORMAL RESPONSE:

{

"status": "success", "message": "", "data": { "customer_id": "1",(Customer id) "reviews": [ (array(blank)) { "customer_name": "demo seller", (Customer name) "review_title": "good",(review title like good) "review_description": "good seller",(Description of Review) "rating": 5,(rating value base of 1 to 5 option) "status": "Approved",(rating status) "date_added": "27/06/2018"(date of seller review created) } ], "pagination": {(Link of Pagination) "total": "1",(Total number of pages) "page": 1,(means Which page you are on) "limit": "2" (Limits of pages) }, "results": "Showing 1 to 1 of 1 (1 Pages)" (Result of Pagination) } }

ERROR RESPONSE:-

status = error (API) message = Permission Error. Check API credentials status = error (Login)

message = Seller Not Logged In status = error ( Is Seller) message = Seller Not Approved status = error (License) message = Invalid License

28. Add review for seller store

REQUEST URL:

OPENCART3X:-

<BASE_BASE_URL>/index.php?route=extension/account/purpletree_multivendor/api/ sellerstore

/sellerreview

OPENCART 2X:-

<BASE_BASE_URL>/index.php?route=account/purpletree_multivendor/api/sellerstore

/sellerreview

PARAMETERS:-

Post Request:

Example:

Array

( [review_title] => good [seller_id] => 1 [customer_id] => 1 [review_description] => good seller [rating] => 5 )

review_title = review title like good seller_id = Seller id customer _id = customer id review_discription = review description data

rating = rating value base of 1 to 5 option

NORMAL RESPONSE:

{ "status": "success", "message": "", "data": { "customer_id": "1", "reviews": [],(array(blank)) "pagination": "",(link of pagination) "results": "Showing 0 to 0 of 0 (0 Pages)"(Result of Pagination)

} }

ERROR RESPONSE:-

status = error (API) message = Permission Error. Check API credentials status = error (Login) message = Seller Not Logged In status = error ( Is Seller) message = Seller Not Approved status = error (License) message = Invalid License

4

5

29. Removal request for seller store

REQUEST URL:

OPENCART3X:-

<BASE_BASE_URL>/ index.php?route=extension/account/purpletree_multivendor/api/ sellerstore/

removeseller

OPENCART 2X:-

<BASE_BASE_URL>/ index.php?route=account/purpletree_multivendor/api /sellerstore/removeseller

NORMAL RESPONSE:

{ "status": "success" }

ERROR RESPONSE:-

status = error (API) message = Permission Error. Check API credentials status = error (Login) message = Seller Not Logged In status = error ( Is Seller) message = Seller Not Approved status = error (License) message = Invalid License

6

30. Listing of payments received by seller

REQUEST URL:

OPENCART3X:-

<BASE_BASE_URL>/ index.php?route=extension/account/purpletree_multivendor/api/ sellerpayment

OPENCART 2X:-

<BASE_BASE_URL>/ index.php?route=account/purpletree_multivendor/api / sellerpayment

PARAMETERS: -

GET request:

Page: 1 (Enter page Number)

Limit: 15(Enter Number of Items)

NORMAL RESPONSE:-

{ "status": "success", "message": "", "data": { "seller_payments": [ {

"transaction_id": "54544525445",(Transaction Id) "amount": "$100.00",(SellerPayment Transaction Amount ) "payment_mode": "Cod",(Method of Payment (Credit Card, Debit Card, Net Banking etc.)) "status": "success",(Status of payment.) "created_at": "05/07/2018"(Date of Payment.) } ], "pagination": { "total": "1",(Number of page) "page": 1, (Current page)

"limit": "2"(Number of item like product per page)

}, "results": "Showing 1 to 1 of 1 (1 Pages)",(Number Of Pages (Result of Pagination). "filter_date_from": "2018-06-06",(Filter Date From) "filter_date_to": "2018-07-06"(Filter Date To.) } }

ERROR RESPONSE:-

status = error (API)

message = Permission Error. Check API credentials

status = error (Login)

message = Seller Not Logged In

status = error ( Is Seller)

message = Seller Not Approved

status = error (License)

message = Invalid License

status = error_warning (Session)

message = error_warning

31. Get all sellers (Brows sellers)

REQUEST URL:

OPENCART3X:-

<BASE_BASE_URL>/ index.php?route=extension/account/purpletree_multivendor/api/ sellers

OPENCART 2X:-

<BASE_BASE_URL>/ index.php?route=account/purpletree_multivendor/api/sellers

PARAMETERS:

GET request:

Page: 1 (Enter page Number)

Limit: 15 (Enter Number of Items)

NORMAL RESPONSE:

{ "data": { "sellers": [ { "seller_thumb": "<BASE_URL>/image/cache/placeholder-100x100.png",( Image of seller store.) "seller_name": "dsdsds", (Name of Seller) "seller_address": "fdsf dfsf1221", (Address of Seller) "seller_country": "Argentina",(Country of seller.) "seller_id": "15", (ID of Seller ) "product_total": "2", (Total Number of products) "products": [ { "thumb": "<BASE_URL>/image/cache/catalog/sony_vaio_1-60x60.jpg", "product_id": "46" }, { "thumb": "<BASE_URL>/image/cache/catalog/sony_vaio_1-60x60.jpg", "product_id": "43" } ] },………… ], "sorts": [(Type of Sort Order.) { "text": "Name (A - Z)",(Text of sort order(A-Z , Z-A).) "value": "seller-ASC"(Type of Sorts value(ASC , DESC)) }, { "text": "Name (Z - A)", "value": "seller-DESC"

} ], "limits": [ (How Many Sellers Do You Wants To See On a Single Page). { "text": "15", text of limit like (I want to see 15 seller on my page). "value": "15"(Value of limits.) },………….. ], "pagination": { (No data.) "total": 4, "page": 1, "limit": 20 }, "results": "Showing 1 to 4 of 4 (1 Pages)",(Number Of Pages (Result of Pagination).) "sort": "seller",

"order": "ASC",(Order like ASC or DESC)

"filter": "",(Filter Data.) "limit": 20 }, "status": "success" }

ERROR RESPONSE:-

status = error (API)

message = Permission Error. Check API credentials

status = error (Login)

message = Seller Not Logged In

status = error ( Is Seller)

message = Seller Not Approved

status = error (License)

message = Invalid License

32. Get all shipping rates of seller

REQUEST URL:

OPENCART3X:-

<BASE_BASE_URL>/ index.php?route=extension/account/purpletree_multivendor/api/ shipping

OPENCART 2X:-

<BASE_BASE_URL>/ index.php?route=account/purpletree_multivendor/api/shipping

PARAMETERS:

GET request:

Page: 1 (Enter page Number)

Limit: 15 (Enter Number of Items)

NORMAL RESPONSE:

{ "data": {

"sellers": [ (Data of Sellers like id, country, weight, zip etc.) { "shipping_id": "10",(Shipping ID) "seller_id": "14",(Seller ID) "shipping_country": "India",(Shipping Country NAme) "zipcode_from": "200300",(Area Code from) "zipcode_to": "200500",(Area Code To) "shipping_price": "$7.00",(Shipping Price) "weight_from": "0.00",(Weight From) "weight_to": "1000.00"(Weight to) }

], "selected": [],(Used for multiple selections like checkbox) "pagination": { "total": "23",(Number of page) "page": 1,(Current page) "limit": "2"(Number of item like product per page) }, "results": "Showing 1 to 2 of 23 (12 Pages)",(Number Of Pages (Result of Pagination).) "shipping_country": "",(Number Country like zip code, address) "filter_zip_from": "", (Filter Zip From.) (Filter Zip From.) "filter_zip_to": "",(Filter Zip To.) "filter_price": "",(Filter Price.) "filter_weight_from": "",(Filter Weight From.) "filter_weight_to": "",(FilterWeight To.) "countries": [ { "country_id": "244", "name": "Aaland Islands",

"iso_code_2": "AX", "iso_code_3": "ALA", "address_format": "", "postcode_required": "0", "status": "1" },……………

], "sort": "name", "order": "ASC" }, "message": "", "status": "success" }

6.1

ERROR RESPONSE:-

status = error (API)

message = Permission Error. Check API credentials

status = error (Login)

message = Seller Not Logged In

status = error ( Is Seller)

message = Seller Not Approved

status = error (License)

message = Invalid License

status = error ['shipping_country']

message = Please select a country!

status = error['zip_from']

message = Zip code required!

status = error['zip_to']

message = Zip code required!

status = error['price']

message = Price required!

status = error['weight_from']

message = Weight required!

33. Delete shipping rates of seller

REQUEST URL:

OPENCART3X:-

<BASE_BASE_URL>/index.php?route=extension/account/purpletree_multivendor/api/

shipping/delete

OPENCART 2X:-

<BASE_BASE_URL>/index.php?route=account/purpletree_multivendor/api/

shipping/delete

PARAMETERS:

GET Request:

shipping _id = 1

NORMAL RESPONSE:-

{

“status": "success",

"message": "Success: You have deleted shipping rate

}

ERROR RESPONSE:-

status = error (API) message = Permission Error. Check API credentials status = error (Login) message = Seller Not Logged In status = error ( Is Seller) message = Seller Not Approved status = error (License) message = Invalid License status = error message = No Data Status = error (Success)

Message = Success: You have deleted shipping rate”

34. Delete multiple shipping rates

REQUEST URL:

OPENCART3X:-

<BASE_BASE_URL>/index.php?route=extension/account/purpletree_multivendor/api/

shipping/deletes

OPENCART 2X:-

<BASE_BASE_URL>/ index.php?route=account/purpletree_multivendor/api /

shipping/deletes

PARAMETERS: -

Post request:

EXAMPLE:

Array ( [selected] => Array ( [0] => 30 [1] => 34 ) )

NORMAL RESPONSE:-

{

“status": "success",

"message": "Success: You have deleted shipping rate!”

}

ERROR RESPONSE:-

status = error (API) message = Permission Error. Check API credentials status = error (Login)

message = Seller Not Logged In status = error ( Is Seller) message = Seller Not Approved status = error (License) message = Invalid License status = error message = No Data Status = error (Success)

Message = Success: You have deleted shipping rate”

35. Get list of customer enquiries for seller

REQUEST URL:

OPENCART3X:-

<BASE_BASE_URL>/index.php?route=extension/account/purpletree_multivendor/api/ sellercontact/

sellercontactlist

OPENCART 2X:-

<BASE_BASE_URL>/ index.php?route=account/purpletree_multivendor/api /

sellercontact/sellercontactlist

PARAMETERS : GET page = Page number limit =Number of items Normal response:-

{ "status": "success", "message": "", "data": { "contact_mode": "1",(Type of mode like logged in mode or general) "sellercontacts": [ { "id": "138",(last message id customer/seller) "message": "hello customer",(last message) "customer_id": "20", "contact_from": "1", "customer_name": "Calvin Carter",

"customer_email": "[email protected]",(Customer Email ID) "date_added": "06/07/2018"(communication start date) } ], "config_contactseller": "1",(Contact seller status base of admin) "pagination": { "total": "1",(Number of page ) "page": 1,(Current page) "limit": 1(Number of item like product per page) }, "results": "Showing 1 to 1 of 1 (1 Pages)"(pagination results) } }

ERROR RESPONSE:-

status = error (API) message = Permission Error. Check API credentials status = error (Login) message = Seller Not Logged In status = error ( Is Seller) message = Seller Not Approved status = error (License) message = Invalid License

36. Customer enquiries to seller by customer

REQUEST URL:

OPENCART3X:-

<BASE_BASE_URL>/ index.php?route=extension/account/purpletree_multivendor/api/

sellercontact/customerContactlist

OPENCART 2X:-

<BASE_BASE_URL>/ index.php?route=account/purpletree_multivendor/api/

sellercontact/customerContactlist

PARAMETERS : GET page = Page number limit =Number of items

NORMAL RESPONSE:

{ "status": "success", "message": "", "data": { "sellercontacts": { "14": { "id": "138",(last message id customer/seller) "message": "hello customer how may I help you ", (last message) "seller_id": "14",(ID of seller) "customer_id": "20",(ID of a Customer) "contact_from": "1",(Contact Form) "customer_name": "seller demo1",(seller name) "customer_email": "[email protected]", (Email of A customer) "date_added": "06/07/2018"(Date Of customer) } }, "config_contactseller": "1",(Contact seller status base of admin) "pagination": { "total": "1",(Number of page) "page": 1,(Current page) "limit": 10(Number of item like product per page) }, "results": "Showing 1 to 1 of 1 (1 Pages)"(Pagination Result) } }

ERROR RESPONSE:-

status = error (API) message = Permission Error. Check API credentials status = error (Login) message = Seller Not Logged In status = error ( Is Seller) message = Seller Not Approved status = error (License) message = Invalid License

37. Customer enquiryreply list from seller to customer

REQUEST URL:-

OPENCART 3X:-

<BASE_BASE_URL>/ index.php?route=extension/account/purpletree_multivendor/api/

sellercontact/reply&id=2

OPENCART 2X:-

<BASE_BASE_URL>/ index.php?route=account/purpletree_multivendor/api / sellercontact/reply&id=2

PARAMETERS:

GET id:last message id with customer NORMAL RESPONSE:

{ "data": { "contact_mode": "1", "customer_id": "20", "customer": "14", "sellercontacts": [ { "contact_from": "0",(reply person like 0 is seller or 1 customer) "customer_id": "20",(Id of Customer) "customer_name": "Calvin Carter",(Name of Customer ) "customer_email": "[email protected]",(Customer Email) "customer_messages": "hello seller…."(Messagesof customer to seller) "date_added": "06/07/2018"(Date of Added) }, { "contact_from": "1", "customer_id": "20", "customer_name": "seller demo1", "customer_email": "[email protected]", "customer_messages": "badyaaaaaaaaaaaaaa", "date_added": "06/07/2018" } ] } }

ERROR RESPONSE:-

status = error (API) message = Permission Error. Check API credentials status = error (Login) message = Seller Not Logged In

status = error ( Is Seller) message = Seller Not Approved status = error (License) message = Invalid License status = error message = No Data

38. Customer enquiry/reply list from customer to seller

REQUEST URL:

OPENCART3X:-

<BASE_BASE_URL>/ index.php?route=extension/account/purpletree_multivendor/api/sellercontact/

customerReply&seller_id=1

OPENCART 2X:-

<BASE_BASE_URL>/ index.php?route=account/purpletree_multivendor/api / sellercontact/

customerReply&seller_id=1

PARAMETERS:

GET: seller_id : Seller Id=1

NORMAL RESPONSE:

{

"data": { "loggedin": "1", "contact_mode": "1", "seller_id": "1", (seller id) "sellercontacts": [ { "contact_from": "0", (reply person like 0 is seller or 1 customer) "customer_id": "2", "customer_name": "demo customer",(seller name) "customer_email": "[email protected]",(Email of Customer) "customer_messages": "hello seller", (Messages of customer) "date_added": "29/06/2018” (communication start date) },……….. ]

}, "message": "", "status": "success"

}

ERROR RESPONSE:-

status = error (API) message = Permission Error. Check API credentials status = error (Login) message = Seller Not Logged In status = error ( Is Seller) message = Seller Not Approved status = error (License) message = Invalid License status = error message = No Data

39. List of seller commissions

REQUEST URL:

OPENCART 2X:-

<BASE_BASE_URL>/index.php?route=extension/account/purpletree_multivendor/api/sellercommission

OPENCART 2X:-

<BASE_BASE_URL>/ index.php?route=account/purpletree_multivendor/api /sellercommission

GET PARAMETERS:- filter_date_from – Seller Commission Date From filter_date_to Seller Commission Date To page- page number limit – No of products

NORMAL RESPONSE:

{ "status": "success",

"message": "", "data": { "seller_commissions": [(Commission of seller) { "order_id": "38",(Order ID) "product_name": "Palm Treo Pro", (Name of Product) "price": "$559.98",(Total Amount Charge by admin to Seller) "commission": "$0.00",(Amount of commission) "created_at": "06/07/2018"(Date of create commission) },……… ], "pagination": { "total": "8",(Number of pages) "page": 1,(Current page) "limit": "2"(Number of item like product per page). }, "results": "Showing 1 to 2 of 8 (4 Pages)",(Number of page (Results of Pagination)) "filter_date_from": "2018-06-06",(Filter date from) "filter_date_to": "2018-07-06"(FilterDate To) } }

ERROR RESPONSE:-

Is Mobile Api Call Status: error Message: permission Error Customer Login Status: error Message: Not Customer Login Seller: Status: error Message: Not Seller found Validate Seller: Status: error Message:Seller Not Approve

API FOR CUSTOMER DATA

1. Customer/Seller Registration

REQUEST URL:

OPENCART3X:-

<BASE_BASE_URL>/ index.php?route=extension/account/purpletree_multivendor/api/register OPENCART 2X:-

<BASE_BASE_URL>/ index.php?route=account/purpletree_multivendor/api /register POST Request: - To Become Seller send these 2 parameters along with other post parameters which are

required for registering as customer according to Opencart.

become_seller : 1

seller_storename: Unique Storename.

NORMAL RESPONSE:

{ "status": "success", "message": "Customer Register Successfully" } Or { "status": "success", "message": "Seller Register Successfully" }

ERROR RESPONSE:-

Is Mobile Api Call Status: error (API) Message: permission Error

Warning Status: error Message: Warning: E-Mail Address is already registered!

Firstname Status: error Message:First Name must be between 1 and 32 characters!

Lastname Status: error Message:Last Name must be between 1 and 32 characters!

Email Status: error Message:E-Mail Address does not appear to be valid!

Telephone Status: error Message:Telephone must be between 3 and 32 characters!

custom_field Status: error Message:%s required!

Password Status: error Message:Password must be between 4 and 20 characters!

seller_store Status: error Message:

Confirm Status: error Message:Warning: You must agree to the %s!

2. Become Seller for logged in Customer

REQUEST URL:

OPENCART3X:-

<BASE_BASE_URL>/

index.php?route=extension/account/purpletree_multivendor/api/sellerstore/becomeseller

OPENCART 2X:-

<BASE_BASE_URL>/ index.php?route=account/purpletree_multivendor/api /sellerstore/becomeseller

POST Request: -

become_seller : 1

seller_storename: Unique Storename.

NORMAL RESPONSE:

{ "status": "success", “store_id”: 1(Generated Store id) "message": "Success: Congratulation you are now a seller!" } Or { "status": "success", “store_id”: 1(Generated Store id) "message": " Waiting for seller approval" }

ERROR RESPONSE:-

Is Mobile Api Call Status: error (API) Message: permission Error

isLogged: Status: error Message: Not Customer Login

Warning Status: error Message: Store name must be between 5 and 50 characters! Error Status: error Message: Something went wrong. Seller not created.

3. Check Seller Status for logged in Customer

REQUEST URL:

OPENCART3X:-

<BASE_BASE_URL>/ index.php?route=extension/account/purpletree_multivendor/api/login

OPENCART 2X:-

<BASE_BASE_URL>/ index.php?route=account/purpletree_multivendor/api /login

NORMAL RESPONSE:

Registered and approved seller

{ "status": "success", “seller”: 1 "message": " Show Seller menu" } Or Registered but seller is waiting for approval from admin { "status": "success", “seller”: 2 "message": " Waiting for seller approval" } Or Not as seller but only customer { "status": "success", “seller”: 0 "message": " Become a Seller" }

ERROR RESPONSE:-

Is Mobile Api Call Status: error (API) Message: permission Error

notLogged: Status: error Seller:3 Message: Seller Not Logged In

Status: error Message: Purpletree Multivendor Disabled

4. Get shopping cart products for customer

REQUEST URL:

OPENCART3X:-

<BASE_BASE_URL>/ index.php?route=extension/account/purpletree_multivendor/api/cart

OPENCART 2X:-

<BASE_BASE_URL>/ index.php?route=account/purpletree_multivendor/api /cart

NORMAL RESPONSE:-

{ "attention": "", "message": "", "data": { "weight": "0.13kg",(Weight of Products) "products": [ {

"cart_id": "6",(Id of Cart) "thumb": "", "name": "Product1",(Name Of Product in cart 1) "model": "Product 2",(Name Of Product in cart 2) "option": [],(Product option). "recurring": "", "quantity": "1",(Quantity of products in cart) "stock": true,(The product in your cart is available or not) "reward": "",(Rewards with Products) "price": "$279.99",(Total Price of Products) "total": "$279.99",(Total Amount of Products in cart)

} ], "totals": [ { "title": "Sub-Total", "text": "$279.99" }, { "title": "Total", "text": "$279.99" } ]

} }

ERROR RESPONSE:-

Status: success Message:Success: You have added <a href="%s">%s</a> to your <a href="%s">shopping cart</a>!

Is Mobile Api Call Status: error (API) Message: permission Error

Stock warning Status: error Message: Products marked with *** are not available in the desired quantity or not in stock! Maximum order amount Status: error Message: Maximum order amount for %s is %s! Minimum order amount Status: error Message:Minimum order amount for %s is %s! shopping cart Status: error Message:Your shopping cart is empty!

5. Get customer orders listing

REQUEST URL:

OPENCART3X:-

<BASE_BASE_URL>/extension/account/purpletree_multivendor/api/order

OPENCART 2X:-

<BASE_BASE_URL>/ index.php?route=account/purpletree_multivendor/api /order

PARAMETERS : GET page = Page number limit =Number of items NORMAL RESPONSE:

{

"data": { "orders": [ { "order_id": "3",(Id of Order) "name": "demo ", (Name Of customer) "status": { "2": { "order_status": "Pending",(Status like Dispatched, pending , complete) "seller_id": "2",(Id of Seller) "product": [

{ "product_id": "262", (Id of Seller) "product_name": "Product1” (Name of Product) } ] } }, "date_added": "26/06/2018", (Date of order the product) "products": 1,(Total Products) "total": "$284.99", (Total amount of PRoducts) } ], "pagination": "",

"results": "Showing 1 to 1 of 1 (1 Pages)",(Number of page (Results of Pagination)) "continue": "<BASE_URL>index.php?route=account/account" (Link Of pages) } }

ERROR RESPONSE:-

Mobile Api Call Status: error Message: permission Error Customer Login Status: error Message: Not Customer Login

6. Get customer order details

REQUEST URL:

OPENCART3X:-

<BASE_BASE_URL>/ index.php?route=extension/account/purpletree_multivendor/api/ order/info

OPENCART 2X:-

<BASE_BASE_URL>/ index.php?route=account/purpletree_multivendor/api /order/info

PARAMETERS: GET order_id – order Id

NORMAL RESPONSE:

{ "success": "", "data": {

"invoice_no": "", (Invoice No.) "order_id": "3", (Order No.) "date_added": "26/06/2018", (Date of added) "payment_address": "demo demo<br />demo<br />demo<br />dmeo<br />demo, Armed Forces Canada 345345<br />United States", (Address of payment ) "payment_method": "Cash On Delivery", (Methods of payment like Net banking etc) "shipping_address": "demo demo<br />demo<br />demo<br />dmeo<br />demo, Armed Forces Canada 345345<br />United States", (Address of shipping) "shipping_method": "Flat Shipping Rate", (Method of shipping) "products": [ { "name": "Product1", "model": "Product 2", "option": [ { "name": "Select", "value": "Red" } ], "quantity": "1", "price": "$279.99", "total": "$279.99", " } ], "totals": [ { "title": "Sub-Total", "text": "$279.99" }, { "title": "Flat Shipping Rate", "text": "$5.00" }, { "title": "Total", "text": "$284.99" } ], "comment": "", "histories": [ { "date_added": "26/06/2018", "product_name": [ { "product_id": "262", "product_name": "Product1"

} ], "status": "Pending", "comment": "" } ], " } }

Error response: Is Mobile Api Call Status: error Message: permission Error Customer Login Status: error Message: Not Customer Login

7. Get product details with seller information

REQUEST URL:

OPENCART3X:-

<BASE_BASE_URL>/ index.php?route=extension/account/purpletree_multivendor/api/ product

OPENCART 2X:-

<BASE_BASE_URL>/ index.php?route=account/purpletree_multivendor/api /product

PARAMETERS: GET product_id – Product Id

NORMAL RESPONSE:

{ "data": { "module_purpletree_multivendor_allow_live_chat": "1", (Live chat statu purpletree multivendor setting admin side)

"store_live_chat_enable": "1", (Store live chat status) "store_live_chat_code": "<!--Start of Tawk.to Script-->\r\n<script type=\"text/javascript\">\r\nvar Tawk_API=Tawk_API||{}, Tawk_LoadStart=new Date();\r\n(function(){\r\nvar s1=document.createElement(\"script\"),s0=document.getElementsByTagName(\"script\")[0];\r\ns1.async=true;\r\ns1.src='https://embed.tawk.to/5b34735feba8cd3125e34039/default';\r\ns1

.charset='UTF-8';\r\ns1.setAttribute('crossorigin','*');\r\ns0.parentNode.insertBefore(s1,s0);\r\n})();\r\n</script>\r\n<!--End of Tawk.to Script-->", (Store live chat code script)

"seller_review_status": "1",(Seller Review Status) "seller_detail": {(Seller Detail) "seller_name": "ptsdemodemo",(Seller Name) "store_id": "2", (Seller Store Id) "seller_rating": "0", (Seller rating) "seller_count": "0",(Seller rating count) }, "tab_review": "tab_review", "product_id": 1003,(ID of product) "manufacturer": "Apple",(Brand Name) "manufacturer_id": "8",(Brand Name ID) "model": "demo Product",(Model of Product ) "reward": "200", (Rewards on products) "points": "11", "description": "", "stock": "text_instock", "popup": "<BASE_URL>image/cache/catalog/9253Chrysanthemum-500x500.jpg", "thumb": "<BASE_URL>image/cache/catalog/9253Chrysanthemum-228x228.jpg", "images": [ { "popup": "<BASE_URL>image/cache/catalog/9253Desert-500x500.jpg", "thumb": "<BASE_URL>image/cache/catalog/9253Desert-74x74.jpg" } ], "price": "$444.00", "special": false, "tax": "$444.00", "options": [ { "product_option_id": "873", "product_option_value": [ { "product_option_value_id": "185", "option_value_id": "44", "name": "Checkbox 3", "image": null, "price": "$77.00", "price_prefix": "+" } ], "option_id": "2", "name": "Checkbox", "type": "checkbox",

"value": "", "required": "1" } ], "minimum": "1", "review_status": "1", "review_guest": true, "customer_name": "demo 2&nbsp;demo", "reviews": "text_reviews", "rating": 0, "captcha": "", "attribute_groups": [ { "attribute_group_id": "3", "name": "Memory", "attribute": [ { "attribute_id": "4", "name": "test 1", "text": "text 3" } ] } ], "products": [ { "product_id": "30",(ID of Product) "thumb": "<BASE_URL>image/cache/catalog/demo/canon_eos_5d_1-200x200.jpg", "name": "Canon EOS 5D",(Name of Product) "description": "Canon's press material for the EOS 5D states that it 'defines (a) new D-SLR category', while we're n..", (Description of products) "price": "$100.00",(Price Of products) "special": false, "tax": "$100.00",(Tax On products) "minimum": "1",(Minimum Quantity of Products) "rating": 0,(Rating On Products like 1 star, 4 star, 5 star) "href }, { "product_id": "2001", "thumb": "<BASE_URL>image/cache/placeholder-200x200.png", "name": "demo 2", "description": "Description Demo 2..", "price": "$100.00", "special": false, "tax": "$100.00", "minimum": "1",

"rating": 0, } ], "recurrings": [] } }

ERROR RESPONSE:-

Is Mobile Api Call Status: error Message: permission Error Product Information Status: error Message: Product Information not found!