Create Manual Return
curl --request POST \
--url http://api.withzimi.com/returns \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"email": "customer@example.com",
"receive_by": "2024-09-01",
"total_price": 100,
"currency": "USD",
"weight": 23,
"weight_unit": "g",
"reason_of_return": "This is reason",
"length": 10,
"width": 10,
"height": 10,
"dimension_unit": "cm",
"return_line_items": [
{
"quantity": 1,
"unreceived_quantity": 0,
"name": "Product A",
"price": 119,
"currency": "USD",
"merchant_sku": "GHSAK42157614 - M"
},
{
"quantity": 2,
"unreceived_quantity": 1,
"name": "Product B",
"price": 25,
"currency": "USD",
"merchant_sku": "SKU67890"
}
]
}
'import requests
url = "http://api.withzimi.com/returns"
payload = {
"email": "customer@example.com",
"receive_by": "2024-09-01",
"total_price": 100,
"currency": "USD",
"weight": 23,
"weight_unit": "g",
"reason_of_return": "This is reason",
"length": 10,
"width": 10,
"height": 10,
"dimension_unit": "cm",
"return_line_items": [
{
"quantity": 1,
"unreceived_quantity": 0,
"name": "Product A",
"price": 119,
"currency": "USD",
"merchant_sku": "GHSAK42157614 - M"
},
{
"quantity": 2,
"unreceived_quantity": 1,
"name": "Product B",
"price": 25,
"currency": "USD",
"merchant_sku": "SKU67890"
}
]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
email: 'customer@example.com',
receive_by: '2024-09-01',
total_price: 100,
currency: 'USD',
weight: 23,
weight_unit: 'g',
reason_of_return: 'This is reason',
length: 10,
width: 10,
height: 10,
dimension_unit: 'cm',
return_line_items: [
{
quantity: 1,
unreceived_quantity: 0,
name: 'Product A',
price: 119,
currency: 'USD',
merchant_sku: 'GHSAK42157614 - M'
},
{
quantity: 2,
unreceived_quantity: 1,
name: 'Product B',
price: 25,
currency: 'USD',
merchant_sku: 'SKU67890'
}
]
})
};
fetch('http://api.withzimi.com/returns', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "http://api.withzimi.com/returns",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'email' => 'customer@example.com',
'receive_by' => '2024-09-01',
'total_price' => 100,
'currency' => 'USD',
'weight' => 23,
'weight_unit' => 'g',
'reason_of_return' => 'This is reason',
'length' => 10,
'width' => 10,
'height' => 10,
'dimension_unit' => 'cm',
'return_line_items' => [
[
'quantity' => 1,
'unreceived_quantity' => 0,
'name' => 'Product A',
'price' => 119,
'currency' => 'USD',
'merchant_sku' => 'GHSAK42157614 - M'
],
[
'quantity' => 2,
'unreceived_quantity' => 1,
'name' => 'Product B',
'price' => 25,
'currency' => 'USD',
'merchant_sku' => 'SKU67890'
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "http://api.withzimi.com/returns"
payload := strings.NewReader("{\n \"email\": \"customer@example.com\",\n \"receive_by\": \"2024-09-01\",\n \"total_price\": 100,\n \"currency\": \"USD\",\n \"weight\": 23,\n \"weight_unit\": \"g\",\n \"reason_of_return\": \"This is reason\",\n \"length\": 10,\n \"width\": 10,\n \"height\": 10,\n \"dimension_unit\": \"cm\",\n \"return_line_items\": [\n {\n \"quantity\": 1,\n \"unreceived_quantity\": 0,\n \"name\": \"Product A\",\n \"price\": 119,\n \"currency\": \"USD\",\n \"merchant_sku\": \"GHSAK42157614 - M\"\n },\n {\n \"quantity\": 2,\n \"unreceived_quantity\": 1,\n \"name\": \"Product B\",\n \"price\": 25,\n \"currency\": \"USD\",\n \"merchant_sku\": \"SKU67890\"\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("http://api.withzimi.com/returns")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"email\": \"customer@example.com\",\n \"receive_by\": \"2024-09-01\",\n \"total_price\": 100,\n \"currency\": \"USD\",\n \"weight\": 23,\n \"weight_unit\": \"g\",\n \"reason_of_return\": \"This is reason\",\n \"length\": 10,\n \"width\": 10,\n \"height\": 10,\n \"dimension_unit\": \"cm\",\n \"return_line_items\": [\n {\n \"quantity\": 1,\n \"unreceived_quantity\": 0,\n \"name\": \"Product A\",\n \"price\": 119,\n \"currency\": \"USD\",\n \"merchant_sku\": \"GHSAK42157614 - M\"\n },\n {\n \"quantity\": 2,\n \"unreceived_quantity\": 1,\n \"name\": \"Product B\",\n \"price\": 25,\n \"currency\": \"USD\",\n \"merchant_sku\": \"SKU67890\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("http://api.withzimi.com/returns")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"email\": \"customer@example.com\",\n \"receive_by\": \"2024-09-01\",\n \"total_price\": 100,\n \"currency\": \"USD\",\n \"weight\": 23,\n \"weight_unit\": \"g\",\n \"reason_of_return\": \"This is reason\",\n \"length\": 10,\n \"width\": 10,\n \"height\": 10,\n \"dimension_unit\": \"cm\",\n \"return_line_items\": [\n {\n \"quantity\": 1,\n \"unreceived_quantity\": 0,\n \"name\": \"Product A\",\n \"price\": 119,\n \"currency\": \"USD\",\n \"merchant_sku\": \"GHSAK42157614 - M\"\n },\n {\n \"quantity\": 2,\n \"unreceived_quantity\": 1,\n \"name\": \"Product B\",\n \"price\": 25,\n \"currency\": \"USD\",\n \"merchant_sku\": \"SKU67890\"\n }\n ]\n}"
response = http.request(request)
puts response.read_bodyCore Returns Management
Create Return
POST
/
returns
Create Manual Return
curl --request POST \
--url http://api.withzimi.com/returns \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"email": "customer@example.com",
"receive_by": "2024-09-01",
"total_price": 100,
"currency": "USD",
"weight": 23,
"weight_unit": "g",
"reason_of_return": "This is reason",
"length": 10,
"width": 10,
"height": 10,
"dimension_unit": "cm",
"return_line_items": [
{
"quantity": 1,
"unreceived_quantity": 0,
"name": "Product A",
"price": 119,
"currency": "USD",
"merchant_sku": "GHSAK42157614 - M"
},
{
"quantity": 2,
"unreceived_quantity": 1,
"name": "Product B",
"price": 25,
"currency": "USD",
"merchant_sku": "SKU67890"
}
]
}
'import requests
url = "http://api.withzimi.com/returns"
payload = {
"email": "customer@example.com",
"receive_by": "2024-09-01",
"total_price": 100,
"currency": "USD",
"weight": 23,
"weight_unit": "g",
"reason_of_return": "This is reason",
"length": 10,
"width": 10,
"height": 10,
"dimension_unit": "cm",
"return_line_items": [
{
"quantity": 1,
"unreceived_quantity": 0,
"name": "Product A",
"price": 119,
"currency": "USD",
"merchant_sku": "GHSAK42157614 - M"
},
{
"quantity": 2,
"unreceived_quantity": 1,
"name": "Product B",
"price": 25,
"currency": "USD",
"merchant_sku": "SKU67890"
}
]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
email: 'customer@example.com',
receive_by: '2024-09-01',
total_price: 100,
currency: 'USD',
weight: 23,
weight_unit: 'g',
reason_of_return: 'This is reason',
length: 10,
width: 10,
height: 10,
dimension_unit: 'cm',
return_line_items: [
{
quantity: 1,
unreceived_quantity: 0,
name: 'Product A',
price: 119,
currency: 'USD',
merchant_sku: 'GHSAK42157614 - M'
},
{
quantity: 2,
unreceived_quantity: 1,
name: 'Product B',
price: 25,
currency: 'USD',
merchant_sku: 'SKU67890'
}
]
})
};
fetch('http://api.withzimi.com/returns', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "http://api.withzimi.com/returns",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'email' => 'customer@example.com',
'receive_by' => '2024-09-01',
'total_price' => 100,
'currency' => 'USD',
'weight' => 23,
'weight_unit' => 'g',
'reason_of_return' => 'This is reason',
'length' => 10,
'width' => 10,
'height' => 10,
'dimension_unit' => 'cm',
'return_line_items' => [
[
'quantity' => 1,
'unreceived_quantity' => 0,
'name' => 'Product A',
'price' => 119,
'currency' => 'USD',
'merchant_sku' => 'GHSAK42157614 - M'
],
[
'quantity' => 2,
'unreceived_quantity' => 1,
'name' => 'Product B',
'price' => 25,
'currency' => 'USD',
'merchant_sku' => 'SKU67890'
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "http://api.withzimi.com/returns"
payload := strings.NewReader("{\n \"email\": \"customer@example.com\",\n \"receive_by\": \"2024-09-01\",\n \"total_price\": 100,\n \"currency\": \"USD\",\n \"weight\": 23,\n \"weight_unit\": \"g\",\n \"reason_of_return\": \"This is reason\",\n \"length\": 10,\n \"width\": 10,\n \"height\": 10,\n \"dimension_unit\": \"cm\",\n \"return_line_items\": [\n {\n \"quantity\": 1,\n \"unreceived_quantity\": 0,\n \"name\": \"Product A\",\n \"price\": 119,\n \"currency\": \"USD\",\n \"merchant_sku\": \"GHSAK42157614 - M\"\n },\n {\n \"quantity\": 2,\n \"unreceived_quantity\": 1,\n \"name\": \"Product B\",\n \"price\": 25,\n \"currency\": \"USD\",\n \"merchant_sku\": \"SKU67890\"\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("http://api.withzimi.com/returns")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"email\": \"customer@example.com\",\n \"receive_by\": \"2024-09-01\",\n \"total_price\": 100,\n \"currency\": \"USD\",\n \"weight\": 23,\n \"weight_unit\": \"g\",\n \"reason_of_return\": \"This is reason\",\n \"length\": 10,\n \"width\": 10,\n \"height\": 10,\n \"dimension_unit\": \"cm\",\n \"return_line_items\": [\n {\n \"quantity\": 1,\n \"unreceived_quantity\": 0,\n \"name\": \"Product A\",\n \"price\": 119,\n \"currency\": \"USD\",\n \"merchant_sku\": \"GHSAK42157614 - M\"\n },\n {\n \"quantity\": 2,\n \"unreceived_quantity\": 1,\n \"name\": \"Product B\",\n \"price\": 25,\n \"currency\": \"USD\",\n \"merchant_sku\": \"SKU67890\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("http://api.withzimi.com/returns")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"email\": \"customer@example.com\",\n \"receive_by\": \"2024-09-01\",\n \"total_price\": 100,\n \"currency\": \"USD\",\n \"weight\": 23,\n \"weight_unit\": \"g\",\n \"reason_of_return\": \"This is reason\",\n \"length\": 10,\n \"width\": 10,\n \"height\": 10,\n \"dimension_unit\": \"cm\",\n \"return_line_items\": [\n {\n \"quantity\": 1,\n \"unreceived_quantity\": 0,\n \"name\": \"Product A\",\n \"price\": 119,\n \"currency\": \"USD\",\n \"merchant_sku\": \"GHSAK42157614 - M\"\n },\n {\n \"quantity\": 2,\n \"unreceived_quantity\": 1,\n \"name\": \"Product B\",\n \"price\": 25,\n \"currency\": \"USD\",\n \"merchant_sku\": \"SKU67890\"\n }\n ]\n}"
response = http.request(request)
puts response.read_bodyAuthorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
application/json
The body is of type any.
Response
200 - undefined
