curl --location --request POST 'https://api.stateset.com/v1/warranties/:id/replace' \
--header 'Content-Type: application/json' \
--header 'Authorization: Token <token>' \
--data-raw '{
"id": "e0901f083-aa1c-43c5-af5c-0a9d2fc64e30",
"replacement_product_id": "prod_xyz789",
"replacement_reason": "Manufacturing defect",
"shipping_address": {
"line1": "123 Main St",
"city": "New York",
"state": "NY",
"postal_code": "10001",
"country": "US"
},
"expedited_shipping": true
}'
mutation warrantyReplaceMutation {
warrantyReplace(
id: "${warrantyId}",
replacementProductId: "${replacementProductId}",
replacementReason: "${replacementReason}",
shippingAddress: ${shippingAddress},
expeditedShipping: ${expeditedShipping}
) {
warranty {
id,
status,
replacement_order_id,
replacement_status,
tracking_number
}
userErrors {
field
message
}
}
}
`;
const warranties = await stateset.warranties.replace({
id: '0901f083-aa1c-43c5-af5c-0a9d2fc64e30',
replacement_product_id: 'prod_xyz789',
replacement_reason: 'Manufacturing defect',
shipping_address: {
line1: '123 Main St',
city: 'New York',
state: 'NY',
postal_code: '10001',
country: 'US'
},
expedited_shipping: true
});
warranties = stateset.warranties.replace({
'id': '0901f083-aa1c-43c5-af5c-0a9d2fc64e30',
'replacement_product_id': 'prod_xyz789',
'replacement_reason': 'Manufacturing defect',
'shipping_address': {
'line1': '123 Main St',
'city': 'New York',
'state': 'NY',
'postal_code': '10001',
'country': 'US'
},
'expedited_shipping': True
})
warranties = Stateset::Warranty.replace({
id: '0901f083-aa1c-43c5-af5c-0a9d2fc64e30',
replacement_product_id: 'prod_xyz789',
replacement_reason: 'Manufacturing defect',
shipping_address: {
line1: '123 Main St',
city: 'New York',
state: 'NY',
postal_code: '10001',
country: 'US'
},
expedited_shipping: true
})
warranties, err := stateset.Warranties.replace({
ID: '0901f083-aa1c-43c5-af5c-0a9d2fc64e30',
ReplacementProductID: 'prod_xyz789',
ReplacementReason: 'Manufacturing defect',
ShippingAddress: Address{
Line1: '123 Main St',
City: 'New York',
State: 'NY',
PostalCode: '10001',
Country: 'US'
},
ExpeditedShipping: true
})
Warranty warranties = stateset.Warranties.replace({
id: '0901f083-aa1c-43c5-af5c-0a9d2fc64e30',
replacementProductId: 'prod_xyz789',
replacementReason: 'Manufacturing defect',
shippingAddress: {
line1: '123 Main St',
city: 'New York',
state: 'NY',
postalCode: '10001',
country: 'US'
},
expeditedShipping: true
});
$warranties = $stateset->warranties->replace([
'id' => '0901f083-aa1c-43c5-af5c-0a9d2fc64e30',
'replacement_product_id' => 'prod_xyz789',
'replacement_reason' => 'Manufacturing defect',
'shipping_address' => [
'line1' => '123 Main St',
'city' => 'New York',
'state' => 'NY',
'postal_code' => '10001',
'country' => 'US'
],
'expedited_shipping' => true
]);
var warranties = await stateset.Warranties.Replace(new {
Id = '0901f083-aa1c-43c5-af5c-0a9d2fc64e30',
ReplacementProductId = 'prod_xyz789',
ReplacementReason = 'Manufacturing defect',
ShippingAddress = new {
Line1 = '123 Main St',
City = 'New York',
State = 'NY',
PostalCode = '10001',
Country = 'US'
},
ExpeditedShipping = true
});
{
"id": "e0901f083-aa1c-43c5-af5c-0a9d2fc64e30",
"object": "warranty",
"replaced": true,
"replacement_order_id": "ord_repl_123abc",
"replacement_product_id": "prod_xyz789",
"replacement_status": "shipped",
"tracking_number": "1Z999AA10123456784",
"estimated_delivery": "2024-01-18",
"replacement_reason": "Manufacturing defect"
}
Replace Warranty Item
This endpoint processes a replacement for a warranty claim.
POST
/
v1
/
warranties
/
:id
/
replace
curl --location --request POST 'https://api.stateset.com/v1/warranties/:id/replace' \
--header 'Content-Type: application/json' \
--header 'Authorization: Token <token>' \
--data-raw '{
"id": "e0901f083-aa1c-43c5-af5c-0a9d2fc64e30",
"replacement_product_id": "prod_xyz789",
"replacement_reason": "Manufacturing defect",
"shipping_address": {
"line1": "123 Main St",
"city": "New York",
"state": "NY",
"postal_code": "10001",
"country": "US"
},
"expedited_shipping": true
}'
mutation warrantyReplaceMutation {
warrantyReplace(
id: "${warrantyId}",
replacementProductId: "${replacementProductId}",
replacementReason: "${replacementReason}",
shippingAddress: ${shippingAddress},
expeditedShipping: ${expeditedShipping}
) {
warranty {
id,
status,
replacement_order_id,
replacement_status,
tracking_number
}
userErrors {
field
message
}
}
}
`;
const warranties = await stateset.warranties.replace({
id: '0901f083-aa1c-43c5-af5c-0a9d2fc64e30',
replacement_product_id: 'prod_xyz789',
replacement_reason: 'Manufacturing defect',
shipping_address: {
line1: '123 Main St',
city: 'New York',
state: 'NY',
postal_code: '10001',
country: 'US'
},
expedited_shipping: true
});
warranties = stateset.warranties.replace({
'id': '0901f083-aa1c-43c5-af5c-0a9d2fc64e30',
'replacement_product_id': 'prod_xyz789',
'replacement_reason': 'Manufacturing defect',
'shipping_address': {
'line1': '123 Main St',
'city': 'New York',
'state': 'NY',
'postal_code': '10001',
'country': 'US'
},
'expedited_shipping': True
})
warranties = Stateset::Warranty.replace({
id: '0901f083-aa1c-43c5-af5c-0a9d2fc64e30',
replacement_product_id: 'prod_xyz789',
replacement_reason: 'Manufacturing defect',
shipping_address: {
line1: '123 Main St',
city: 'New York',
state: 'NY',
postal_code: '10001',
country: 'US'
},
expedited_shipping: true
})
warranties, err := stateset.Warranties.replace({
ID: '0901f083-aa1c-43c5-af5c-0a9d2fc64e30',
ReplacementProductID: 'prod_xyz789',
ReplacementReason: 'Manufacturing defect',
ShippingAddress: Address{
Line1: '123 Main St',
City: 'New York',
State: 'NY',
PostalCode: '10001',
Country: 'US'
},
ExpeditedShipping: true
})
Warranty warranties = stateset.Warranties.replace({
id: '0901f083-aa1c-43c5-af5c-0a9d2fc64e30',
replacementProductId: 'prod_xyz789',
replacementReason: 'Manufacturing defect',
shippingAddress: {
line1: '123 Main St',
city: 'New York',
state: 'NY',
postalCode: '10001',
country: 'US'
},
expeditedShipping: true
});
$warranties = $stateset->warranties->replace([
'id' => '0901f083-aa1c-43c5-af5c-0a9d2fc64e30',
'replacement_product_id' => 'prod_xyz789',
'replacement_reason' => 'Manufacturing defect',
'shipping_address' => [
'line1' => '123 Main St',
'city' => 'New York',
'state' => 'NY',
'postal_code' => '10001',
'country' => 'US'
],
'expedited_shipping' => true
]);
var warranties = await stateset.Warranties.Replace(new {
Id = '0901f083-aa1c-43c5-af5c-0a9d2fc64e30',
ReplacementProductId = 'prod_xyz789',
ReplacementReason = 'Manufacturing defect',
ShippingAddress = new {
Line1 = '123 Main St',
City = 'New York',
State = 'NY',
PostalCode = '10001',
Country = 'US'
},
ExpeditedShipping = true
});
{
"id": "e0901f083-aa1c-43c5-af5c-0a9d2fc64e30",
"object": "warranty",
"replaced": true,
"replacement_order_id": "ord_repl_123abc",
"replacement_product_id": "prod_xyz789",
"replacement_status": "shipped",
"tracking_number": "1Z999AA10123456784",
"estimated_delivery": "2024-01-18",
"replacement_reason": "Manufacturing defect"
}
Body
string
The ID provided in the data tab may be used to identify the warranty
string
The product ID of the replacement item
string
The reason for the replacement
object
The shipping address for the replacement item
boolean
Whether to use expedited shipping for the replacement
Response
string
The ID provided in the data tab may be used to identify the warranty
string
The object type
string
The order ID for the replacement item
string
The product ID of the replacement item
string
The status of the replacement (e.g., “pending”, “shipped”, “delivered”)
string
The tracking number for the replacement shipment
string
The estimated delivery date for the replacement
number
Indicates whether the call was successful. true if successful, false if not.
curl --location --request POST 'https://api.stateset.com/v1/warranties/:id/replace' \
--header 'Content-Type: application/json' \
--header 'Authorization: Token <token>' \
--data-raw '{
"id": "e0901f083-aa1c-43c5-af5c-0a9d2fc64e30",
"replacement_product_id": "prod_xyz789",
"replacement_reason": "Manufacturing defect",
"shipping_address": {
"line1": "123 Main St",
"city": "New York",
"state": "NY",
"postal_code": "10001",
"country": "US"
},
"expedited_shipping": true
}'
mutation warrantyReplaceMutation {
warrantyReplace(
id: "${warrantyId}",
replacementProductId: "${replacementProductId}",
replacementReason: "${replacementReason}",
shippingAddress: ${shippingAddress},
expeditedShipping: ${expeditedShipping}
) {
warranty {
id,
status,
replacement_order_id,
replacement_status,
tracking_number
}
userErrors {
field
message
}
}
}
`;
const warranties = await stateset.warranties.replace({
id: '0901f083-aa1c-43c5-af5c-0a9d2fc64e30',
replacement_product_id: 'prod_xyz789',
replacement_reason: 'Manufacturing defect',
shipping_address: {
line1: '123 Main St',
city: 'New York',
state: 'NY',
postal_code: '10001',
country: 'US'
},
expedited_shipping: true
});
warranties = stateset.warranties.replace({
'id': '0901f083-aa1c-43c5-af5c-0a9d2fc64e30',
'replacement_product_id': 'prod_xyz789',
'replacement_reason': 'Manufacturing defect',
'shipping_address': {
'line1': '123 Main St',
'city': 'New York',
'state': 'NY',
'postal_code': '10001',
'country': 'US'
},
'expedited_shipping': True
})
warranties = Stateset::Warranty.replace({
id: '0901f083-aa1c-43c5-af5c-0a9d2fc64e30',
replacement_product_id: 'prod_xyz789',
replacement_reason: 'Manufacturing defect',
shipping_address: {
line1: '123 Main St',
city: 'New York',
state: 'NY',
postal_code: '10001',
country: 'US'
},
expedited_shipping: true
})
warranties, err := stateset.Warranties.replace({
ID: '0901f083-aa1c-43c5-af5c-0a9d2fc64e30',
ReplacementProductID: 'prod_xyz789',
ReplacementReason: 'Manufacturing defect',
ShippingAddress: Address{
Line1: '123 Main St',
City: 'New York',
State: 'NY',
PostalCode: '10001',
Country: 'US'
},
ExpeditedShipping: true
})
Warranty warranties = stateset.Warranties.replace({
id: '0901f083-aa1c-43c5-af5c-0a9d2fc64e30',
replacementProductId: 'prod_xyz789',
replacementReason: 'Manufacturing defect',
shippingAddress: {
line1: '123 Main St',
city: 'New York',
state: 'NY',
postalCode: '10001',
country: 'US'
},
expeditedShipping: true
});
$warranties = $stateset->warranties->replace([
'id' => '0901f083-aa1c-43c5-af5c-0a9d2fc64e30',
'replacement_product_id' => 'prod_xyz789',
'replacement_reason' => 'Manufacturing defect',
'shipping_address' => [
'line1' => '123 Main St',
'city' => 'New York',
'state' => 'NY',
'postal_code' => '10001',
'country' => 'US'
],
'expedited_shipping' => true
]);
var warranties = await stateset.Warranties.Replace(new {
Id = '0901f083-aa1c-43c5-af5c-0a9d2fc64e30',
ReplacementProductId = 'prod_xyz789',
ReplacementReason = 'Manufacturing defect',
ShippingAddress = new {
Line1 = '123 Main St',
City = 'New York',
State = 'NY',
PostalCode = '10001',
Country = 'US'
},
ExpeditedShipping = true
});
{
"id": "e0901f083-aa1c-43c5-af5c-0a9d2fc64e30",
"object": "warranty",
"replaced": true,
"replacement_order_id": "ord_repl_123abc",
"replacement_product_id": "prod_xyz789",
"replacement_status": "shipped",
"tracking_number": "1Z999AA10123456784",
"estimated_delivery": "2024-01-18",
"replacement_reason": "Manufacturing defect"
}
⌘I