addReturnComment mutation
The addReturnComment
mutation adds a comment to an existing return request.
Syntax
1
2
3
mutation: {
addReturnComment(input: AddReturnCommentInput!): AddReturnCommentOutput
}
Example usage
The following example adds a comment in response to the merchant.
Request:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
mutation{
addReturnComment(input: {
return_uid: "Mw=="
comment_text: "I'd like a refund"})
{
return {
uid
status
comments {
uid
author_name
text
}
}
}
}
Response:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
{
"data": {
"addReturnComment": {
"return": {
"uid": "Mw==",
"status": "PENDING",
"comments": [
{
"uid": "NQ==",
"author_name": "Customer Service",
"text": "We placed your Return request."
},
{
"uid": "Ng==",
"author_name": "Bob Loblaw",
"text": "I want to return the shirt because I don't like the texture of the fabric"
},
{
"uid": "Nw==",
"author_name": "Customer Service",
"text": "OK. Would you like a refund or store credit?"
},
{
"uid": "OA==",
"author_name": "Bob Loblaw",
"text": "I'd like a refund"
}
]
}
}
}
}
Input attributes
The AddReturnCommentInput
object must contain the following attributes:
Attribute | Data Type | Description |
---|---|---|
comment_text |
String! | The text added to the return request |
return_uid |
ID! | The unique ID of a Return object |
Output attributes
The AddReturnCommentOutput
object contains the Return
object.
Attribute | Data Type | Description |
---|---|---|
return |
Return | Contains details about the modified return |
Return object
The Return
object can contain the following attributes:
Attribute | Data Type | Description |
---|---|---|
available_shipping_carriers |
[ReturnShippingCarrier] | A list of shipping carriers available for returns |
comments |
[ReturnComment] | A list of comments posted for the return request |
created_at |
String! | The date the return was requested |
customer_email |
String! | Email of the person who created the return request |
customer |
ReturnCustomer | The name of the person who requested the return |
items |
[ReturnItem] | A list of items being returned |
number |
String! | Human-readable return number |
order |
CustomerOrder | The order associated with the return |
shipping |
ReturnShipping | Shipping information for the return |
status |
ReturnStatus | An enum indicating the status of the return request. Possible values are APPROVED, AUTHORIZED, CLOSED, DENIED, PARTIALLY_APPROVED, PARTIALLY_AUTHORIZED, PARTIALLY_RECEIVED, PARTIALLY_REJECTED, PENDING, PROCESSED_AND_CLOSED, RECEIVED, and REJECTED |
uid |
ID! | The unique ID of a Return object |
ReturnComment attributes
The ReturnComment object provides details about an individual comment in a refund request. Comments can be added by a customer or the merchant.
Attribute | Data Type | Description |
---|---|---|
author_name |
String! | The name or author who posted the comment |
created_at |
String! | The date and time the comment was posted |
text |
String! | The contents of the comment |
uid |
ID! | The unique ID of a ReturnComment object |
ReturnCustomAttribute attributes
Attribute | Data Type | Description |
---|---|---|
label |
String! | A description of the attribute |
uid |
ID! | The unique ID of a ReturnCustomAttribute attribute |
value |
String! | A JSON-encoded value of the attribute |
ReturnCustomer attributes
The ReturnCustomer object contains information about the person requesting a return.
Attribute | Data Type | Description |
---|---|---|
email |
String! | The email address of the refund requester |
firstname |
String | The first name of the refund requester |
lastname |
String | The last name of the refund requester |
ReturnItem attributes
The ReturnItem object provides details about an individual item in a return request.
Attribute | Data Type | Description |
---|---|---|
custom_attributes |
[ReturnCustomAttribute] | Return item custom attributes that are visible on the storefront |
order_item |
OrderItemInterface! | Provides access to the product being returned, including information about selected and entered options |
quantity |
Float! | The quantity of the item the merchant authorized to be returned |
request_quantity |
Float! | The quantity of the item requested to be returned |
status |
ReturnItemStatus! | An enum indicating the return status of the item. Possible values are APPROVED, AUTHORIZED, DENIED, PENDING, RECEIVED, and REJECTED |
uid |
ID! | The unique ID of an item of a Return object |
ReturnShipping attributes
The ReturnShipping object can contain the merchant’s shipping address and tracking information.
Attribute | Data Type | Description |
---|---|---|
address |
ReturnShippingAddress | The merchant-defined return shipping address |
tracking(uid: ID) |
[ReturnShippingTracking] | The unique ID for a ReturnShippingTracking object. If a single UID is specified, contains a single tracking record. Otherwise, contains all tracking information |
ReturnShippingAddress attributes
The ReturnShippingAddress object defines the merchant address for receiving returned items.
Attribute | Data Type | Description |
---|---|---|
city |
String! | The city for product returns |
contact_name |
String | The merchant’s contact person |
country |
Country! | An object that defines the country for product returns |
postcode |
String! | The postal code for product returns |
region |
Region! | An object that defines the state or province for product returns |
street |
[String]! | The street address for product returns |
telephone |
String | The telephone number for product returns |
ReturnShippingCarrier attributes
The ReturnShippingCarrier object contains details about the shipping carrier used to return a product.
Attribute | Data Type | Description |
---|---|---|
label |
String! | A description of the shipping carrier |
uid |
ID! | The unique ID of a ReturnShippingCarrier object |
ReturnShippingTracking attributes
The ReturnShippingTracking object contains tracking information for an approved return.
Attribute | Data Type | Description |
---|---|---|
carrier |
ReturnShippingCarrier! | Contains details of a shipping carrier |
status |
ReturnShippingTrackingStatus | Contains details about the status of a shipment |
tracking_number |
String! | A tracking number assigned by the carrier |
uid |
ID! | The unique ID assigned of a ReturnShippingTracking object |
ReturnShippingTrackingStatus attributes
The ReturnShippingTrackingStatus object contains tracking status information for an approved return.
Attribute | Data Type | Description |
---|---|---|
text |
String! | Text that describes the status |
type |
ReturnShippingTrackingStatusType! | An enum indicating whether the status type is INFORMATIONAL or an ERROR |