Order
Create return
Creates a new return.
POST/API/Order/{orderId}/Return
Request Example
curl -X POST 'https://mgmtapi.geins.io/API/Order/{orderId}/Return' \
-H 'Accept: application/json' \
-H 'Content-Type: application/json' \
-H 'Authorization: Basic [USER-CREDENTIALS-BASE64-ENCODED]' \
-H 'X-ApiKey: {MGMT_API_KEY}'\
-d '{
"ShippingFeeRefund": 0,
"PaymentFeeRefund": 0,
"ReturnFee": 0,
"AdminUserId": 0,
"Author": "string",
"Reference": "string",
"Description": "string",
"SkipReturnEvents": true,
"SkipProductEvents": true,
"SkipRefundEvents": true,
"RefundsRequireApproval": true,
"ReturnRows": [
{
"OrderRowId": 0,
"ReturnCode": 0,
"ReturnAction": 0,
"RefundAmount": 0,
"Restock": true
}
],
"Settled": true
}'
import axios from 'axios';
const config = {
method: 'POST',
url: 'https://mgmtapi.geins.io/API/Order/{orderId}/Return',
headers: {
'Accept': 'application/json',
'Content-Type': 'application/json',
'Authorization': 'Basic [USER-CREDENTIALS-BASE64-ENCODED]',
'X-ApiKey': '{MGMT_API_KEY}'
},
data: {
"ShippingFeeRefund": 0,
"PaymentFeeRefund": 0,
"ReturnFee": 0,
"AdminUserId": 0,
"Author": "string",
"Reference": "string",
"Description": "string",
"SkipReturnEvents": true,
"SkipProductEvents": true,
"SkipRefundEvents": true,
"RefundsRequireApproval": true,
"ReturnRows": [
{
"OrderRowId": 0,
"ReturnCode": 0,
"ReturnAction": 0,
"RefundAmount": 0,
"Restock": true
}
],
"Settled": true
}
};
axios.request(config)
.then(response => response.data)
.catch(error => console.error(error));
fetch('https://mgmtapi.geins.io/API/Order/{orderId}/Return', {
method: 'POST',
headers: {
'Accept': 'application/json',
'Content-Type': 'application/json',
'Authorization': 'Basic [USER-CREDENTIALS-BASE64-ENCODED]',
'X-ApiKey': '{MGMT_API_KEY}'
},
body: JSON.stringify({
"ShippingFeeRefund": 0,
"PaymentFeeRefund": 0,
"ReturnFee": 0,
"AdminUserId": 0,
"Author": "string",
"Reference": "string",
"Description": "string",
"SkipReturnEvents": true,
"SkipProductEvents": true,
"SkipRefundEvents": true,
"RefundsRequireApproval": true,
"ReturnRows": [
{
"OrderRowId": 0,
"ReturnCode": 0,
"ReturnAction": 0,
"RefundAmount": 0,
"Restock": true
}
],
"Settled": true
})
})
.then(res => res.json())
.then((response) => response)
.catch(console.error);
import requests
url = "https://mgmtapi.geins.io/API/Order/{orderId}/Return"
headers = {
'Accept': 'application/json',
'Content-Type': 'application/json',
'Authorization': 'Basic [USER-CREDENTIALS-BASE64-ENCODED]',
'X-ApiKey': '{MGMT_API_KEY}'
}
payload = {
"ShippingFeeRefund": 0,
"PaymentFeeRefund": 0,
"ReturnFee": 0,
"AdminUserId": 0,
"Author": "string",
"Reference": "string",
"Description": "string",
"SkipReturnEvents": true,
"SkipProductEvents": true,
"SkipRefundEvents": true,
"RefundsRequireApproval": true,
"ReturnRows": [
{
"OrderRowId": 0,
"ReturnCode": 0,
"ReturnAction": 0,
"RefundAmount": 0,
"Restock": true
}
],
"Settled": true
}
response = requests.POST(url, json=payload, headers=headers)
print(response.json())
package main
import (
"bytes"
"fmt"
"io"
"net/http"
)
func main() {
url := "https://mgmtapi.geins.io/API/Order/{orderId}/Return"
payload := []byte(`{
"ShippingFeeRefund": 0,
"PaymentFeeRefund": 0,
"ReturnFee": 0,
"AdminUserId": 0,
"Author": "string",
"Reference": "string",
"Description": "string",
"SkipReturnEvents": true,
"SkipProductEvents": true,
"SkipRefundEvents": true,
"RefundsRequireApproval": true,
"ReturnRows": [
{
"OrderRowId": 0,
"ReturnCode": 0,
"ReturnAction": 0,
"RefundAmount": 0,
"Restock": true
}
],
"Settled": true
}`)
req, _ := http.NewRequest("POST", url, bytes.NewBuffer(payload))
req.Header.Add("Accept", "application/json")
req.Header.Add("Content-Type", "application/json")
req.Header.Add("Authorization", "Basic [USER-CREDENTIALS-BASE64-ENCODED]")
req.Header.Add("X-ApiKey", "{MGMT_API_KEY}")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}
using System.Text;
using System.Text.Json;
using System.Net.Http;
using var client = new HttpClient();
client.DefaultRequestHeaders.Add("Authorization", "Basic [USER-CREDENTIALS-BASE64-ENCODED]");
client.DefaultRequestHeaders.Add("X-ApiKey", "{MGMT_API_KEY}");
var body = new
{
ShippingFeeRefund = 0,
PaymentFeeRefund = 0,
ReturnFee = 0,
AdminUserId = 0,
Author = "string",
Reference = "string",
Description = "string",
SkipReturnEvents = true,
SkipProductEvents = true,
SkipRefundEvents = true,
RefundsRequireApproval = true,
ReturnRows = new[]
{
new
{
OrderRowId = 0,
ReturnCode = 0,
ReturnAction = 0,
RefundAmount = 0,
Restock = true
}
},
Settled = true
};
var jsonContent = JsonSerializer.Serialize(body);
var content = new StringContent(jsonContent, Encoding.UTF8, "application/json");
var response = await client.POSTAsync("https://mgmtapi.geins.io/API/Order/{orderId}/Return", content);
var result = await response.Content.ReadAsStringAsync();
Console.WriteLine(result);
Response
{
"Resource": 0,
"Message": "string",
"Details": [
"string"
]
}
{
"Resource": 0,
"Message": "string",
"Details": [
"string"
]
}
{
"Resource": 0,
"Message": "string",
"Details": [
"string"
]
}