User Tools

Site Tools


udropship:umarketplace:m2:vendor-info-api

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
Next revision Both sides next revision
udropship:umarketplace:m2:vendor-info-api [2019/10/23 18:57]
wtsergo created
udropship:umarketplace:m2:vendor-info-api [2019/11/01 12:00]
wtsergo [Get list of Vendors (possible to filter)]
Line 4: Line 4:
  
 In order to get list of vendors perform ///V1/udapi/vendors// GET API call. It expect ''searchCriteria'' as parameter. More details on how to construct the filter check  can be found here [[http://devdocs.magento.com/guides/v2.1/rest/performing-searches.html]] In order to get list of vendors perform ///V1/udapi/vendors// GET API call. It expect ''searchCriteria'' as parameter. More details on how to construct the filter check  can be found here [[http://devdocs.magento.com/guides/v2.1/rest/performing-searches.html]]
 +
 +''
 +Example:
 +''
 +<code>
 +GET http://magento233.loc/rest/V1/udapi/vendors?searchCriteria=[]
 +</code>
 +''
 +RESPONSE
 +''
 +<code>
 +{
 +    "items": [
 +        {
 +            "vendor_id": 1,
 +            "vendor_name": "vendor1",
 +            "vendor_attn": "",
 +            "email": "testv1@example.com",
 +            "telephone": "4025555555",
 +            "fax": null,
 +            "street_full": "1234 Test",
 +            "street1": "1234 Test",
 +            "street2": "",
 +            "city": "los angeles",
 +            "zip": "90210",
 +            "country_id": "US",
 +            "region_id": "12",
 +            "region": null,
 +            "region_code": "CA",
 +            "billing_use_shipping": "1",
 +            "billing_telephone": "4025555555",
 +            "billing_fax": null,
 +            "billing_street_full": "",
 +            "billing_street1": "",
 +            "billing_street2": "",
 +            "billing_city": "",
 +            "billing_zip": null,
 +            "billing_country_id": "",
 +            "billing_region_id": null,
 +            "billing_region": null,
 +            "billing_region_code": null,
 +            "status": 0,
 +            "carrier_code": "flatrate",
 +            "url_key": "vendor1",
 +            "created_at": null,
 +            "vacation_mode": 0,
 +            "vacation_end": null,
 +            "vacation_message": null,
 +            "account_type": null,
 +            "is_featured": 0,
 +            "rating_summary": null
 +        },
 +        {
 +            "vendor_id": 2,
 +            "vendor_name": "vendor2",
 +            "vendor_attn": "",
 +            "email": "testv2@example.com",
 +            "telephone": "4025555555",
 +            "fax": null,
 +            "street_full": "14 elmwood st ne",
 +            "street1": "14 elmwood st ne",
 +            "street2": "",
 +            "city": "rome",
 +            "zip": "30161",
 +            "country_id": "US",
 +            "region_id": "19",
 +            "region": null,
 +            "region_code": "GA",
 +            "billing_use_shipping": "1",
 +            "billing_telephone": "4025555555",
 +            "billing_fax": null,
 +            "billing_street_full": "",
 +            "billing_street1": "",
 +            "billing_street2": "",
 +            "billing_city": "",
 +            "billing_zip": null,
 +            "billing_country_id": "",
 +            "billing_region_id": null,
 +            "billing_region": null,
 +            "billing_region_code": null,
 +            "status": 0,
 +            "carrier_code": "flatrate",
 +            "url_key": "vendor2",
 +            "created_at": null,
 +            "vacation_mode": 0,
 +            "vacation_end": null,
 +            "vacation_message": null,
 +            "account_type": null,
 +            "is_featured": 0,
 +            "rating_summary": null
 +        }
 +    ],
 +    "search_criteria": {
 +        "filter_groups": []
 +    },
 +    "total_count": 2
 +}
 +</code>
  
 ===== Get Single Vendor Info ===== ===== Get Single Vendor Info =====
  
 In order to get single Vendor information perform ///V1/udapi/vendor/info/:id// GET API call. :id parameter could be either vendor entity id or his name. In order to get single Vendor information perform ///V1/udapi/vendor/info/:id// GET API call. :id parameter could be either vendor entity id or his name.
 +
 +''
 +Example:
 +''
 +<code>
 +GET http://magento233.loc/rest/V1/udapi/vendor/info/1
 +</code>
 +''
 +RESPONSE
 +''
 +<code>
 +{
 +    "vendor_id": 1,
 +    "vendor_name": "vendor1",
 +    "vendor_attn": "",
 +    "email": "testv1@example.com",
 +    "telephone": "4025555555",
 +    "fax": null,
 +    "street_full": "1234 Test",
 +    "street1": "1234 Test",
 +    "street2": "",
 +    "city": "los angeles",
 +    "zip": "90210",
 +    "country_id": "US",
 +    "region_id": "12",
 +    "region": null,
 +    "region_code": "CA",
 +    "billing_use_shipping": "1",
 +    "billing_telephone": "4025555555",
 +    "billing_fax": null,
 +    "billing_street_full": "",
 +    "billing_street1": "",
 +    "billing_street2": "",
 +    "billing_city": "",
 +    "billing_zip": null,
 +    "billing_country_id": "",
 +    "billing_region_id": null,
 +    "billing_region": null,
 +    "billing_region_code": null,
 +    "status": 0,
 +    "carrier_code": "flatrate",
 +    "url_key": "vendor1",
 +    "created_at": null,
 +    "vacation_mode": 0,
 +    "vacation_end": null,
 +    "vacation_message": null,
 +    "account_type": null,
 +    "is_featured": 0,
 +    "rating_summary": null
 +}
 +</code>
 +
  
 ===== Get list of Vendor Products (possible to filter) ===== ===== Get list of Vendor Products (possible to filter) =====
  
 In order to get list of vendors products perform ///V1/udapi/products/:id// GET API call. :id parameter could be either vendor entity id or his name. It expect ''searchCriteria'' as parameter. More details on how to construct the filter check  can be found here [[http://devdocs.magento.com/guides/v2.1/rest/performing-searches.html]] In order to get list of vendors products perform ///V1/udapi/products/:id// GET API call. :id parameter could be either vendor entity id or his name. It expect ''searchCriteria'' as parameter. More details on how to construct the filter check  can be found here [[http://devdocs.magento.com/guides/v2.1/rest/performing-searches.html]]
 +
 +===== Get vendor reviews (possible to filter) =====
 +
 +In order to get vendor reviews perform ///V1/udapi/vendor/reviews/:id// GET API call. :id parameter could be either vendor entity id or his name. It expect ''searchCriteria'' as parameter. More details on how to construct the filter check  can be found here [[http://devdocs.magento.com/guides/v2.1/rest/performing-searches.html]]
 +
 +''
 +Example:
 +''
 +<code>
 +GET http://magento.loc/rest/V1/udapi/vendor/reviews/1?searchCriteria=[]
 +</code>
 +''
 +RESPONSE
 +''
 +<code>
 +{
 +    "items": [
 +        {
 +            "detail": "000000003 v1 desc",
 +            "nickname": "Veronica",
 +            "created_at": "2019-11-01 07:22:19",
 +            "rating_votes": [
 +                {
 +                    "rating_code": "Shipping and handling charges",
 +                    "is_aggregate": 1,
 +                    "percent": 60,
 +                    "value": 3
 +                },
 +                {
 +                    "rating_code": "Communication",
 +                    "is_aggregate": 1,
 +                    "percent": 80,
 +                    "value": 4
 +                },
 +                {
 +                    "rating_code": "Shipping time",
 +                    "is_aggregate": 1,
 +                    "percent": 80,
 +                    "value": 4
 +                },
 +                {
 +                    "rating_code": "Was delivery on time?",
 +                    "is_aggregate": 0,
 +                    "percent": 0,
 +                    "value": 0
 +                },
 +                {
 +                    "rating_code": "Merchandise in good condition?",
 +                    "is_aggregate": 0,
 +                    "percent": 20,
 +                    "value": 1
 +                }
 +            ]
 +        },
 +        {
 +            "detail": "000000006 v1 desc",
 +            "nickname": "Veronica",
 +            "created_at": "2019-11-01 07:22:53",
 +            "rating_votes": [
 +                {
 +                    "rating_code": "Shipping time",
 +                    "is_aggregate": 1,
 +                    "percent": 100,
 +                    "value": 5
 +                },
 +                {
 +                    "rating_code": "Shipping and handling charges",
 +                    "is_aggregate": 1,
 +                    "percent": 100,
 +                    "value": 5
 +                },
 +                {
 +                    "rating_code": "Communication",
 +                    "is_aggregate": 1,
 +                    "percent": 80,
 +                    "value": 4
 +                },
 +                {
 +                    "rating_code": "Was delivery on time?",
 +                    "is_aggregate": 0,
 +                    "percent": 20,
 +                    "value": 1
 +                },
 +                {
 +                    "rating_code": "Merchandise in good condition?",
 +                    "is_aggregate": 0,
 +                    "percent": 20,
 +                    "value": 1
 +                }
 +            ]
 +        }
 +    ]
 +}
 +</code>
 +
  
 ===== Get product offers from multiple vendors ===== ===== Get product offers from multiple vendors =====
