Create Fraud Report
curl --request POST \
--url https://api.loopreturns.com/api/v1/returns/{id}/fraud-report \
--header 'Content-Type: application/json' \
--header 'X-Authorization: <api-key>' \
--data '
{
"comment": "This is a sample comment."
}
'import requests
url = "https://api.loopreturns.com/api/v1/returns/{id}/fraud-report"
payload = { "comment": "This is a sample comment." }
headers = {
"X-Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-Authorization': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({comment: 'This is a sample comment.'})
};
fetch('https://api.loopreturns.com/api/v1/returns/{id}/fraud-report', 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.loopreturns.com/api/v1/returns/{id}/fraud-report",
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([
'comment' => 'This is a sample comment.'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-Authorization: <api-key>"
],
]);
$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 := "https://api.loopreturns.com/api/v1/returns/{id}/fraud-report"
payload := strings.NewReader("{\n \"comment\": \"This is a sample comment.\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-Authorization", "<api-key>")
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("https://api.loopreturns.com/api/v1/returns/{id}/fraud-report")
.header("X-Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"comment\": \"This is a sample comment.\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.loopreturns.com/api/v1/returns/{id}/fraud-report")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"comment\": \"This is a sample comment.\"\n}"
response = http.request(request)
puts response.read_body{
"category": "package-never-received",
"created_at": "2024-10-25T16:44:47.038Z",
"return_id": 23141,
"id": 87,
"comment": "This is a sample comment."
}{
"errors": "Unauthorized."
}{
"errors": {
"message": "No return found with this ID."
}
}{
"errors": {
"message": "Fraud report already exists."
}
}{
"message": "Must be one of the following values: package-never-received, package-is-empty, package-is-missing-items, instant-return-charge-failed, keep-item-abuse, splitting-returns-to-avoid-restrictions, item-is-worn, other",
"errors": {}
}Fraud Reports
Create Fraud Report
Attach a fraud report to a return.
Required API key scope
- Returns
POST
/
returns
/
{id}
/
fraud-report
Create Fraud Report
curl --request POST \
--url https://api.loopreturns.com/api/v1/returns/{id}/fraud-report \
--header 'Content-Type: application/json' \
--header 'X-Authorization: <api-key>' \
--data '
{
"comment": "This is a sample comment."
}
'import requests
url = "https://api.loopreturns.com/api/v1/returns/{id}/fraud-report"
payload = { "comment": "This is a sample comment." }
headers = {
"X-Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-Authorization': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({comment: 'This is a sample comment.'})
};
fetch('https://api.loopreturns.com/api/v1/returns/{id}/fraud-report', 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.loopreturns.com/api/v1/returns/{id}/fraud-report",
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([
'comment' => 'This is a sample comment.'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-Authorization: <api-key>"
],
]);
$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 := "https://api.loopreturns.com/api/v1/returns/{id}/fraud-report"
payload := strings.NewReader("{\n \"comment\": \"This is a sample comment.\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-Authorization", "<api-key>")
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("https://api.loopreturns.com/api/v1/returns/{id}/fraud-report")
.header("X-Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"comment\": \"This is a sample comment.\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.loopreturns.com/api/v1/returns/{id}/fraud-report")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"comment\": \"This is a sample comment.\"\n}"
response = http.request(request)
puts response.read_body{
"category": "package-never-received",
"created_at": "2024-10-25T16:44:47.038Z",
"return_id": 23141,
"id": 87,
"comment": "This is a sample comment."
}{
"errors": "Unauthorized."
}{
"errors": {
"message": "No return found with this ID."
}
}{
"errors": {
"message": "Fraud report already exists."
}
}{
"message": "Must be one of the following values: package-never-received, package-is-empty, package-is-missing-items, instant-return-charge-failed, keep-item-abuse, splitting-returns-to-avoid-restrictions, item-is-worn, other",
"errors": {}
}Authorizations
Path Parameters
The return's unique identifier.
Body
application/json
The category under which the fraudulent return falls.
Available options:
package-never-received, package-is-empty, package-is-missing-items, instant-return-charge-failed, keep-item-abuse, splitting-returns-to-avoid-restrictions, item-is-worn, other, null Any additional context associated with the fraudulent return.
Maximum string length:
512Example:
"This is a sample comment."
Response
Success
The category under which the fraudulent return falls.
Available options:
package-never-received, package-is-empty, package-is-missing-items, instant-return-charge-failed, keep-item-abuse, splitting-returns-to-avoid-restrictions, item-is-worn, other The date and time at which the fraud report was created.
Example:
"2024-10-25T16:44:47.038Z"
The return's unique identifier.
Example:
23141
The fraud report's unique identifier.
Example:
87
Any additional context associated with the fraudulent return. This property is required if the category is set to other.
Example:
"This is a sample comment."