rmaOrderCompleteProcessing
Marks an RMA order's processing as complete. Transitions the processing status from PROCESSING to COMPLETE. This is a terminal state indicating that all items have been received, inspected, and any financial resolutions have been initiated.
Required scope: edit_rma_orders
Mutation
graphql
mutation RmaOrderCompleteProcessing($id: String!) {
rmaOrderCompleteProcessing(id: $id) {
id
returnNumber
returnReference
processingStatus
deliveryStatus
financialStatus
fulfillmentStatus
expectedResolution
}
}Arguments
| Argument | Type | Required | Description |
|---|---|---|---|
id | String | ✅ | Internal UUID of the RMA order to complete |
Example Variables
json
{
"id": "550e8400-e29b-41d4-a716-446655440000"
}Example Response
json
{
"data": {
"rmaOrderCompleteProcessing": {
"id": "550e8400-e29b-41d4-a716-446655440000",
"returnNumber": 1001,
"returnReference": "RMA-2024-1001",
"processingStatus": "COMPLETE",
"deliveryStatus": "DELIVERED",
"financialStatus": "REFUNDED",
"fulfillmentStatus": "COMPLETE",
"expectedResolution": "REFUND"
}
}
}TIP
If autoGenerateFinancialResolution was set to true on the RMA order, the financial resolution will be automatically created when processing is completed. If autoExecuteFinancialResolution is also true, the refund will be executed immediately.
Code Examples
bash
curl -X POST https://api-v3.happycolis.com/graphql \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-d '{
"query": "mutation RmaOrderCompleteProcessing($id: String!) { rmaOrderCompleteProcessing(id: $id) { id returnNumber returnReference processingStatus financialStatus fulfillmentStatus } }",
"variables": {
"id": "550e8400-e29b-41d4-a716-446655440000"
}
}'js
const mutation = `
mutation RmaOrderCompleteProcessing($id: String!) {
rmaOrderCompleteProcessing(id: $id) {
id
returnNumber
returnReference
processingStatus
financialStatus
fulfillmentStatus
}
}
`;
const response = await fetch('https://api-v3.happycolis.com/graphql', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'Authorization': `Bearer ${process.env.ACCESS_TOKEN}`,
},
body: JSON.stringify({
query: mutation,
variables: { id: '550e8400-e29b-41d4-a716-446655440000' },
}),
});
const { data } = await response.json();
console.log(data.rmaOrderCompleteProcessing);python
import os
import requests
mutation = """
mutation RmaOrderCompleteProcessing($id: String!) {
rmaOrderCompleteProcessing(id: $id) {
id
returnNumber
returnReference
processingStatus
financialStatus
fulfillmentStatus
}
}
"""
response = requests.post(
'https://api-v3.happycolis.com/graphql',
headers={'Authorization': f'Bearer {os.environ["ACCESS_TOKEN"]}'},
json={
'query': mutation,
'variables': {'id': '550e8400-e29b-41d4-a716-446655440000'},
},
)
data = response.json()['data']
print(data['rmaOrderCompleteProcessing'])php
<?php
$mutation = <<<'GQL'
mutation RmaOrderCompleteProcessing($id: String!) {
rmaOrderCompleteProcessing(id: $id) {
id
returnNumber
returnReference
processingStatus
financialStatus
fulfillmentStatus
}
}
GQL;
$ch = curl_init('https://api-v3.happycolis.com/graphql');
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_POST => true,
CURLOPT_POSTFIELDS => json_encode([
'query' => $mutation,
'variables' => ['id' => '550e8400-e29b-41d4-a716-446655440000'],
]),
CURLOPT_HTTPHEADER => [
'Content-Type: application/json',
'Authorization: Bearer ' . getenv('ACCESS_TOKEN'),
],
]);
$result = json_decode(curl_exec($ch), true);
curl_close($ch);
print_r($result['data']['rmaOrderCompleteProcessing']);go
package main
import (
"bytes"
"encoding/json"
"fmt"
"net/http"
"os"
)
func main() {
mutation := `
mutation RmaOrderCompleteProcessing($id: String!) {
rmaOrderCompleteProcessing(id: $id) {
id
returnNumber
returnReference
processingStatus
financialStatus
fulfillmentStatus
}
}`
body, _ := json.Marshal(map[string]any{
"query": mutation,
"variables": map[string]any{"id": "550e8400-e29b-41d4-a716-446655440000"},
})
req, _ := http.NewRequest("POST", "https://api-v3.happycolis.com/graphql", bytes.NewBuffer(body))
req.Header.Set("Content-Type", "application/json")
req.Header.Set("Authorization", "Bearer "+os.Getenv("ACCESS_TOKEN"))
resp, _ := http.DefaultClient.Do(req)
defer resp.Body.Close()
var result map[string]any
json.NewDecoder(resp.Body).Decode(&result)
fmt.Println(result["data"])
}