Skip to content
This repository was archived by the owner on Nov 19, 2024. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 22 additions & 2 deletions src/_data/toc/graphql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,16 @@ pages:
url: /graphql/mutations/add-products-to-wishlist.html
exclude_versions: ["2.3"]

- label: addReturnComment mutation
url: /graphql/mutations/add-return-comment.html
edition: ee-only
exclude_versions: ["2.3"]

- label: addReturnTracking mutation
url: /graphql/mutations/add-return-tracking.html
edition: ee-only
exclude_versions: ["2.3"]

- label: addSimpleProductsToCart mutation
url: /graphql/mutations/add-simple-products.html

Expand Down Expand Up @@ -341,6 +351,11 @@ pages:
url: /graphql/mutations/remove-products-from-wishlist.html
exclude_versions: ["2.3"]

- label: removeReturnTracking mutation
url: /graphql/mutations/remove-return-tracking.html
edition: ee-only
exclude_versions: ["2.3"]

- label: removeRewardPointsFromCart mutation
url: /graphql/mutations/remove-reward-points.html
edition: ee-only
Expand All @@ -363,13 +378,18 @@ pages:
url: /graphql/mutations/request-password-reset-email.html
exclude_versions: ["2.3"]

- label: revokeCustomerToken mutation
url: /graphql/mutations/revoke-customer-token.html
- label: requestReturn mutation
url: /graphql/mutations/request-return.html
edition: ee-only
exclude_versions: ["2.3"]

- label: resetPassword mutation
url: /graphql/mutations/reset-password.html
exclude_versions: ["2.3"]

- label: revokeCustomerToken mutation
url: /graphql/mutations/revoke-customer-token.html

- label: sendEmailToFriend mutation
url: /graphql/mutations/send-email-to-friend.html

Expand Down
65 changes: 65 additions & 0 deletions src/_includes/graphql/return.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
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
`creation_date` | String! | The date the return was requested
`customer_email` | String! | Email of the person who created the return request
`customer_name` | String | 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 encoded ID of a return request

### ReturnComment attributes {#ReturnComment}

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! | An encoded ID assigned to the comment

### ReturnItem attributes {#ReturnItem}

Attribute | Data Type | Description
--- | --- | ---
`custom_attributes` | [CustomAttribute] 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 encoded ID of an item in a return request

### ReturnShipping attributes {#ReturnShipping}

Attribute | Data Type | Description
--- | --- | ---
`address`| ReturnShippingAddress | The merchant-defined return shipping address
`tracking(uid: ID)` | [ReturnShippingTracking] | If a single UID is specified, contains a single tracking record. Otherwise, contains all tracking information

### ReturnShippingCarrier attributes {#ReturnShippingCarrier}

Attribute | Data Type | Description
--- | --- | ---
`label` | String! | A description of the shipping carrier
`uid` | ID! | An encoded ID assigned to the shipping carrier

### ReturnShippingTracking attributes {#ReturnShippingTracking}

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! | An encoded ID assigned to the tracking item

### ReturnShippingTrackingStatus attributes {#ReturnShippingTrackingStatus}

Attribute | Data Type | Description
--- | --- | ---
text | String! | Text that describes the status
type | ReturnShippingTrackingStatusType! | Indicates whether the status type is informational or an error
1 change: 1 addition & 0 deletions src/_includes/graphql/store-config.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ Attribute | Data Type | Description | Default or example value
`product_reviews_enabled` | String | Indicates whether product reviews are enabled. Possible values: 1 (Yes) and 0 (No) | 1
`product_url_suffix` | String | The suffix applied to product pages, such as `.htm` or `.html` | `.html`
`required_character_classes_number` | String | The number of different character classes required in a password (lowercase, uppercase, digits, special characters). <br/>Configuration path: customer/password/required_character_classes_number | 2
`returns_enabled` | String! | Indicates whether RMA is enabled on the storefront. Possible values: enabled/disabled | disabled
`root_category_id` | Int | The ID of the root category | 2
`sales_fixed_product_tax_display_setting` | [FixedProductTaxDisplaySettings](#FixedProductTaxDisplaySettings) | Corresponds to the **Display Prices In Sales Modules** field. It indicates how Fixed Product Taxes information is displayed on cart, checkout, and order pages | FPT_DISABLED
`sales_gift_wrapping` | String | Indicates if gift wrapping prices are displayed on the Orders page. Possible values: 1 (Yes) and 0 (No) | 1
Expand Down
103 changes: 103 additions & 0 deletions src/guides/v2.4/graphql/mutations/add-return-comment.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
---
group: graphql
title: addReturnComment mutation
---

The `addReturnComment` mutation adds a comment to an existing return request.

## Syntax

```graphql
mutation: {
addReturnComment(input: AddReturnCommentInput!): AddReturnCommentOutput
}
```

## Example usage

The following example adds a comment in response to the merchant.

**Request:**

```graphql
mutation{
addReturnComment(input: {
return_uid: "Mw=="
comment_text: "I'd like a refund"})
{
return {
uid
status
comments {
uid
author_name
text
}
}
}
}
```

**Response:**

```json
{
"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 encoded ID of the return request

## Output attributes

The `AddReturnCommentOutput` object contains the `Return` object.

Attribute | Data Type | Description
--- | --- | ---
`return` | Return | Contains details about the modified return

### Return object {#Return}

{% include graphql/return.md %}

## Related topics

* [`requestReturn` mutation]({{page.baseurl}}/graphql/mutations/request-return.html)
* [`addReturnTracking` mutation]({{page.baseurl}}/graphql/mutations/add-return-tracking.html)
* [`removeReturnTracking` mutation]({{page.baseurl}}/graphql/mutations/remove-return-tracking.html)
87 changes: 87 additions & 0 deletions src/guides/v2.4/graphql/mutations/add-return-tracking.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
---
group: graphql
title: 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]({{page.baseurl}}/graphql/queries/customer.html) to retrieve valid `carrier_uid` values.

## Syntax

```graphql
mutation: {
addReturnTracking(input: AddReturnTrackingInput!): AddReturnTrackingOutput
}
```

## Example usage

The following example adds the shipping carrier and a tracking number for the specified return request.

**Request:**

```graphql
mutation{
addReturnTracking(input: {
return_uid: "Mw=="
carrier_uid: "dXBzLTE="
tracking_number: "1Z9876543"
}){
return_shipping_tracking {
uid
carrier {
uid
label
}
tracking_number
}
}
}
```

**Response:**

```json
{
"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 encoded ID of the selected shipping carrier
`return_uid` | ID! | The encoded ID of the return request
`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](#Return) | Contains details about the modified return
`return_shipping_tracking` | [ReturnShippingTracking](#ReturnShippingTracking) | Contains details about shipping for a return

### Return object {#Return}

{% include graphql/return.md %}

## Related topics

* [`requestReturn` mutation]({{page.baseurl}}/graphql/mutations/request-return.html)
* [`addReturnComment` mutation]({{page.baseurl}}/graphql/mutations/add-return-comment.html)
* [`removeReturnTracking` mutation]({{page.baseurl}}/graphql/mutations/remove-return-tracking.html)
Loading