Both sides previous revision
Previous revision
Next revision
|
Previous revision
|
udropship:umarketplace:m2:rma-api [2022/04/26 07:07] wtsergo [Add comment to uReturn] |
udropship:umarketplace:m2:rma-api [2022/04/26 07:18] wtsergo [Create RMA] |
- [[https://unirgy.com/wiki/udropship/umarketplace/m2/vendor-api#get_list_of_vendor_purchase_orders_possible_to_filter]] | - [[https://unirgy.com/wiki/udropship/umarketplace/m2/vendor-api#get_list_of_vendor_purchase_orders_possible_to_filter]] |
| |
Once it's done and you have all required entity IDs you are ready to create RMA. | Once it's done and you have all required entity IDs you are ready to create RMA. Request payload expect ''data'' param to be json encoded array that match //\Unirgy\RmaApi\Api\Data\CreateRmaRequestInterface// interface. It's inner ''items'' param should be json encoded array that match //\Unirgy\RmaApi\Api\Data\CreateRmaItemInterface// interface. |
| |
'' | '' |
'' | '' |
<code> | <code> |
POST http://magento241.loc/rest//V1/urma/create | POST http://magento.loc/rest//V1/urma/create |
{ | { |
"data": { | "data": { |
'' | '' |
<code> | <code> |
GET http://magento241.loc/rest/V1/urmas?searchCriteria[filter_groups][0][filters][0][field]=created_at&searchCriteria[filter_groups][0][filters][0][value]=2022-01-01+00:00:00&searchCriteria[filter_groups][0][filters][0][condition_type]=gt | GET http://magento.loc/rest/V1/urmas?searchCriteria[filter_groups][0][filters][0][field]=created_at&searchCriteria[filter_groups][0][filters][0][value]=2022-01-01+00:00:00&searchCriteria[filter_groups][0][filters][0][condition_type]=gt |
</code> | </code> |
'' | '' |
'' | '' |
<code> | <code> |
GET http://magento241.loc/rest/V1/urma/000000011 | GET http://magento.loc/rest/V1/urma/000000011 |
</code> | </code> |
'' | '' |
</code> | </code> |
| |
===== Add comment to uReturn ===== | ===== Add comment to RMA ===== |
| |
In order to add comment to uReturn perform ///V1/urma/:id/addComment// POST API call. :id parameter could be either uReturn entity id or it's increment id. Request payload expect ''data'' json encoded array parameter that match //\Unirgy\RmaApi\Api\Data\CreateRmaCommentInterface// interface. For definition check //app\code\Unirgy\RmaApi\Api\Data\CreateRmaCommentInterface.php// file. It return bool true on success and may rise exception if uReturn not found or does not belong to vendor. | In order to add comment to RMA perform ///V1/urma/:id/addComment// POST API call. :id parameter could be either RMA entity id or it's increment id. Request payload expect ''data'' json encoded array parameter that match //\Unirgy\RmaApi\Api\Data\CreateRmaCommentInterface// interface. For definition check //app\code\Unirgy\RmaApi\Api\Data\CreateRmaCommentInterface.php// file. It return bool true on success and may rise exception if RMA not found or does not belong to vendor. |
| |
| |
'' | '' |
<code> | <code> |
POST http://magento241.loc/index.php/rest/V1/urma/000000011/addComment | POST http://magento.loc/index.php/rest/V1/urma/000000011/addComment |
{ | { |
"data": { | "data": { |
'' | '' |
<code> | <code> |
GET http://magento241.loc/index.php/rest/V1/urma/000000011/comments | GET http://magento.loc/index.php/rest/V1/urma/000000011/comments |
</code> | </code> |
'' | '' |
'' | '' |
<code> | <code> |
POST http://magento241.loc/index.php/rest/V1/urma/000000011/addTrack | POST http://magento.loc/index.php/rest/V1/urma/000000011/addTrack |
{"carrier":"ups","title":"UPS","trackNumber":"UPS12345"} | {"carrier":"ups","title":"UPS","trackNumber":"UPS12345"} |
</code> | </code> |
</code> | </code> |
| |
| ===== Delete tracking number from RMA ===== |
| |
| In order to delete tracking number from RMA perform ///V1/urma/:id/deleteTrack/:trackNumber// POST API call. **:id** parameter could be either RMA entity id or it's increment id, **:trackNumber** should be tracking number. It return bool true on success and may rise exception if RMA not found or does not belong to vendor and if tracking number not found within RMA. |
| |
| '' |
| Example: |
| '' |
| <code> |
| POST http://magento.loc/index.php/rest/V1/urma/000000011/deleteTrack/UPS12345 |
| </code> |
| '' |
| RESPONSE |
| '' |
| <code> |
| true |
| </code> |
| |