curl --request GET \
--url http://{defaultHost}/api/v2/platform/line_items/{id} \
--header 'Authorization: Bearer <token>'
{
"data": {
"id": "28",
"type": "line_item",
"attributes": {
"quantity": 1,
"price": "10.0",
"created_at": "2022-11-08T19:34:20.761Z",
"updated_at": "2022-11-08T19:34:20.769Z",
"currency": "USD",
"cost_price": "17.0",
"adjustment_total": "0.0",
"additional_tax_total": "0.0",
"promo_total": "0.0",
"included_tax_total": "0.0",
"pre_tax_amount": "10.0",
"taxable_adjustment_total": "0.0",
"non_taxable_adjustment_total": "0.0",
"public_metadata": {},
"private_metadata": {},
"display_discounted_amount": "$10.00",
"display_amount": "$10.00",
"display_final_amount": "$10.00",
"display_subtotal": "$10.00",
"display_pre_tax_amount": "$10.00",
"display_price": "$10.00",
"display_adjustment_total": "$0.00",
"display_additional_tax_total": "$0.00",
"display_promo_total": "$0.00",
"display_total": "$10.00",
"display_included_tax_total": "$0.00"
},
"relationships": {
"order": {
"data": {
"id": "33",
"type": "order"
}
},
"tax_category": {
"data": {
"id": "73",
"type": "tax_category"
}
},
"variant": {
"data": {
"id": "188",
"type": "variant"
}
},
"adjustments": {
"data": []
},
"inventory_units": {
"data": []
},
"digital_links": {
"data": []
}
}
}
}
Returns a Line Item
curl --request GET \
--url http://{defaultHost}/api/v2/platform/line_items/{id} \
--header 'Authorization: Bearer <token>'
{
"data": {
"id": "28",
"type": "line_item",
"attributes": {
"quantity": 1,
"price": "10.0",
"created_at": "2022-11-08T19:34:20.761Z",
"updated_at": "2022-11-08T19:34:20.769Z",
"currency": "USD",
"cost_price": "17.0",
"adjustment_total": "0.0",
"additional_tax_total": "0.0",
"promo_total": "0.0",
"included_tax_total": "0.0",
"pre_tax_amount": "10.0",
"taxable_adjustment_total": "0.0",
"non_taxable_adjustment_total": "0.0",
"public_metadata": {},
"private_metadata": {},
"display_discounted_amount": "$10.00",
"display_amount": "$10.00",
"display_final_amount": "$10.00",
"display_subtotal": "$10.00",
"display_pre_tax_amount": "$10.00",
"display_price": "$10.00",
"display_adjustment_total": "$0.00",
"display_additional_tax_total": "$0.00",
"display_promo_total": "$0.00",
"display_total": "$10.00",
"display_included_tax_total": "$0.00"
},
"relationships": {
"order": {
"data": {
"id": "33",
"type": "order"
}
},
"tax_category": {
"data": {
"id": "73",
"type": "tax_category"
}
},
"variant": {
"data": {
"id": "188",
"type": "variant"
}
},
"adjustments": {
"data": []
},
"inventory_units": {
"data": []
},
"digital_links": {
"data": []
}
}
}
}
Bearer authentication header of the form Bearer <token>
, where <token>
is your auth token.
Select which associated resources you would like to fetch, see: <a href="https://jsonapi.org/format/#fetching-includes">https://jsonapi.org/format/#fetching-includes</a>
Record found
The response is of type object
.
Was this page helpful?