Required Scopes
This API requires one of the following scopes:e-commerce
Response
Successful response - Get all line items from an account, up to 100 per request
The response is of type object
.
curl --request GET \
--url https://api.hubapi.com/crm-objects/v1/objects/line_items/paged
[
{
"versions": [
{
"name": "hs_product_id",
"value": "1642736",
"sourceVid": []
}
],
"value": "1642736",
"timestamp": 0,
"source": null,
"sourceId": null
},
{
"versions": [
{
"name": "hs_product_id",
"value": "1645187",
"sourceVid": []
}
],
"value": "1645187",
"timestamp": 0,
"source": null,
"sourceId": null
},
{
"versions": [
{
"name": "quantity",
"value": "50",
"timestamp": 1525367734768,
"source": "API",
"sourceVid": []
}
],
"value": "50",
"timestamp": 1525367734768,
"source": "API",
"sourceId": null
},
{
"versions": [
{
"name": "price",
"value": "9.50",
"timestamp": 1525367734768,
"source": "API",
"sourceVid": []
}
],
"value": "9.50",
"timestamp": 1525367734768,
"source": "API",
"sourceId": null
},
{
"versions": [
{
"name": "name",
"value": "A custom name for the product for this line item. Discounting 5% on bulk purchase.",
"timestamp": 1525368457923,
"source": "API",
"sourceVid": []
}
],
"value": "A custom name for the product for this line item. Discounting 5% on bulk purchase.",
"timestamp": 1525368457923,
"source": "API",
"sourceId": null
},
{
"versions": [
{
"name": "hs_product_id",
"value": "1642736",
"sourceVid": []
}
],
"value": "1642736",
"timestamp": 0,
"source": null,
"sourceId": null
},
{
"versions": [
{
"name": "quantity",
"value": "15",
"timestamp": 1525368534412,
"source": "API",
"sourceVid": []
}
],
"value": "15",
"timestamp": 1525368534412,
"source": "API",
"sourceId": null
},
{
"versions": [
{
"name": "price",
"value": "100.00",
"timestamp": 1525368534412,
"source": "API",
"sourceVid": []
}
],
"value": "100.00",
"timestamp": 1525368534412,
"source": "API",
"sourceId": null
},
{
"versions": [
{
"name": "name",
"value": "Magical widgets - special order",
"timestamp": 1525368534412,
"source": "API",
"sourceVid": []
}
],
"value": "Magical widgets - special order",
"timestamp": 1525368534412,
"source": "API",
"sourceId": null
},
{
"versions": [
{
"name": "hs_product_id",
"value": "1645187",
"sourceVid": []
}
],
"value": "1645187",
"timestamp": 0,
"source": null,
"sourceId": null
}
]
Get all line items from an account, up to 100 per request. By default you will only get the object ID, the portal ID (HubSpot Account ID) and a deleted field to indicate if the line item as been archived or not in the response. If you want to get specific properties, you’ll need to use the &properties= parameter in the request URL. The parameter can be included multiple times, so you can request any properties you may need. See the parameter descriptions below and the examples for more details. Note: Line items created using the HubSpot sales tools may not always have a hs_product_id set. Products created from the deal line item editor will not be added to your product library and will therefore not have a hs_product_id. See the details in this knowledge doc for more information.
curl --request GET \
--url https://api.hubapi.com/crm-objects/v1/objects/line_items/paged
[
{
"versions": [
{
"name": "hs_product_id",
"value": "1642736",
"sourceVid": []
}
],
"value": "1642736",
"timestamp": 0,
"source": null,
"sourceId": null
},
{
"versions": [
{
"name": "hs_product_id",
"value": "1645187",
"sourceVid": []
}
],
"value": "1645187",
"timestamp": 0,
"source": null,
"sourceId": null
},
{
"versions": [
{
"name": "quantity",
"value": "50",
"timestamp": 1525367734768,
"source": "API",
"sourceVid": []
}
],
"value": "50",
"timestamp": 1525367734768,
"source": "API",
"sourceId": null
},
{
"versions": [
{
"name": "price",
"value": "9.50",
"timestamp": 1525367734768,
"source": "API",
"sourceVid": []
}
],
"value": "9.50",
"timestamp": 1525367734768,
"source": "API",
"sourceId": null
},
{
"versions": [
{
"name": "name",
"value": "A custom name for the product for this line item. Discounting 5% on bulk purchase.",
"timestamp": 1525368457923,
"source": "API",
"sourceVid": []
}
],
"value": "A custom name for the product for this line item. Discounting 5% on bulk purchase.",
"timestamp": 1525368457923,
"source": "API",
"sourceId": null
},
{
"versions": [
{
"name": "hs_product_id",
"value": "1642736",
"sourceVid": []
}
],
"value": "1642736",
"timestamp": 0,
"source": null,
"sourceId": null
},
{
"versions": [
{
"name": "quantity",
"value": "15",
"timestamp": 1525368534412,
"source": "API",
"sourceVid": []
}
],
"value": "15",
"timestamp": 1525368534412,
"source": "API",
"sourceId": null
},
{
"versions": [
{
"name": "price",
"value": "100.00",
"timestamp": 1525368534412,
"source": "API",
"sourceVid": []
}
],
"value": "100.00",
"timestamp": 1525368534412,
"source": "API",
"sourceId": null
},
{
"versions": [
{
"name": "name",
"value": "Magical widgets - special order",
"timestamp": 1525368534412,
"source": "API",
"sourceVid": []
}
],
"value": "Magical widgets - special order",
"timestamp": 1525368534412,
"source": "API",
"sourceId": null
},
{
"versions": [
{
"name": "hs_product_id",
"value": "1645187",
"sourceVid": []
}
],
"value": "1645187",
"timestamp": 0,
"source": null,
"sourceId": null
}
]
e-commerce
Successful response - Get all line items from an account, up to 100 per request
The response is of type object
.
Was this page helpful?