This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
udropship:umarketplace:m2:split-rate-api [2019/10/23 21:38] wtsergo [Estimate guest cart shipping] |
udropship:umarketplace:m2:split-rate-api [2019/10/23 22:04] wtsergo |
||
---|---|---|---|
Line 4: | Line 4: | ||
Split-rate add-on customizes magento native checkout API to produce data in a bit different format to match specifics of split-rate cart functionality. The add-on gives functionality to a customer to select different shipping method per vendor. Customer cart can contain products from multiple vendors. Each group of products that belongs to a different vendor can have a separate shipping method assigned that will be later used in order fulfillment. | Split-rate add-on customizes magento native checkout API to produce data in a bit different format to match specifics of split-rate cart functionality. The add-on gives functionality to a customer to select different shipping method per vendor. Customer cart can contain products from multiple vendors. Each group of products that belongs to a different vendor can have a separate shipping method assigned that will be later used in order fulfillment. | ||
+ | The list of customized APIs | ||
+ | * / | ||
+ | * / | ||
+ | * / | ||
+ | * / | ||
+ | * / | ||
+ | * / | ||
+ | * / | ||
+ | * / | ||
+ | * / | ||
+ | |||
===== Estimate guest cart shipping ===== | ===== Estimate guest cart shipping ===== | ||
Line 9: | Line 20: | ||
If you check results of this API call you will notice a presence of udropship_vendor, | If you check results of this API call you will notice a presence of udropship_vendor, | ||
**vendor_id** - reference id of the vendor that this item relates to.\\ | **vendor_id** - reference id of the vendor that this item relates to.\\ | ||
- | **udropship_default** - indicates if this method selected by default or using previos calls to /// | + | **udropship_default** - indicates if this method selected by default or using previos calls to /// |
Item needs to be treated differently depending on udropship_vendor field value:\\ | Item needs to be treated differently depending on udropship_vendor field value:\\ | ||
**udropship_vendor=0** - should be skipped. normaly it's a system carrier method that not used in per vendor shipping\\ | **udropship_vendor=0** - should be skipped. normaly it's a system carrier method that not used in per vendor shipping\\ | ||
Line 140: | Line 151: | ||
}] | }] | ||
</ | </ | ||
+ | |||
+ | ===== Save guest cart totals ===== | ||
+ | |||
+ | Guest cart totals information save uses customized request.\\ | ||
+ | In request we add **shipping_method_all** field which holds per vendor selection of shipping methods | ||
+ | |||
+ | '' | ||
+ | Example: | ||
+ | '' | ||
+ | < | ||
+ | POST / | ||
+ | {" | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | }, | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | }, | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | } | ||
+ | } | ||
+ | }} | ||
+ | </ | ||
+ | '' | ||
+ | RESPONSE | ||
+ | '' | ||
+ | < | ||
+ | { | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | }, { | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | }], | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | }, { | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | }, {" | ||
+ | } | ||
+ | </ | ||
+ | |||
+ | ===== Save guest cart shipping information ===== | ||
+ | |||
+ | This request has a customized field **shipping_method_all**. | ||
+ | |||
+ | '' | ||
+ | Example: | ||
+ | '' | ||
+ | < | ||
+ | POST / | ||
+ | { | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | }, | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | }, | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | }, | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | }, | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | } | ||
+ | } | ||
+ | } | ||
+ | } | ||
+ | </ | ||
+ | '' | ||
+ | RESPONSE | ||
+ | '' | ||
+ | < | ||
+ | { | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | }, { | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | }], | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | }, { | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | }, {" | ||
+ | } | ||
+ | } | ||
+ | </ | ||
+ | |||
+ | ===== Logged in customers ===== | ||
+ | |||
+ | Logged in customers checkout requests use the same approach just different endpoints and different original format. | ||
+ |