curl --location --request POST 'https://api.stateset.com/v1/returns/:id/inspect' \
--header 'Content-Type: application/json' \
--header 'Authorization: Token <token>' \
--data-raw '{
"id": "rt_1NXWPnCo6bFb1KQto6C8OWvE",
"inspection_type": "physical",
"condition_assessment": "good",
"inspector_notes": "Minor wear on packaging, product unused",
"defects_found": ["packaging_damage"],
"resellable": true,
"restocking_fee": 15.00
}'
mutation returnInspectMutation {
returnInspect(
id: "${returnId}",
inspectionType: "${inspectionType}",
conditionAssessment: "${conditionAssessment}",
inspectorNotes: "${inspectorNotes}",
defectsFound: ${defectsFound},
resellable: ${resellable},
restockingFee: ${restockingFee}
) {
return {
id,
status,
inspection_id,
condition_assessment,
resellable,
recommended_action
}
userErrors {
field
message
}
}
}
`;
const returns = await stateset.returns.inspect({
id: 'rt_1NXWPnCo6bFb1KQto6C8OWvE',
inspection_type: 'physical',
condition_assessment: 'good',
inspector_notes: 'Minor wear on packaging, product unused',
defects_found: ['packaging_damage'],
resellable: true,
restocking_fee: 15.00
});
returns = stateset.returns.inspect({
'id': 'rt_1NXWPnCo6bFb1KQto6C8OWvE',
'inspection_type': 'physical',
'condition_assessment': 'good',
'inspector_notes': 'Minor wear on packaging, product unused',
'defects_found': ['packaging_damage'],
'resellable': True,
'restocking_fee': 15.00
})
returns = Stateset::Return.inspect({
id: 'rt_1NXWPnCo6bFb1KQto6C8OWvE',
inspection_type: 'physical',
condition_assessment: 'good',
inspector_notes: 'Minor wear on packaging, product unused',
defects_found: ['packaging_damage'],
resellable: true,
restocking_fee: 15.00
})
returns, err := stateset.Returns.inspect({
ID: 'rt_1NXWPnCo6bFb1KQto6C8OWvE',
InspectionType: 'physical',
ConditionAssessment: 'good',
InspectorNotes: 'Minor wear on packaging, product unused',
DefectsFound: []string{'packaging_damage'},
Resellable: true,
RestockingFee: 15.00
})
Return returns = stateset.Returns.inspect({
id: 'rt_1NXWPnCo6bFb1KQto6C8OWvE',
inspectionType: 'physical',
conditionAssessment: 'good',
inspectorNotes: 'Minor wear on packaging, product unused',
defectsFound: ['packaging_damage'],
resellable: true,
restockingFee: 15.00
});
$returns = $stateset->returns->inspect([
'id' => 'rt_1NXWPnCo6bFb1KQto6C8OWvE',
'inspection_type' => 'physical',
'condition_assessment' => 'good',
'inspector_notes' => 'Minor wear on packaging, product unused',
'defects_found' => ['packaging_damage'],
'resellable' => true,
'restocking_fee' => 15.00
]);
var returns = await stateset.Returns.Inspect(new {
Id = 'rt_1NXWPnCo6bFb1KQto6C8OWvE',
InspectionType = 'physical',
ConditionAssessment = 'good',
InspectorNotes = 'Minor wear on packaging, product unused',
DefectsFound = new[] { 'packaging_damage' },
Resellable = true,
RestockingFee = 15.00
});
{
"id": "rt_1NXWPnCo6bFb1KQto6C8OWvE",
"object": "return",
"inspected": true,
"inspection_id": "insp_ret_123",
"inspection_date": "2024-01-15T10:45:00Z",
"condition_assessment": "good",
"resellable": true,
"restocking_fee": 15.00,
"defects_found": ["packaging_damage"],
"recommended_action": "restock"
}
Inspect Return
This endpoint records inspection details for a returned item.
POST
/
v1
/
returns
/
:id
/
inspect
curl --location --request POST 'https://api.stateset.com/v1/returns/:id/inspect' \
--header 'Content-Type: application/json' \
--header 'Authorization: Token <token>' \
--data-raw '{
"id": "rt_1NXWPnCo6bFb1KQto6C8OWvE",
"inspection_type": "physical",
"condition_assessment": "good",
"inspector_notes": "Minor wear on packaging, product unused",
"defects_found": ["packaging_damage"],
"resellable": true,
"restocking_fee": 15.00
}'
mutation returnInspectMutation {
returnInspect(
id: "${returnId}",
inspectionType: "${inspectionType}",
conditionAssessment: "${conditionAssessment}",
inspectorNotes: "${inspectorNotes}",
defectsFound: ${defectsFound},
resellable: ${resellable},
restockingFee: ${restockingFee}
) {
return {
id,
status,
inspection_id,
condition_assessment,
resellable,
recommended_action
}
userErrors {
field
message
}
}
}
`;
const returns = await stateset.returns.inspect({
id: 'rt_1NXWPnCo6bFb1KQto6C8OWvE',
inspection_type: 'physical',
condition_assessment: 'good',
inspector_notes: 'Minor wear on packaging, product unused',
defects_found: ['packaging_damage'],
resellable: true,
restocking_fee: 15.00
});
returns = stateset.returns.inspect({
'id': 'rt_1NXWPnCo6bFb1KQto6C8OWvE',
'inspection_type': 'physical',
'condition_assessment': 'good',
'inspector_notes': 'Minor wear on packaging, product unused',
'defects_found': ['packaging_damage'],
'resellable': True,
'restocking_fee': 15.00
})
returns = Stateset::Return.inspect({
id: 'rt_1NXWPnCo6bFb1KQto6C8OWvE',
inspection_type: 'physical',
condition_assessment: 'good',
inspector_notes: 'Minor wear on packaging, product unused',
defects_found: ['packaging_damage'],
resellable: true,
restocking_fee: 15.00
})
returns, err := stateset.Returns.inspect({
ID: 'rt_1NXWPnCo6bFb1KQto6C8OWvE',
InspectionType: 'physical',
ConditionAssessment: 'good',
InspectorNotes: 'Minor wear on packaging, product unused',
DefectsFound: []string{'packaging_damage'},
Resellable: true,
RestockingFee: 15.00
})
Return returns = stateset.Returns.inspect({
id: 'rt_1NXWPnCo6bFb1KQto6C8OWvE',
inspectionType: 'physical',
conditionAssessment: 'good',
inspectorNotes: 'Minor wear on packaging, product unused',
defectsFound: ['packaging_damage'],
resellable: true,
restockingFee: 15.00
});
$returns = $stateset->returns->inspect([
'id' => 'rt_1NXWPnCo6bFb1KQto6C8OWvE',
'inspection_type' => 'physical',
'condition_assessment' => 'good',
'inspector_notes' => 'Minor wear on packaging, product unused',
'defects_found' => ['packaging_damage'],
'resellable' => true,
'restocking_fee' => 15.00
]);
var returns = await stateset.Returns.Inspect(new {
Id = 'rt_1NXWPnCo6bFb1KQto6C8OWvE',
InspectionType = 'physical',
ConditionAssessment = 'good',
InspectorNotes = 'Minor wear on packaging, product unused',
DefectsFound = new[] { 'packaging_damage' },
Resellable = true,
RestockingFee = 15.00
});
{
"id": "rt_1NXWPnCo6bFb1KQto6C8OWvE",
"object": "return",
"inspected": true,
"inspection_id": "insp_ret_123",
"inspection_date": "2024-01-15T10:45:00Z",
"condition_assessment": "good",
"resellable": true,
"restocking_fee": 15.00,
"defects_found": ["packaging_damage"],
"recommended_action": "restock"
}
Body
string
The ID provided in the data tab may be used to identify the return
string
The type of inspection performed (e.g., “physical”, “functional”, “cosmetic”)
string
The assessed condition of the returned item (e.g., “like_new”, “good”, “fair”, “poor”, “damaged”)
string
Detailed notes from the inspection
array
List of defects or issues found during inspection
boolean
Whether the item can be resold
number
Recommended restocking fee based on condition
Response
string
The ID provided in the data tab may be used to identify the return
string
The object type
string
The unique identifier for the inspection record
string
The date when the inspection was performed
string
The final condition assessment
boolean
Whether the item can be resold
string
The recommended action based on inspection (e.g., “restock”, “liquidate”, “dispose”)
number
Indicates whether the call was successful. true if successful, false if not.
curl --location --request POST 'https://api.stateset.com/v1/returns/:id/inspect' \
--header 'Content-Type: application/json' \
--header 'Authorization: Token <token>' \
--data-raw '{
"id": "rt_1NXWPnCo6bFb1KQto6C8OWvE",
"inspection_type": "physical",
"condition_assessment": "good",
"inspector_notes": "Minor wear on packaging, product unused",
"defects_found": ["packaging_damage"],
"resellable": true,
"restocking_fee": 15.00
}'
mutation returnInspectMutation {
returnInspect(
id: "${returnId}",
inspectionType: "${inspectionType}",
conditionAssessment: "${conditionAssessment}",
inspectorNotes: "${inspectorNotes}",
defectsFound: ${defectsFound},
resellable: ${resellable},
restockingFee: ${restockingFee}
) {
return {
id,
status,
inspection_id,
condition_assessment,
resellable,
recommended_action
}
userErrors {
field
message
}
}
}
`;
const returns = await stateset.returns.inspect({
id: 'rt_1NXWPnCo6bFb1KQto6C8OWvE',
inspection_type: 'physical',
condition_assessment: 'good',
inspector_notes: 'Minor wear on packaging, product unused',
defects_found: ['packaging_damage'],
resellable: true,
restocking_fee: 15.00
});
returns = stateset.returns.inspect({
'id': 'rt_1NXWPnCo6bFb1KQto6C8OWvE',
'inspection_type': 'physical',
'condition_assessment': 'good',
'inspector_notes': 'Minor wear on packaging, product unused',
'defects_found': ['packaging_damage'],
'resellable': True,
'restocking_fee': 15.00
})
returns = Stateset::Return.inspect({
id: 'rt_1NXWPnCo6bFb1KQto6C8OWvE',
inspection_type: 'physical',
condition_assessment: 'good',
inspector_notes: 'Minor wear on packaging, product unused',
defects_found: ['packaging_damage'],
resellable: true,
restocking_fee: 15.00
})
returns, err := stateset.Returns.inspect({
ID: 'rt_1NXWPnCo6bFb1KQto6C8OWvE',
InspectionType: 'physical',
ConditionAssessment: 'good',
InspectorNotes: 'Minor wear on packaging, product unused',
DefectsFound: []string{'packaging_damage'},
Resellable: true,
RestockingFee: 15.00
})
Return returns = stateset.Returns.inspect({
id: 'rt_1NXWPnCo6bFb1KQto6C8OWvE',
inspectionType: 'physical',
conditionAssessment: 'good',
inspectorNotes: 'Minor wear on packaging, product unused',
defectsFound: ['packaging_damage'],
resellable: true,
restockingFee: 15.00
});
$returns = $stateset->returns->inspect([
'id' => 'rt_1NXWPnCo6bFb1KQto6C8OWvE',
'inspection_type' => 'physical',
'condition_assessment' => 'good',
'inspector_notes' => 'Minor wear on packaging, product unused',
'defects_found' => ['packaging_damage'],
'resellable' => true,
'restocking_fee' => 15.00
]);
var returns = await stateset.Returns.Inspect(new {
Id = 'rt_1NXWPnCo6bFb1KQto6C8OWvE',
InspectionType = 'physical',
ConditionAssessment = 'good',
InspectorNotes = 'Minor wear on packaging, product unused',
DefectsFound = new[] { 'packaging_damage' },
Resellable = true,
RestockingFee = 15.00
});
{
"id": "rt_1NXWPnCo6bFb1KQto6C8OWvE",
"object": "return",
"inspected": true,
"inspection_id": "insp_ret_123",
"inspection_date": "2024-01-15T10:45:00Z",
"condition_assessment": "good",
"resellable": true,
"restocking_fee": 15.00,
"defects_found": ["packaging_damage"],
"recommended_action": "restock"
}
⌘I