Retrieve Return
curl --request GET \
--url https://api.zinc.io/v1/returns/{request_id} \
--header 'Authorization: Basic <encoded-value>'import requests
url = "https://api.zinc.io/v1/returns/{request_id}"
headers = {"Authorization": "Basic <encoded-value>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Basic <encoded-value>'}};
fetch('https://api.zinc.io/v1/returns/{request_id}', 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 => "https://api.zinc.io/v1/returns/{request_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Basic <encoded-value>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.zinc.io/v1/returns/{request_id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Basic <encoded-value>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.zinc.io/v1/returns/{request_id}")
.header("Authorization", "Basic <encoded-value>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.zinc.io/v1/returns/{request_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Basic <encoded-value>'
response = http.request(request)
puts response.read_body{
"_type": "return_response",
"merchant_return_id": "<string>",
"return_by": "<string>",
"label_urls": [
"<string>"
],
"request": {}
}{
"_type": "error",
"code": "return_in_progress",
"message": "<string>",
"data": {
"status": {
"status": "<string>",
"description": "<string>"
},
"error": "<string>"
},
"request": {}
}Cancellations & Returns
Retrieve Return
Retrieve the status of a return
GET
/
v1
/
returns
/
{request_id}
Retrieve Return
curl --request GET \
--url https://api.zinc.io/v1/returns/{request_id} \
--header 'Authorization: Basic <encoded-value>'import requests
url = "https://api.zinc.io/v1/returns/{request_id}"
headers = {"Authorization": "Basic <encoded-value>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Basic <encoded-value>'}};
fetch('https://api.zinc.io/v1/returns/{request_id}', 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 => "https://api.zinc.io/v1/returns/{request_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Basic <encoded-value>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.zinc.io/v1/returns/{request_id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Basic <encoded-value>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.zinc.io/v1/returns/{request_id}")
.header("Authorization", "Basic <encoded-value>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.zinc.io/v1/returns/{request_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Basic <encoded-value>'
response = http.request(request)
puts response.read_body{
"_type": "return_response",
"merchant_return_id": "<string>",
"return_by": "<string>",
"label_urls": [
"<string>"
],
"request": {}
}{
"_type": "error",
"code": "return_in_progress",
"message": "<string>",
"data": {
"status": {
"status": "<string>",
"description": "<string>"
},
"error": "<string>"
},
"request": {}
}Authorizations
Use your client token as the username. Leave the password blank.
Path Parameters
The unique identifier for the return request
Response
Return details retrieved successfully
Response type
Available options:
return_response A unique identifier for the return
The date before which the products must be returned by
A list of URLs for the generated return labels
The original order request that was sent to the Zinc API
⌘I

