GraphQL API
Effortlessly integrate and retrieve all your RMA data with our GraphQL API. This API is designed to provide seamless access to your return management system, making it simple for developers to create custom integrations, offer personalized customer experiences, and automate processes with precision. With just a few queries, you can obtain detailed RMA data, including customer returns, statuses, and essential information.
For comprehensive information about GraphQL, refer to the GraphQL developer guide on the Magento DevDocs page.
To download RMA GraphQl collection press this download
RMA GraphQL objects overview
The Query object can contain the following attributes:
| Attribute | Data Type | Description |
|---|---|---|
customerRmas | CustomerRmas | List of customer RMAs. Can be filtered by 'status_id' and 'custom_fields' |
guestCustomerRmas | RmaGuestCustomer | List of guest customer RMAs for a given order. Requires an input of type RmaGuestCustomerInput (order_id, customer_email, and optionally customer_name). |
rmaDictionary | RmaDictionary | List of RMA dictionaries |
orderRmas | [OrderRmas] | List of RMAs already created for a given order. Requires an order_id. |
CustomerRmas object
Array of RMAs
The CustomerRmas object can contain the following attributes:
| Attribute | Data Type | Description |
|---|---|---|
items | CustomerRma | Array of RMAs |
CustomerRma object
RMA mapping fields
The CustomerRma object can contain the following attributes:
| Attribute | Data Type | Description |
|---|---|---|
id | String | RMA ID |
increment_id | String | (Deprecated: use id.) The RMA number |
status | String | The RMA status |
return_address | String | The RMA return address |
created_at | String | Created at date |
print_slip_url | String | URL to print the RMA Packing Slip |
print_label_url | String | URL to print the RMA Shipping Label |
custom_fields | RmaCustomField | List of custom fields associated with RMA |
orders | RmaOrder | RMA orders list |
messages | RmaMessages | RMA messages information |
RmaGuestCustomer object
The RmaGuestCustomer object is returned by the guestCustomerRmas query.
| Attribute | Data Type | Description |
|---|---|---|
items | CustomerRma | Array of RMAs |
OrderRmas object
The OrderRmas object is returned by the orderRmas query.
| Attribute | Data Type | Description |
|---|---|---|
id | Int | RMA ID |
increment_id | String | (Deprecated.) The RMA number |
created_at | String | Created at date |
RmaFilterInput object
The RmaFilterInput object allows you to filter RMAs based on specific criteria.
| Attribute | Data Type | Description |
|---|---|---|
status_id | Int | Status ID |
custom_fields | RmaCustomFieldInput | Custom fields (code + value) |
RmaDictionary object
RMA Dictionary
The RmaDictionary object can contain the following attributes:
| Attribute | Data Type | Description |
|---|---|---|
statuses | RmaStatus | Array of RMA statuses |
conditions | RmaCondition | Array of RMA conditions |
reasons | RmaReason | Array of RMA reasons |
resolutions | RmaResolution | Array of RMA resolutions |
RmaStatus object
RMA Status object
The RmaStatus object can contain the following attributes:
| Attribute | Data Type | Description |
|---|---|---|
name | String | Status name |
is_active | Boolean | Is status active |
color | String | Status color |
is_visible | Boolean | Is the status visible in the status bar |
RmaCondition object
RMA Condition object
The RmaCondition object can contain the following attributes:
| Attribute | Data Type | Description |
|---|---|---|
name | String | Condition name |
is_active | Boolean | Is condition active |
RmaReason object
RMA Reason object
The RmaReason object can contain the following attributes:
| Attribute | Data Type | Description |
|---|---|---|
name | String | Reason name |
is_active | Boolean | Is reason active |
RmaResolution object
RMA Resolution object
The RmaResolution object can contain the following attributes:
| Attribute | Data Type | Description |
|---|---|---|
name | String | Resolution name |
is_active | Boolean | Is resolution active |
RmaCustomField object
RMA Custom fields object
The RmaCustomField object can contain the following attributes:
| Attribute | Data Type | Description |
|---|---|---|
code | String | Custom field code |
name | String | Custom field name |
type | String | Custom field type |
value | String | Custom field value |
description | String | Custom field description |
is_active | Boolean | Is custom field active |
is_editable | Boolean | Is editable for customers |
is_visible | Boolean | Is visible for customers |
visible_in_status | [String] | Visible for customers in statuses |
is_required | Boolean | Is required for customers |
is_shown_on_shipping | Boolean | Is shown on shipping confirmation |
Mutation object
The Mutation object can contain the following attributes:
| Attribute | Data Type | Description |
|---|---|---|
createRma | CreateRmaOutput | Create RMA |
CreateRmaInput object
Defines the input to the run createRma mutation
The CreateRmaInput object can contain the following attributes:
| Attribute | Data Type | Description |
|---|---|---|
guest_customer | RmaGuestCustomerInput | Defines guest customer information |
rma_orders | RmaOrderInput! | Defines orders information |
custom_fields | RmaCustomFieldInput | List of custom fields |
agree_box | Boolean | Agree with RMA policy text |
reply | String | RMA Customer message |
CreateRmaOutput object
Defines the output for the createRma mutation
The CreateRmaOutput object can contain the following attributes:
| Attribute | Data Type | Description |
|---|---|---|
rma | Rma! | Rma Object |
RmaGuestCustomerInput object
Defines RMA guest customer information
The RmaGuestCustomerInput object can contain the following attributes:
| Attribute | Data Type | Description |
|---|---|---|
order_id | Int | Order ID |
customer_email | String! | Customer Email |
customer_name | String | Customer Name |
RmaOrderInput object
Defines RMA order information
The RmaOrderInput object can contain the following attributes:
| Attribute | Data Type | Description |
|---|---|---|
order_id | String! | Order or Receipt # |
store_id | Int! | Storeview ID |
type | String! | Order type. Allowed values: regular, offline |
items | RmaItemInput! | List of RMA order items |
RmaItemInput object
Defines RMA order item information
The RmaItemInput object can contain the following attributes:
| Attribute | Data Type | Description |
|---|---|---|
order_item_id | Int! | Order item ID |
qty_requested | Int! | Qty requested to return |
product_sku | String! | Product Sku |
condition_id | Int | Condition ID |
reason_id | Int | Reason ID |
resolution_id | Int | Resolution ID |
RmaCustomFieldInput object
Defines RMA custom field information
The RmaCustomFieldInput object can contain the following attributes:
| Attribute | Data Type | Description |
|---|---|---|
code | String | Custom field code |
value | String | Custom field value |
Rma object
Defines RMA information
The Rma object can contain the following attributes:
| Attribute | Data Type | Description |
|---|---|---|
increment_id | String | RMA # |
status_id | Int | Status ID |
date_requested | String | Requested date |
orders | RmaOrder | Defines RMA orders list |
RmaOrder object
Defines RMA orders list
The RmaOrder object can contain the following attributes:
| Attribute | Data Type | Description |
|---|---|---|
order_number | String | Order # |
type | String | Order type. Allowed values: regular, offline |
items | RmaItem | Defines RMA order items information |
RmaItem object
Defines RMA order item information
The RmaItem object can contain the following attributes:
| Attribute | Data Type | Description |
|---|---|---|
image_url | String | Item image |
item_name | String | Item name |
item_sku | String | Item sku |
qty_requested | Int | Item qty requested |
weight | Float | Item weight, in the units defined by the store |
condition_id | Int | Condition ID |
reason_id | Int | Reason ID |
resolution_id | Int | Resolution ID |
RmaMessages object
Defines RMA messages information. This is the type returned by the messages field of the CustomerRma object above (not by the createRma mutation response, which has no messages field).
The RmaMessages object can contain the following attributes:
| Attribute | Data Type | Description |
|---|---|---|
message_id | String | Message ID |
text | String | Message text |
type | String | Message type |