Line 17: Line 262:
 In order to get offers from multiple vendors perform ///V1/udapi/vendor/product-offers/:sku// GET API call. :sku parameter should be product's sku. In order to get offers from multiple vendors perform ///V1/udapi/vendor/product-offers/:sku// GET API call. :sku parameter should be product's sku.
  
-===== Get product questions to vendors =====+'' 
 +Example: 
 +'' 
 +<code> 
 +GET http://magento.loc/rest/V1/udapi/vendor/product-offers/24-WB04 
 +</code> 
 +'' 
 +RESPONSE 
 +'' 
 +<code> 
 +
 +    "items":
 +        { 
 +            "vendor_product_id": 14, 
 +            "vendor_id": 1, 
 +            "product_id": 14, 
 +            "priority": 1, 
 +            "vendor_sku": "v1-24-WB04", 
 +            "vendor_cost": null, 
 +            "stock_qty": 22, 
 +            "backorders": -1, 
 +            "status": 1, 
 +            "shipping_price": null, 
 +            "vendor_title": null, 
 +            "state": "new", 
 +            "state_descr": null, 
 +            "freeshipping": 0, 
 +            "vendor_price": 46.77, 
 +            "special_price": null, 
 +            "special_from_date": null, 
 +            "special_to_date": null 
 +        }, 
 +        { 
 +            "vendor_product_id": 2061, 
 +            "vendor_id": 2, 
 +            "product_id": 14, 
 +            "priority": 2, 
 +            "vendor_sku": "v2-24-WB04", 
 +            "vendor_cost": null, 
 +            "stock_qty": 33, 
 +            "backorders": -1, 
 +            "status": 1, 
 +            "shipping_price": null, 
 +            "vendor_title": null, 
 +            "state": "new", 
 +            "state_descr": null, 
 +            "freeshipping": 0, 
 +            "vendor_price": 49.27, 
 +            "special_price": null, 
 +            "special_from_date": null, 
 +            "special_to_date": null 
 +        } 
 +    ], 
 +    "search_criteria": null, 
 +    "total_count":
 +
 +</code> 
 + 
 + 
 +===== Get product questions to vendors (possible to filter) ===== 
 + 
 +In order to get product questions to vendors perform ///V1/udapi/vendor/product-questions/:sku// GET API call. :sku parameter should be product's sku. It expect ''searchCriteria'' as parameter. More details on how to construct the filter check  can be found here [[http://devdocs.magento.com/guides/v2.1/rest/performing-searches.html]] 
 + 
 +'' 
 +Example: 
 +'' 
 +<code> 
 +GET http://magento233.loc/rest/V1/udapi/vendor/product-questions/24-WB07?searchCriteria=[] 
 +</code> 
 +'' 
 +RESPONSE 
 +'' 
 +<code> 
 +
 +    "items":
 +        { 
 +            "question_text": "question 1", 
 +            "answer_text": "answer 1", 
 +            "customer_name": "test 1", 
 +            "vendor_id": 1, 
 +            "vendor_name": "vendor1", 
 +            "visibility": 1, 
 +            "question_date": "2019-11-01 09:32:18", 
 +            "answer_date": "2019-11-01 09:36:47" 
 +        }, 
 +        { 
 +            "question_text": "question 2", 
 +            "answer_text": "answer 2", 
 +            "customer_name": "test 2", 
 +            "vendor_id": 2, 
 +            "vendor_name": "vendor2", 
 +            "visibility": 1, 
 +            "question_date": "2019-11-01 09:35:34", 
 +            "answer_date": "2019-11-01 09:36:30" 
 +        }, 
 +        { 
 +            "question_text": "question 3", 
 +            "answer_text": "answer 3", 
 +            "customer_name": "test 3", 
 +            "vendor_id": 1, 
 +            "vendor_name": "vendor1", 
 +            "visibility": 1, 
 +            "question_date": "2019-11-01 09:35:54", 
 +            "answer_date": "2019-11-01 09:36:38" 
 +        } 
 +    ] 
 +
 +</code>
  
-In order to get product questions to vendorsperform ///V1/udapi/vendor/product-questions/:sku// GET API call. :sku parameter should be product's sku. 
  
 ===== Ask product question to vendor ===== ===== Ask product question to vendor =====
Line 25: Line 376:
 In order to create new question to vendors perform ///V1/udapi/vendor/product-question-ask/:id/:sku// POST API call.  :id parameter could be either vendor entity id or his name. :sku parameter should be product's sku. Other parameters are: name - customer name, question - question text, visibility - 0 / Private or 1 / Public In order to create new question to vendors perform ///V1/udapi/vendor/product-question-ask/:id/:sku// POST API call.  :id parameter could be either vendor entity id or his name. :sku parameter should be product's sku. Other parameters are: name - customer name, question - question text, visibility - 0 / Private or 1 / Public
  
 +''
 +Example:
 +''
 +<code>
 +POST http://magento233.loc/rest/V1/udapi/vendor/product-question-ask/1/24-WB07
 +{"email":"testapi@example.com","name":"api customer","question":"api question 1","visibility":1}
 +</code>
 +''
 +RESPONSE
 +''
 +<code>
 +true
 +</code>
  
udropship/umarketplace/m2/vendor-info-api.txt · by wtsergo