line_item_id
for the item being processed. You can obtain this from various sources, such as return webhooks, the detailed returns list, or the return details endpoint.
For a broader introduction, see the Item Grading and Dispositioning help center article, but note this guide is focused on API integration.
line_item_id
for the item you wish to grade/dispose.line_item_id
line_item_id
for the item. There are two main ways to obtain it:
line_item_id
is by listening to the Return webhook, which sends real-time events when a return is created or updated. The line_item_id
will be included in the webhook payload.
Example webhook payload:
line_item_id
using Loop’s API:
return_id
on hand to make this API call and include it
as a path parameter.line_items
array, where each object contains the line_item_id
:
line_item_id
, you must make two separate API requests: one to grade the item and another to set its disposition.
Fields for Grading an ItemExampleRequired fields:
- items (array, required): List of items to grade (max 20). Each item must include:
- line_item_id (integer, required): The unique identifier for the return line item.
- description (string, required): Description of the item’s condition (max 255 characters).
- condition_category (string, optional): The condition code for the returned item.
Possible values:grade_a
,grade_b
,grade_c
,grade_d
,incorrect_item
,missing
,junk
- return_processor (string, optional): Email of the warehouse or partner processing the return (max 100 characters).
- note (string, optional): Additional notes on the item’s condition (max 65535 characters).
- images (array, optional): Up to 5 links (URIs) to images of the item.
- inspected_at (string, optional): Date/time the item was inspected (ISO 8601 format).
Tip: All other fields are optional but recommended for richer reporting and auditing.
items
(array)- Each item:
line_item_id
,description
items
array in request body:
Fields for Setting DispositionExampleRequired fields:
- items (array, required): List of items to disposition (max 20). Each item must include:
- line_item_id (integer, required): The unique identifier for the return line item.
- disposition_outcome (string, required): The final state of the returned item.
Possible values:back_to_stock
,resale_hold
,recycle
,donate
,missing
- return_processor (string, optional): Email of the warehouse or partner processing the return (max 100 characters).
- note (string, optional): Additional notes on the item’s final state (max 65535 characters).
- inspected_at (string, optional): Date/time the item was inspected (ISO 8601 format).
Tip: All other fields are optional but recommended for richer reporting and auditing.
items
(array)- Each item:
line_item_id
,disposition_outcome
items
array in request body:
grade
and disposition
values.How grading and disposition data appears in the Loop Admin UI
Tip: You can also use grading and disposition data as a condition in your return workflows, allowing you to automate actions for future returns based on past grading/disposition outcomes. See the Workflows addition section of the Item Grading and Dispositioning help center article for more details.