addReturnTracking mutation
The addReturnTracking
mutation adds customer-entered shipping tracking information to the specified return request. Use the available_shipping_carriers
object in the customer
query to retrieve valid carrier_uid
values.
Syntax
1
2
3
mutation: {
addReturnTracking(input: AddReturnTrackingInput!): AddReturnTrackingOutput
}
Example usage
The following example adds the shipping carrier and a tracking number for the specified return request.
Request:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
mutation{
addReturnTracking(input: {
return_uid: "Mw=="
carrier_uid: "dXBzLTE="
tracking_number: "1Z9876543"
}){
return_shipping_tracking {
uid
carrier {
uid
label
}
tracking_number
}
}
}
Response:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
{
"data": {
"addReturnTracking": {
"return_shipping_tracking": {
"uid": "Mw==",
"carrier": {
"uid": "dXBzLTE=",
"label": "United Parcel Service"
},
"tracking_number": "1Z9876543"
}
}
}
}
Input attributes
The AddReturnTrackingInput
object must contain the following attributes:
Attribute | Data Type | Description |
---|---|---|
carrier_uid |
ID! | The unique ID of a ReturnShippingCarrier object |
return_uid |
ID! | The unique ID of a Return object |
tracking_number |
String! | The shipping tracking number for this return request |
Output attributes
The AddReturnTrackingOutput
object contains the following attributes.
Attribute | Data Type | Description |
---|---|---|
return |
Return | Contains details about the modified return |
return_shipping_tracking |
ReturnShippingTracking | Contains details about shipping for a 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 |