Skip to main content
POST
/
v1
/
claims
/
{sourceOrderId}
Create Claim
curl --request POST \
  --url https://api.production.orderprotection.com/v1/claims/{sourceOrderId} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "email": "claim@example.com",
  "salesChannel": "ONLINE",
  "claimCategory": "SHIPPING",
  "fulfillmentIssues": [
    {
      "sourceFulfillmentId": "123456",
      "issues": [
        {
          "issueType": "DAMAGED",
          "quantity": 1,
          "sourceProductId": "product_123",
          "sourceVariantId": "variant_123",
          "sourceItemId": "item_123",
          "details": "The seal on the product showed up broken. There was powder all over the box.",
          "images": [
            "https://cdn.orderprotection.com/claim/bad-product.jpg"
          ]
        }
      ]
    }
  ],
  "resolution": {
    "customerSignature": "https://cdn.orderprotection.com/signature/customer-signature.jpg",
    "desiredMethod": "REFUND",
    "warrantyPeriod": "P1Y"
  },
  "claimFiledFrom": "EXTERNAL",
  "options": {
    "fromValet": false,
    "requireCustomerSignature": false
  }
}
'
import requests

url = "https://api.production.orderprotection.com/v1/claims/{sourceOrderId}"

payload = {
"email": "claim@example.com",
"salesChannel": "ONLINE",
"claimCategory": "SHIPPING",
"fulfillmentIssues": [
{
"sourceFulfillmentId": "123456",
"issues": [
{
"issueType": "DAMAGED",
"quantity": 1,
"sourceProductId": "product_123",
"sourceVariantId": "variant_123",
"sourceItemId": "item_123",
"details": "The seal on the product showed up broken. There was powder all over the box.",
"images": ["https://cdn.orderprotection.com/claim/bad-product.jpg"]
}
]
}
],
"resolution": {
"customerSignature": "https://cdn.orderprotection.com/signature/customer-signature.jpg",
"desiredMethod": "REFUND",
"warrantyPeriod": "P1Y"
},
"claimFiledFrom": "EXTERNAL",
"options": {
"fromValet": False,
"requireCustomerSignature": False
}
}
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: 'claim@example.com',
salesChannel: 'ONLINE',
claimCategory: 'SHIPPING',
fulfillmentIssues: [
{
sourceFulfillmentId: '123456',
issues: [
{
issueType: 'DAMAGED',
quantity: 1,
sourceProductId: 'product_123',
sourceVariantId: 'variant_123',
sourceItemId: 'item_123',
details: 'The seal on the product showed up broken. There was powder all over the box.',
images: ['https://cdn.orderprotection.com/claim/bad-product.jpg']
}
]
}
],
resolution: {
customerSignature: 'https://cdn.orderprotection.com/signature/customer-signature.jpg',
desiredMethod: 'REFUND',
warrantyPeriod: 'P1Y'
},
claimFiledFrom: 'EXTERNAL',
options: {fromValet: false, requireCustomerSignature: false}
})
};

fetch('https://api.production.orderprotection.com/v1/claims/{sourceOrderId}', 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.production.orderprotection.com/v1/claims/{sourceOrderId}",
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' => 'claim@example.com',
'salesChannel' => 'ONLINE',
'claimCategory' => 'SHIPPING',
'fulfillmentIssues' => [
[
'sourceFulfillmentId' => '123456',
'issues' => [
[
'issueType' => 'DAMAGED',
'quantity' => 1,
'sourceProductId' => 'product_123',
'sourceVariantId' => 'variant_123',
'sourceItemId' => 'item_123',
'details' => 'The seal on the product showed up broken. There was powder all over the box.',
'images' => [
'https://cdn.orderprotection.com/claim/bad-product.jpg'
]
]
]
]
],
'resolution' => [
'customerSignature' => 'https://cdn.orderprotection.com/signature/customer-signature.jpg',
'desiredMethod' => 'REFUND',
'warrantyPeriod' => 'P1Y'
],
'claimFiledFrom' => 'EXTERNAL',
'options' => [
'fromValet' => false,
'requireCustomerSignature' => false
]
]),
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 := "https://api.production.orderprotection.com/v1/claims/{sourceOrderId}"

