Both sides previous revision
Previous revision
Next revision
|
Previous revision
|
udropship:umarketplace:m2:vendor-api [2019/10/23 19:17] wtsergo [Get list of Vendor Purchase Orders (possible to filter)] |
udropship:umarketplace:m2:vendor-api [2022/04/26 07:14] (current) wtsergo [Perform Inventory update] |
| |
'' | '' |
Example:\\ | Example: |
POST http://magento222.loc/index.php/rest/V1/integration/admin/token\\ | '' |
{"username":"<vendor email>","password":"<vendor password>"}\\ | <code> |
\\ | POST http://magento.loc/index.php/rest/V1/integration/admin/token |
RESPONSE\\ | {"username":"<vendor email>","password":"<vendor password>"} |
| </code> |
| '' |
| RESPONSE |
"xxxxxxxxx 32 bit token xxxxxxxxx" | "xxxxxxxxx 32 bit token xxxxxxxxx" |
| |
'' | '' |
| |
| |
'' | '' |
Example:\\ | Example: |
GET http://magento222.loc/index.php/rest/V1/udpos?searchCriteria%5Bfilter_groups%5D%5B0%5D%5Bfilters%5D%5B0%5D%5Bfield%5D=created_at&searchCriteria%5Bfilter_groups%5D%5B0%5D%5Bfilters%5D%5B0%5D%5Bvalue%5D=2016-07-01+00%3A00%3A00&searchCriteria%5Bfilter_groups%5D%5B0%5D%5Bfilters%5D%5B0%5D%5Bcondition_type%5D=gt\\ | '' |
\\ | <code> |
| GET http://magento.loc/index.php/rest/V1/udpos?searchCriteria[filter_groups][0][filters][0][field]=created_at&searchCriteria[filter_groups][0][filters][0][value]=2016-07-01+00:00:00&searchCriteria[filter_groups][0][filters][0][condition_type]=gt</code> |
| '' |
RESPONSE | RESPONSE |
'' | '' |
| |
'' | '' |
Example:\\ | Example: |
GET http://magento222.loc/index.php/rest/V1/udpo/000000012-1\\ | |
\\ | |
RESPONSE\\ | |
{"billing_address_id":14,"created_at":"2018-03-02 18:33:51","customer_id":2,"email_sent":0,"entity_id":1,"increment_id":"000000012-1","order_id":12,"udropship_status":9,"shipping_address_id":13,"store_id":1,"total_qty":4,"total_weight":0,"updated_at":"2018-03-12 09:05:41","items":[{"entity_id":1,"name":"Push It Messenger Bag","parent_id":1,"price":56.81,"product_id":14,"row_total":170.43,"sku":"24-WB04","order_item_id":12,"qty":3},{"entity_id":2,"name":"Fusion Backpack","parent_id":1,"price":69.98,"product_id":6,"row_total":69.98,"sku":"24-MB02","order_item_id":13,"qty":1}],"comments":[{"is_customer_notified":null,"parent_id":1,"comment":"[vendor1 changed PO status from 'Ready to Ship' to 'Acknowledged']","is_visible_on_front":null,"created_at":"2018-03-12 09:05:41","entity_id":3},{"is_customer_notified":null,"parent_id":1,"comment":"vendor1: Test API Comment with status change","is_visible_on_front":null,"created_at":"2018-03-12 09:05:41","entity_id":4},{"is_customer_notified":null,"parent_id":1,"comment":"vendor1: Test API Comment","is_visible_on_front":null,"created_at":"2018-03-12 09:05:16","entity_id":2},{"is_customer_notified":null,"parent_id":1,"comment":"[vendor1 changed PO status from 'Pending' to 'Ready to Ship']","is_visible_on_front":null,"created_at":"2018-03-02 18:34:08","entity_id":1}]} | |
'' | '' |
| <code> |
| GET http://magento.loc/index.php/rest/V1/udpo/000000012-1 |
| </code> |
| '' |
| RESPONSE |
| '' |
| <code> |
| { |
| "billing_address_id": 14, |
| "created_at": "2018-03-02 18:33:51", |
| "customer_id": 2, |
| "email_sent": 0, |
| "entity_id": 1, |
| "increment_id": "000000012-1", |
| "order_id": 12, |
| "udropship_status": 9, |
| "shipping_address_id": 13, |
| "store_id": 1, |
| "total_qty": 4, |
| "total_weight": 0, |
| "updated_at": "2018-03-12 09:05:41", |
| "items": [{ |
| "entity_id": 1, |
| "name": "Push It Messenger Bag", |
| "parent_id": 1, |
| "price": 56.81, |
| "product_id": 14, |
| "row_total": 170.43, |
| "sku": "24-WB04", |
| "order_item_id": 12, |
| "qty": 3 |
| }, { |
| "entity_id": 2, |
| "name": "Fusion Backpack", |
| "parent_id": 1, |
| "price": 69.98, |
| "product_id": 6, |
| "row_total": 69.98, |
| "sku": "24-MB02", |
| "order_item_id": 13, |
| "qty": 1 |
| }], |
| "comments": [{ |
| "is_customer_notified": null, |
| "parent_id": 1, |
| "comment": "[vendor1 changed PO status from 'Ready to Ship' to 'Acknowledged']", |
| "is_visible_on_front": null, |
| "created_at": "2018-03-12 09:05:41", |
| "entity_id": 3 |
| }, { |
| "is_customer_notified": null, |
| "parent_id": 1, |
| "comment": "vendor1: Test API Comment with status change", |
| "is_visible_on_front": null, |
| "created_at": "2018-03-12 09:05:41", |
| "entity_id": 4 |
| }, { |
| "is_customer_notified": null, |
| "parent_id": 1, |
| "comment": "vendor1: Test API Comment", |
| "is_visible_on_front": null, |
| "created_at": "2018-03-12 09:05:16", |
| "entity_id": 2 |
| }, { |
| "is_customer_notified": null, |
| "parent_id": 1, |
| "comment": "[vendor1 changed PO status from 'Pending' to 'Ready to Ship']", |
| "is_visible_on_front": null, |
| "created_at": "2018-03-02 18:34:08", |
| "entity_id": 1 |
| }] |
| } |
| </code> |
| |
| |
| |
'' | '' |
Example:\\ | Example: |
GET http://magento222.loc/index.php/rest/V1/udpo/000000012-1/comments\\ | |
\\ | |
RESPONSE\\ | |
{"items":[{"is_customer_notified":null,"parent_id":1,"comment":"[vendor1 changed PO status from 'Pending' to 'Ready to Ship']","is_visible_on_front":null,"created_at":"2018-03-02 18:34:08","entity_id":1},{"is_customer_notified":null,"parent_id":1,"comment":"vendor1: Test API Comment","is_visible_on_front":null,"created_at":"2018-03-12 09:05:16","entity_id":2},{"is_customer_notified":null,"parent_id":1,"comment":"[vendor1 changed PO status from 'Ready to Ship' to 'Acknowledged']","is_visible_on_front":null,"created_at":"2018-03-12 09:05:41","entity_id":3},{"is_customer_notified":null,"parent_id":1,"comment":"vendor1: Test API Comment with status change","is_visible_on_front":null,"created_at":"2018-03-12 09:05:41","entity_id":4}],"search_criteria":{"filter_groups":[{"filters":[{"field":"parent_id","value":"1","condition_type":"eq"}]}]},"total_count":4} | |
'' | '' |
| <code> |
| GET http://magento.loc/index.php/rest/V1/udpo/000000012-1/comments |
| </code> |
| '' |
| RESPONSE |
| '' |
| <code>{ |
| "items": [{ |
| "is_customer_notified": null, |
| "parent_id": 1, |
| "comment": "[vendor1 changed PO status from 'Pending' to 'Ready to Ship']", |
| "is_visible_on_front": null, |
| "created_at": "2018-03-02 18:34:08", |
| "entity_id": 1 |
| }, { |
| "is_customer_notified": null, |
| "parent_id": 1, |
| "comment": "vendor1: Test API Comment", |
| "is_visible_on_front": null, |
| "created_at": "2018-03-12 09:05:16", |
| "entity_id": 2 |
| }, { |
| "is_customer_notified": null, |
| "parent_id": 1, |
| "comment": "[vendor1 changed PO status from 'Ready to Ship' to 'Acknowledged']", |
| "is_visible_on_front": null, |
| "created_at": "2018-03-12 09:05:41", |
| "entity_id": 3 |
| }, { |
| "is_customer_notified": null, |
| "parent_id": 1, |
| "comment": "vendor1: Test API Comment with status change", |
| "is_visible_on_front": null, |
| "created_at": "2018-03-12 09:05:41", |
| "entity_id": 4 |
| }], |
| "search_criteria": { |
| "filter_groups": [{ |
| "filters": [{ |
| "field": "parent_id", |
| "value": "1", |
| "condition_type": "eq" |
| }] |
| }] |
| }, |
| "total_count": 4 |
| } |
| </code> |
| |
| |
'' | '' |
Example:\\ | Example:\\ |
POST http://magento222.loc/index.php/rest/V1/udpo/000000012-1/addComment\\ | POST http://magento.loc/index.php/rest/V1/udpo/000000012-1/addComment\\ |
{"comment":"Test API Comment","status":9}\\ | {"comment":"Test API Comment","status":9}\\ |
\\ | \\ |
'' | '' |
Example:\\ | Example:\\ |
POST http://magento222.loc/index.php/rest/V1/udpo/000000012-1/addTrack\\ | POST http://magento.loc/index.php/rest/V1/udpo/000000012-1/addTrack\\ |
{"carrier":"ups","title":"UPS","trackNumber":"UPS12345"}\\ | {"carrier":"ups","title":"UPS","trackNumber":"UPS12345"}\\ |
\\ | \\ |
'' | '' |
Example:\\ | Example:\\ |
POST http://magento222.loc/index.php/rest/V1/udpo/000000012-1/deleteTrack/UPS12345\\ | POST http://magento.loc/index.php/rest/V1/udpo/000000012-1/deleteTrack/UPS12345\\ |
[]\\ | []\\ |
\\ | \\ |
| |
'' | '' |
Example:\\ | Example: |
POST http://magento222.loc/index.php/rest/V1/udstock/update/\\ | |
{"items":[{"sku":"24-MB01","vendor_sku":"v2-24-MB01","stock_qty":"11"},{"vendor_sku":"v2-24-MB04","stock_qty":"22"},{"vendor_sku":"not-existing-vendor-sku","stock_qty":"22"},{"sku":"not-existing-sku","vendor_sku":"not-existing-vendor-sku","stock_qty":"22"}]}\\ | |
\\ | |
RESPONSE\\ | |
"Updated 2 items of 4: (Product not found for vendor sku \"not-existing-vendor-sku\", Product not found for sku \"not-existing-sku\")" | |
'' | '' |
| <code> |
| POST http://magento.loc/index.php/rest/V1/udstock/update/ |
| { |
| "items": [ |
| { |
| "sku": "24-MB01", |
| "vendor_sku": "v2-24-MB01", |
| "stock_qty": "11" |
| }, |
| { |
| "vendor_sku": "v2-24-MB04", |
| "stock_qty": "22" |
| }, |
| { |
| "vendor_sku": "not-existing-vendor-sku", |
| "stock_qty": "22" |
| }, |
| { |
| "sku": "not-existing-sku", |
| "vendor_sku": "not-existing-vendor-sku", |
| "stock_qty": "22" |
| } |
| ] |
| } |
| </code> |
| '' |
| RESPONSE |
| '' |
| <code> |
| "Updated 2 items of 4: (Product not found for vendor sku "not-existing-vendor-sku", Product not found for sku "not-existing-sku")" |
| </code> |
| |