Skip to main content

REST API

Alongside the GraphQL API, the RMA extension exposes a full REST API. It covers complete CRUD access for returns, items, messages, attachments, and every dictionary (statuses, reasons, conditions, resolutions, custom fields, return addresses, quick responses, workflow rules) from the admin side, dedicated actions for changing RMA status and confirming shipping, a set of "my RMA" endpoints so logged-in customers can manage their own returns, and a single anonymous endpoint that lets a guest look up an RMA by its guest ID. Use this API to integrate RMA data with external systems (ERPs, helpdesks, marketplaces) or to build a custom storefront return flow.

Authentication

This API uses three different authentication levels, depending on the route:

  • Admin / integration token — all /V1/mirasvit-rma/* routes require a bearer token issued to an admin user or an integration, and the ACL resource listed for that route (each section below states which one). See Magento's Authentication guide for how to obtain an admin/integration token.
  • Customer token — all /V1/mine/rma/* routes require a bearer token issued to a logged-in customer (resource ref="self" in webapi.xml), and always operate on that customer's own RMAs. See Magento's customer token guide for how to obtain one.
  • Anonymous — the single /V1/guest/rma/{guestId} route (resource ref="anonymous") requires no token at all. Anyone who has the guestId value can call it, so treat that value like a secret — see the Guest RMA Lookup section below.

Filtering, sorting, and pagination

Every getList-style endpoint (and the customer getMyRmaList, getMyRmaItems, getMyRmaMessages endpoints) accepts a standard Magento searchCriteria query parameter for filtering, sorting, and pagination. Refer to Magento's Search using REST APIs guide for the full searchCriteria[filter_groups]/searchCriteria[sort_orders]/searchCriteria[pageSize] syntax — it isn't re-documented here.

RMA

Required ACL resource: Mirasvit_Rma::rma_rma for reads, Mirasvit_Rma::add to create/update, Mirasvit_Rma::delete to delete.

MethodURLDescription
GET/V1/mirasvit-rma/rmasGet a list of RMAs (accepts searchCriteria)
GET/V1/mirasvit-rma/rmas/{rmaId}Get a single RMA by ID
POST/V1/mirasvit-rma/rmasCreate a new RMA
PUT/V1/mirasvit-rma/rmas/{rmaId}Update an existing RMA
DELETE/V1/mirasvit-rma/rmas/{rmaId}Delete an RMA

Rma object

AttributeData TypeDescription
idIntRMA ID
increment_idStringRMA number (e.g. RMA-1)
guest_idStringGuest lookup token, present only on guest-submitted RMAs (see Guest RMA Lookup)
firstnameStringCustomer first name
lastnameStringCustomer last name
companyStringCustomer company
telephoneStringCustomer phone number
emailStringCustomer email
streetStringReturn contact street address
cityStringReturn contact city
regionStringReturn contact region name
region_idIntReturn contact region ID
country_idStringReturn contact country code
postcodeStringReturn contact postcode
customer_idIntCustomer ID, null for a guest RMA
status_idIntStatus ID, see Statuses
store_idIntStore view ID the RMA was created in
is_resolvedBooleanWhether the RMA is in a resolved (closed-out) status
created_atStringCreated at date
updated_atStringUpdated at date
is_giftBooleanWhether the return concerns a gift order
is_admin_readBooleanWhether an admin user has opened/read the RMA
user_idIntAdmin user ID who last acted on the RMA
last_reply_nameStringName of the author of the last reply
ticket_idIntLinked Helpdesk ticket ID, if the Helpdesk integration is used
exchange_order_idsInt[]IDs of exchange orders created for this RMA
replacement_order_idsInt[]IDs of replacement orders created for this RMA (see RMA Actions)
credit_memo_idsInt[]IDs of credit memos created for this RMA
return_addressStringResolved return address text shown to the customer
status_historyObject[]History of status changes for the RMA
codeStringRead-only computed status code
info

Older versions of this module returned a top-level order_id on the RMA object. That field was removed — an RMA can span items from multiple orders, so the order reference now lives on each RMA item (order_item_id/order_id) instead of on the RMA itself.

RMA Items

Required ACL resource: Mirasvit_Rma::rma_rma for reads, Mirasvit_Rma::add to create/update, Mirasvit_Rma::delete to delete.

MethodURLDescription
GET/V1/mirasvit-rma/itemsGet a list of RMA items (accepts searchCriteria)
GET/V1/mirasvit-rma/items/{itemId}Get a single RMA item by ID
POST/V1/mirasvit-rma/itemsCreate a new RMA item
PUT/V1/mirasvit-rma/items/{itemId}Update an existing RMA item
DELETE/V1/mirasvit-rma/items/{itemId}Delete an RMA item

Item object

AttributeData TypeDescription
idIntItem ID
rma_idIntParent RMA ID
order_item_idIntOrder item ID this return line refers to
order_idIntOrder ID this return line refers to
product_skuStringProduct SKU
nameStringProduct name
reason_idIntReason ID, see Reasons
resolution_idIntResolution ID, see Resolutions
condition_idIntCondition ID, see Conditions
qty_requestedIntQuantity requested to return
to_stockBooleanWhether the returned quantity should be returned to stock
product_optionsObject[]Selected product options (configurable/bundle/etc.)
created_atStringCreated at date
updated_atStringUpdated at date

RMA Messages

Required ACL resource: Mirasvit_Rma::rma_rma for reads, Mirasvit_Rma::add to create/update, Mirasvit_Rma::delete to delete.

MethodURLDescription
GET/V1/mirasvit-rma/messagesGet a list of RMA messages (accepts searchCriteria)
GET/V1/mirasvit-rma/messages/{messageId}Get a single message by ID
POST/V1/mirasvit-rma/messagesCreate a new message
PUT/V1/mirasvit-rma/messages/{messageId}Update an existing message
DELETE/V1/mirasvit-rma/messages/{messageId}Delete a message

Message object

AttributeData TypeDescription
idIntMessage ID
rma_idIntParent RMA ID
user_idIntAdmin user ID, if the message was posted by staff
customer_idIntCustomer ID, if the message was posted by the customer
customer_nameStringDisplay name of the message author
textStringMessage text
is_htmlBooleanWhether text contains HTML
is_visible_in_frontendBooleanWhether the message is visible to the customer on the storefront
is_customer_notifiedBooleanWhether the customer was emailed about this message
is_readBooleanWhether the message has been read
email_idIntLinked outbound email ID, if one was sent for this message
created_atStringCreated at date
updated_atStringUpdated at date

RMA Attachments

Required ACL resource: Mirasvit_Rma::rma_rma for reads, Mirasvit_Rma::add to create/update, Mirasvit_Rma::delete to delete.

MethodURLDescription
GET/V1/mirasvit-rma/attachmentsGet a list of attachments (accepts searchCriteria)
GET/V1/mirasvit-rma/attachments/{attachmentId}Get a single attachment by ID
POST/V1/mirasvit-rma/attachmentsCreate (upload) a new attachment
PUT/V1/mirasvit-rma/attachments/{attachmentId}Update an existing attachment
DELETE/V1/mirasvit-rma/attachments/{attachmentId}Delete an attachment

Attachment object

AttributeData TypeDescription
idIntAttachment ID
item_typeStringType of entity the attachment is linked to (e.g. message)
item_idIntID of the linked entity (e.g. the message ID)
uidStringUnique attachment identifier
nameStringOriginal file name
typeStringMIME type
sizeIntFile size, in bytes
bodyStringFile content, base64-encoded
created_atStringCreated at date

RMA Actions

Required ACL resource: Mirasvit_Rma::add.

MethodURLDescription
POST/V1/mirasvit-rma/rmas/{rmaId}/statusChange the status of a single RMA
POST/V1/mirasvit-rma/rmas/mass-statusChange the status of multiple RMAs at once
POST/V1/mirasvit-rma/rmas/{rmaId}/mark-readMark a single RMA as read/unread
POST/V1/mirasvit-rma/rmas/mass-mark-readMark multiple RMAs as read/unread at once
POST/V1/mirasvit-rma/rmas/{rmaId}/replacement-orderCreate a replacement order for an RMA

Request bodies

EndpointBodyReturns
.../{rmaId}/status{"statusId": 3}Updated Rma object
.../mass-status{"rmaIds": [1, 2, 3], "statusId": 3}true on success
.../{rmaId}/mark-read{"isRead": true}true on success
.../mass-mark-read{"rmaIds": [1, 2, 3], "isRead": true}true on success
.../{rmaId}/replacement-order(no body)The new replacement order ID (Int)

RMA Shipping

Required ACL resource: Mirasvit_Rma::add.

MethodURLDescription
POST/V1/mirasvit-rma/rmas/{rmaId}/confirm-shippingConfirm that the customer has shipped the return package

This endpoint takes no request body beyond the {rmaId} path parameter and returns true on success.

Statuses

Required ACL resource: Mirasvit_Rma::rma_dictionary_status for all methods (read and write).

MethodURLDescription
GET/V1/mirasvit-rma/statusesGet a list of statuses (accepts searchCriteria)
GET/V1/mirasvit-rma/statuses/{statusId}Get a single status by ID
POST/V1/mirasvit-rma/statusesCreate a new status
PUT/V1/mirasvit-rma/statuses/{statusId}Update an existing status
DELETE/V1/mirasvit-rma/statuses/{statusId}Delete a status

The fields returned by this endpoint match those documented in Statuses, with these REST field names: name, code, color, sort_order, is_active, is_visible, is_show_shipping, is_main_branch, children_ids, customer_message, admin_message, history_message.

Reasons

Required ACL resource: Mirasvit_Rma::rma_dictionary_reason.

MethodURLDescription
GET/V1/mirasvit-rma/reasonsGet a list of reasons (accepts searchCriteria)
GET/V1/mirasvit-rma/reasons/{reasonId}Get a single reason by ID
POST/V1/mirasvit-rma/reasonsCreate a new reason
PUT/V1/mirasvit-rma/reasons/{reasonId}Update an existing reason
DELETE/V1/mirasvit-rma/reasons/{reasonId}Delete a reason

The fields returned by this endpoint match those documented in Reasons: name, sort_order, is_active.

Conditions

Required ACL resource: Mirasvit_Rma::rma_dictionary_condition.

MethodURLDescription
GET/V1/mirasvit-rma/conditionsGet a list of conditions (accepts searchCriteria)
GET/V1/mirasvit-rma/conditions/{conditionId}Get a single condition by ID
POST/V1/mirasvit-rma/conditionsCreate a new condition
PUT/V1/mirasvit-rma/conditions/{conditionId}Update an existing condition
DELETE/V1/mirasvit-rma/conditions/{conditionId}Delete a condition

The fields returned by this endpoint match those documented in Conditions: name, sort_order, is_active.

Resolutions

Required ACL resource: Mirasvit_Rma::rma_dictionary_resolution.

MethodURLDescription
GET/V1/mirasvit-rma/resolutionsGet a list of resolutions (accepts searchCriteria)
GET/V1/mirasvit-rma/resolutions/{resolutionId}Get a single resolution by ID
POST/V1/mirasvit-rma/resolutionsCreate a new resolution
PUT/V1/mirasvit-rma/resolutions/{resolutionId}Update an existing resolution
DELETE/V1/mirasvit-rma/resolutions/{resolutionId}Delete a resolution

The fields returned by this endpoint match those documented in Resolutions, with these REST field names: name, code, sort_order, is_active, exchange_order_enabled, replacement_order_enabled, creditmemo_enabled.

Custom Fields

Required ACL resource: Mirasvit_Rma::rma_dictionary_field.

MethodURLDescription
GET/V1/mirasvit-rma/fieldsGet a list of custom fields (accepts searchCriteria)
GET/V1/mirasvit-rma/fields/{fieldId}Get a single custom field by ID
POST/V1/mirasvit-rma/fieldsCreate a new custom field
PUT/V1/mirasvit-rma/fields/{fieldId}Update an existing custom field
DELETE/V1/mirasvit-rma/fields/{fieldId}Delete a custom field

The fields returned by this endpoint match those documented in Custom Fields, with these REST field names: name, code, type, accessory, values, description, is_active, sort_order, is_required_staff, is_required_customer, is_visible_customer, is_editable_customer, visible_customer_status, is_show_in_confirm_shipping.

Return Addresses

Required ACL resource: Mirasvit_Rma::rma_return_addresses.

MethodURLDescription
GET/V1/mirasvit-rma/addressesGet a list of return addresses (accepts searchCriteria)
GET/V1/mirasvit-rma/addresses/{addressId}Get a single return address by ID
POST/V1/mirasvit-rma/addressesCreate a new return address
PUT/V1/mirasvit-rma/addresses/{addressId}Update an existing return address
DELETE/V1/mirasvit-rma/addresses/{addressId}Delete a return address

The fields returned by this endpoint match those documented in Return Addresses, with these REST field names: name, address, sort_order, is_active.

Quick Responses

Required ACL resource: Mirasvit_Rma::rma_dictionary_template.

MethodURLDescription
GET/V1/mirasvit-rma/quick-responsesGet a list of quick responses (accepts searchCriteria)
GET/V1/mirasvit-rma/quick-responses/{responseId}Get a single quick response by ID
POST/V1/mirasvit-rma/quick-responsesCreate a new quick response
PUT/V1/mirasvit-rma/quick-responses/{responseId}Update an existing quick response
DELETE/V1/mirasvit-rma/quick-responses/{responseId}Delete a quick response

The fields returned by this endpoint match those documented in Quick Responses: name, template, is_active.

Workflow Rules

Required ACL resource: Mirasvit_Rma::rma_rule.

MethodURLDescription
GET/V1/mirasvit-rma/rulesGet a list of workflow rules (accepts searchCriteria)
GET/V1/mirasvit-rma/rules/{ruleId}Get a single workflow rule by ID
POST/V1/mirasvit-rma/rulesCreate a new workflow rule
PUT/V1/mirasvit-rma/rules/{ruleId}Update an existing workflow rule
DELETE/V1/mirasvit-rma/rules/{ruleId}Delete a workflow rule

The fields returned by this endpoint match those documented in Workflow Rules, with these REST field names: name, event, is_active, conditions_serialized, status_id, sort_order, is_stop_processing, is_resolved, email_subject, email_body, is_send_owner, is_send_department, is_send_user, is_send_attachment, other_email, user_id.

Offline Orders

Required ACL resource: Mirasvit_Rma::rma_api_offline_order.

MethodURLDescription
GET/V1/mirasvit-rma/offline-ordersGet a list of offline orders (accepts searchCriteria)
GET/V1/mirasvit-rma/offline-orders/{offlineOrderId}Get a single offline order by ID
POST/V1/mirasvit-rma/offline-ordersCreate a new offline order
PUT/V1/mirasvit-rma/offline-orders/{offlineOrderId}Update an existing offline order
DELETE/V1/mirasvit-rma/offline-orders/{offlineOrderId}Delete an offline order

An "offline order" represents a purchase made outside Magento (e.g. in a physical store) that a customer wants to return through the Allow RMA for offline orders flow, see Configuration Settings.

OfflineOrder object

AttributeData TypeDescription
offline_order_idIntOffline order ID
receipt_numberStringReceipt/order number entered by the customer
customer_idIntCustomer ID the offline order is associated with
store_idIntStore view ID
is_offlineBooleanAlways true for entities created through this endpoint

Offline Items

Required ACL resource: Mirasvit_Rma::rma_api_offline_item.

MethodURLDescription
GET/V1/mirasvit-rma/offline-itemsGet a list of offline order items (accepts searchCriteria)
GET/V1/mirasvit-rma/offline-items/{itemId}Get a single offline order item by ID
POST/V1/mirasvit-rma/offline-itemsCreate a new offline order item
PUT/V1/mirasvit-rma/offline-items/{itemId}Update an existing offline order item
DELETE/V1/mirasvit-rma/offline-items/{itemId}Delete an offline order item

OfflineItem object

AttributeData TypeDescription
offline_item_idIntOffline item ID
rma_idIntParent RMA ID
offline_order_idIntParent offline order ID, see Offline Orders
nameStringProduct name entered by the customer
reason_idIntReason ID, see Reasons
resolution_idIntResolution ID, see Resolutions
condition_idIntCondition ID, see Conditions
qty_requestedIntQuantity requested to return
created_atStringCreated at date
updated_atStringUpdated at date

Customer RMA Endpoints

These routes require a customer token (see Authentication above) and always operate on the logged-in customer's own RMAs — there is no separate ACL resource, since resource ref="self" restricts every request to the calling customer.

MethodURLDescription
GET/V1/mine/rma/rmasGet a list of the current customer's RMAs (accepts searchCriteria)
GET/V1/mine/rma/rmas/{rmaId}Get one of the current customer's RMAs by ID
POST/V1/mine/rma/rmasCreate a new RMA for the current customer, using an Rma object as the body
POST/V1/mine/rma/rmas/{rmaId}/messagesAdd a message to one of the current customer's RMAs, body {"messageText": "..."}, returns a Message object
GET/V1/mine/rma/rmas/{rmaId}/messagesGet the messages of one of the current customer's RMAs (accepts searchCriteria)
POST/V1/mine/rma/rmas/{rmaId}/itemsAdd an item to one of the current customer's RMAs, using an Item object as the body
GET/V1/mine/rma/rmas/{rmaId}/itemsGet the items of one of the current customer's RMAs (accepts searchCriteria)
POST/V1/mine/rma/rmas/{rmaId}/confirm-shippingConfirm shipping for one of the current customer's RMAs, no body, returns true on success

These endpoints reuse the same Rma, Item, and Message objects documented above in the admin sections, since they are backed by the same underlying data interfaces (RmaInterface, ItemInterface, MessageInterface).

Guest RMA Lookup

MethodURLDescription
GET/V1/guest/rma/{guestId}Look up an RMA by its guest ID

This is the only fully anonymous endpoint in the API — resource ref="anonymous" in webapi.xml means it needs no bearer token at all. {guestId} is the RMA's guest_id value, a token generated for guest-submitted RMAs (see the guest_id field of the Rma object) and normally delivered to the guest by email when their return is created, so they can check its status without creating an account. Because no authentication is required, anyone who obtains a guestId value can read that RMA — treat it as a bearer credential and never expose it (for example, in logs or shareable links) beyond the guest it belongs to. The response is a single Rma object.