payload := strings.NewReader("{\n \"email\": \"claim@example.com\",\n \"salesChannel\": \"ONLINE\",\n \"claimCategory\": \"SHIPPING\",\n \"fulfillmentIssues\": [\n {\n \"sourceFulfillmentId\": \"123456\",\n \"issues\": [\n {\n \"issueType\": \"DAMAGED\",\n \"quantity\": 1,\n \"sourceProductId\": \"product_123\",\n \"sourceVariantId\": \"variant_123\",\n \"sourceItemId\": \"item_123\",\n \"details\": \"The seal on the product showed up broken. There was powder all over the box.\",\n \"images\": [\n \"https://cdn.orderprotection.com/claim/bad-product.jpg\"\n ]\n }\n ]\n }\n ],\n \"resolution\": {\n \"customerSignature\": \"https://cdn.orderprotection.com/signature/customer-signature.jpg\",\n \"desiredMethod\": \"REFUND\",\n \"warrantyPeriod\": \"P1Y\"\n },\n \"claimFiledFrom\": \"EXTERNAL\",\n \"options\": {\n \"fromValet\": false,\n \"requireCustomerSignature\": false\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("https://api.production.orderprotection.com/v1/claims/{sourceOrderId}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"email\": \"claim@example.com\",\n \"salesChannel\": \"ONLINE\",\n \"claimCategory\": \"SHIPPING\",\n \"fulfillmentIssues\": [\n {\n \"sourceFulfillmentId\": \"123456\",\n \"issues\": [\n {\n \"issueType\": \"DAMAGED\",\n \"quantity\": 1,\n \"sourceProductId\": \"product_123\",\n \"sourceVariantId\": \"variant_123\",\n \"sourceItemId\": \"item_123\",\n \"details\": \"The seal on the product showed up broken. There was powder all over the box.\",\n \"images\": [\n \"https://cdn.orderprotection.com/claim/bad-product.jpg\"\n ]\n }\n ]\n }\n ],\n \"resolution\": {\n \"customerSignature\": \"https://cdn.orderprotection.com/signature/customer-signature.jpg\",\n \"desiredMethod\": \"REFUND\",\n \"warrantyPeriod\": \"P1Y\"\n },\n \"claimFiledFrom\": \"EXTERNAL\",\n \"options\": {\n \"fromValet\": false,\n \"requireCustomerSignature\": false\n }\n}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.production.orderprotection.com/v1/claims/{sourceOrderId}")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"email\": \"claim@example.com\",\n \"salesChannel\": \"ONLINE\",\n \"claimCategory\": \"SHIPPING\",\n \"fulfillmentIssues\": [\n {\n \"sourceFulfillmentId\": \"123456\",\n \"issues\": [\n {\n \"issueType\": \"DAMAGED\",\n \"quantity\": 1,\n \"sourceProductId\": \"product_123\",\n \"sourceVariantId\": \"variant_123\",\n \"sourceItemId\": \"item_123\",\n \"details\": \"The seal on the product showed up broken. There was powder all over the box.\",\n \"images\": [\n \"https://cdn.orderprotection.com/claim/bad-product.jpg\"\n ]\n }\n ]\n }\n ],\n \"resolution\": {\n \"customerSignature\": \"https://cdn.orderprotection.com/signature/customer-signature.jpg\",\n \"desiredMethod\": \"REFUND\",\n \"warrantyPeriod\": \"P1Y\"\n },\n \"claimFiledFrom\": \"EXTERNAL\",\n \"options\": {\n \"fromValet\": false,\n \"requireCustomerSignature\": false\n }\n}"

response = http.request(request)
puts response.read_body
{
  "status": "ok"
}
{
"message": "Unauthorized",
"statusCode": 401
}
{
"message": "order not found",
"statusCode": 404
}
Shipping and Warranty claims for orders that were made on your online store.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

sourceOrderId
string
required

Body

application/json
email
string
required
Example:

"claim@example.com"

salesChannel
enum<string>
default:ONLINE
required

The sales channel for the claim

Available options:
ONLINE,
IN_STORE
Example:

"ONLINE"

claimCategory
enum<string>
default:SHIPPING
required

The category of the claim

Available options:
SHIPPING,
WARRANTY
Example:

"SHIPPING"

fulfillmentIssues
object[]
required
Example:
[
{
"sourceFulfillmentId": "123456",
"issues": [
{
"issueType": "DAMAGED",
"quantity": 1,
"sourceProductId": "product_123",
"sourceVariantId": "variant_123",
"sourceItemId": "item_123",
"details": "The seal on the product showed up broken. There was powder all over the box.",
"images": [
"https://cdn.orderprotection.com/claim/bad-product.jpg"
]
}
]
}
]
resolution
object
required
claimFiledFrom
enum<string>
default:EXTERNAL

Indicates where the claim was filed from

Available options:
EXTERNAL,
INTERNAL
Example:

"EXTERNAL"

options
object

Additional options for claim creation

Response

status
string
required
read-only
Example:

"ok"