User Tools

Site Tools


udropship:umarketplace:m2:rma-api

Differences

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

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
udropship:umarketplace:m2:rma-api [2022/04/26 07:01]
wtsergo [Get RMA Comments List]
udropship:umarketplace:m2:rma-api [2022/04/26 07:18] (current)
wtsergo [Create RMA]
Line 1: Line 1:
-====== uMarketplace Vendor API Add-on ======+====== uMarketplace uReturn (RMA) API Add-on ======
      
 ===== Introduction ===== ===== Introduction =====
  
-The uReturn API add-on extends Magento 2 REST/Soap API and allow admin and vendor utilize it to create/pull/update uReturns information.+The uReturn (RMA) API add-on extends Magento 2 REST/Soap API and allow admin and vendor utilize it to create/pull/update uReturns information.
 To get more technical details check: To get more technical details check:
   - //app\code\Unirgy\RmaApi\etc\webapi.xml// - list of entry points for API calls   - //app\code\Unirgy\RmaApi\etc\webapi.xml// - list of entry points for API calls
Line 33: Line 33:
   - [[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.
  
 '' ''
Line 39: Line 39:
 '' ''
 <code> <code>
-POST  http://magento241.loc/rest//V1/urma/create+POST  http://magento.loc/rest//V1/urma/create
 { {
     "data": {     "data": {
Line 71: Line 71:
 '' ''
 <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>
 '' ''
Line 352: Line 352:
 '' ''
 <code> <code>
-GET http://magento241.loc/rest/V1/urma/000000011+GET http://magento.loc/rest/V1/urma/000000011
 </code> </code>
 '' ''
Line 406: Line 406:
 </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.
  
  
Line 415: Line 415:
 '' ''
 <code> <code>
-POST  http://magento222.loc/index.php/rest/V1/udpo/000000012-1/addComment+POST  http://magento.loc/index.php/rest/V1/urma/000000011/addComment
 { {
     "data": {     "data": {
Line 441: Line 441:
 '' ''
 <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>
 '' ''
Line 485: Line 485:
 </code> </code>
  
 +===== Add tracking number to RMA =====
  
 +In order to add tracking number to RMA perform ///V1/urma/:id/addTrack// POST API call. :id parameter could be either RMA entity id or it's increment id. Request payload expect carrier code in ''carrier'' string parameter, carrier title in ''title'' parameter and tracking number in ''trackNumber'' parameter. It return track id on success and may rise exception if PO not found or does not belong to vendor.
 +
 +''
 +Example:
 +''
 +<code>
 +POST http://magento.loc/index.php/rest/V1/urma/000000011/addTrack
 +{"carrier":"ups","title":"UPS","trackNumber":"UPS12345"}
 +</code>
 +RESPONSE
 +<code>
 +2
 +</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>
  
udropship/umarketplace/m2/rma-api.1650956512.txt.gz · by wtsergo