curl --request GET \
--url https://api.hubapi.com/crm-objects/v1/objects/line_items/paged
"\nExample GET URL:\nhttps://api.hubapi.com/crm-objects/v1/objects/line_items/paged\n\nExample response:\n{\n \"objects\": [\n {\n \"objectType\": \"LINE_ITEM\",\n \"portalId\": 62515,\n \"objectId\": 9843068,\n \"properties\": {\n \"hs_product_id\": {\n \"versions\": [\n {\n \"name\": \"hs_product_id\",\n \"value\": \"1642736\",\n \"sourceVid\": []\n }\n ],\n \"value\": \"1642736\",\n \"timestamp\": 0,\n \"source\": null,\n \"sourceId\": null\n }\n },\n \"version\": 2,\n \"isDeleted\": false\n },\n {\n \"objectType\": \"LINE_ITEM\",\n \"portalId\": 62515,\n \"objectId\": 9867220,\n \"properties\": {\n \"hs_product_id\": {\n \"versions\": [\n {\n \"name\": \"hs_product_id\",\n \"value\": \"1645187\",\n \"sourceVid\": []\n }\n ],\n \"value\": \"1645187\",\n \"timestamp\": 0,\n \"source\": null,\n \"sourceId\": null\n }\n },\n \"version\": 1,\n \"isDeleted\": false\n }\n ],\n \"hasMore\": false,\n \"offset\": 9867220\n}\n\nExample GET URL (with properties):\nhttps://api.hubapi.com/crm-objects/v1/objects/line_items/paged?properties=name&properties=price&properties=quantity\n\nExample response:\n{\n \"objects\": [\n {\n \"objectType\": \"LINE_ITEM\",\n \"portalId\": 62515,\n \"objectId\": 9843068,\n \"properties\": {\n \"quantity\": {\n \"versions\": [\n {\n \"name\": \"quantity\",\n \"value\": \"50\",\n \"timestamp\": 1525367734768,\n \"source\": \"API\",\n \"sourceVid\": []\n }\n ],\n \"value\": \"50\",\n \"timestamp\": 1525367734768,\n \"source\": \"API\",\n \"sourceId\": null\n },\n \"price\": {\n \"versions\": [\n {\n \"name\": \"price\",\n \"value\": \"9.50\",\n \"timestamp\": 1525367734768,\n \"source\": \"API\",\n \"sourceVid\": []\n }\n ],\n \"value\": \"9.50\",\n \"timestamp\": 1525367734768,\n \"source\": \"API\",\n \"sourceId\": null\n },\n \"name\": {\n \"versions\": [\n {\n \"name\": \"name\",\n \"value\": \"A custom name for the product for this line item. Discounting 5% on bulk purchase.\",\n \"timestamp\": 1525368457923,\n \"source\": \"API\",\n \"sourceVid\": []\n }\n ],\n \"value\": \"A custom name for the product for this line item. Discounting 5% on bulk purchase.\",\n \"timestamp\": 1525368457923,\n \"source\": \"API\",\n \"sourceId\": null\n },\n \"hs_product_id\": {\n \"versions\": [\n {\n \"name\": \"hs_product_id\",\n \"value\": \"1642736\",\n \"sourceVid\": []\n }\n ],\n \"value\": \"1642736\",\n \"timestamp\": 0,\n \"source\": null,\n \"sourceId\": null\n }\n },\n \"version\": 2,\n \"isDeleted\": false\n },\n {\n \"objectType\": \"LINE_ITEM\",\n \"portalId\": 62515,\n \"objectId\": 9867220,\n \"properties\": {\n \"quantity\": {\n \"versions\": [\n {\n \"name\": \"quantity\",\n \"value\": \"15\",\n \"timestamp\": 1525368534412,\n \"source\": \"API\",\n \"sourceVid\": []\n }\n ],\n \"value\": \"15\",\n \"timestamp\": 1525368534412,\n \"source\": \"API\",\n \"sourceId\": null\n },\n \"price\": {\n \"versions\": [\n {\n \"name\": \"price\",\n \"value\": \"100.00\",\n \"timestamp\": 1525368534412,\n \"source\": \"API\",\n \"sourceVid\": []\n }\n ],\n \"value\": \"100.00\",\n \"timestamp\": 1525368534412,\n \"source\": \"API\",\n \"sourceId\": null\n },\n \"name\": {\n \"versions\": [\n {\n \"name\": \"name\",\n \"value\": \"Magical widgets - special order\",\n \"timestamp\": 1525368534412,\n \"source\": \"API\",\n \"sourceVid\": []\n }\n ],\n \"value\": \"Magical widgets - special order\",\n \"timestamp\": 1525368534412,\n \"source\": \"API\",\n \"sourceId\": null\n },\n \"hs_product_id\": {\n \"versions\": [\n {\n \"name\": \"hs_product_id\",\n \"value\": \"1645187\",\n \"sourceVid\": []\n }\n ],\n \"value\": \"1645187\",\n \"timestamp\": 0,\n \"source\": null,\n \"sourceId\": null\n }\n },\n \"version\": 1,\n \"isDeleted\": false\n }\n ],\n \"hasMore\": false,\n \"offset\": 9867220\n}"
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
"\nExample GET URL:\nhttps://api.hubapi.com/crm-objects/v1/objects/line_items/paged\n\nExample response:\n{\n \"objects\": [\n {\n \"objectType\": \"LINE_ITEM\",\n \"portalId\": 62515,\n \"objectId\": 9843068,\n \"properties\": {\n \"hs_product_id\": {\n \"versions\": [\n {\n \"name\": \"hs_product_id\",\n \"value\": \"1642736\",\n \"sourceVid\": []\n }\n ],\n \"value\": \"1642736\",\n \"timestamp\": 0,\n \"source\": null,\n \"sourceId\": null\n }\n },\n \"version\": 2,\n \"isDeleted\": false\n },\n {\n \"objectType\": \"LINE_ITEM\",\n \"portalId\": 62515,\n \"objectId\": 9867220,\n \"properties\": {\n \"hs_product_id\": {\n \"versions\": [\n {\n \"name\": \"hs_product_id\",\n \"value\": \"1645187\",\n \"sourceVid\": []\n }\n ],\n \"value\": \"1645187\",\n \"timestamp\": 0,\n \"source\": null,\n \"sourceId\": null\n }\n },\n \"version\": 1,\n \"isDeleted\": false\n }\n ],\n \"hasMore\": false,\n \"offset\": 9867220\n}\n\nExample GET URL (with properties):\nhttps://api.hubapi.com/crm-objects/v1/objects/line_items/paged?properties=name&properties=price&properties=quantity\n\nExample response:\n{\n \"objects\": [\n {\n \"objectType\": \"LINE_ITEM\",\n \"portalId\": 62515,\n \"objectId\": 9843068,\n \"properties\": {\n \"quantity\": {\n \"versions\": [\n {\n \"name\": \"quantity\",\n \"value\": \"50\",\n \"timestamp\": 1525367734768,\n \"source\": \"API\",\n \"sourceVid\": []\n }\n ],\n \"value\": \"50\",\n \"timestamp\": 1525367734768,\n \"source\": \"API\",\n \"sourceId\": null\n },\n \"price\": {\n \"versions\": [\n {\n \"name\": \"price\",\n \"value\": \"9.50\",\n \"timestamp\": 1525367734768,\n \"source\": \"API\",\n \"sourceVid\": []\n }\n ],\n \"value\": \"9.50\",\n \"timestamp\": 1525367734768,\n \"source\": \"API\",\n \"sourceId\": null\n },\n \"name\": {\n \"versions\": [\n {\n \"name\": \"name\",\n \"value\": \"A custom name for the product for this line item. Discounting 5% on bulk purchase.\",\n \"timestamp\": 1525368457923,\n \"source\": \"API\",\n \"sourceVid\": []\n }\n ],\n \"value\": \"A custom name for the product for this line item. Discounting 5% on bulk purchase.\",\n \"timestamp\": 1525368457923,\n \"source\": \"API\",\n \"sourceId\": null\n },\n \"hs_product_id\": {\n \"versions\": [\n {\n \"name\": \"hs_product_id\",\n \"value\": \"1642736\",\n \"sourceVid\": []\n }\n ],\n \"value\": \"1642736\",\n \"timestamp\": 0,\n \"source\": null,\n \"sourceId\": null\n }\n },\n \"version\": 2,\n \"isDeleted\": false\n },\n {\n \"objectType\": \"LINE_ITEM\",\n \"portalId\": 62515,\n \"objectId\": 9867220,\n \"properties\": {\n \"quantity\": {\n \"versions\": [\n {\n \"name\": \"quantity\",\n \"value\": \"15\",\n \"timestamp\": 1525368534412,\n \"source\": \"API\",\n \"sourceVid\": []\n }\n ],\n \"value\": \"15\",\n \"timestamp\": 1525368534412,\n \"source\": \"API\",\n \"sourceId\": null\n },\n \"price\": {\n \"versions\": [\n {\n \"name\": \"price\",\n \"value\": \"100.00\",\n \"timestamp\": 1525368534412,\n \"source\": \"API\",\n \"sourceVid\": []\n }\n ],\n \"value\": \"100.00\",\n \"timestamp\": 1525368534412,\n \"source\": \"API\",\n \"sourceId\": null\n },\n \"name\": {\n \"versions\": [\n {\n \"name\": \"name\",\n \"value\": \"Magical widgets - special order\",\n \"timestamp\": 1525368534412,\n \"source\": \"API\",\n \"sourceVid\": []\n }\n ],\n \"value\": \"Magical widgets - special order\",\n \"timestamp\": 1525368534412,\n \"source\": \"API\",\n \"sourceId\": null\n },\n \"hs_product_id\": {\n \"versions\": [\n {\n \"name\": \"hs_product_id\",\n \"value\": \"1645187\",\n \"sourceVid\": []\n }\n ],\n \"value\": \"1645187\",\n \"timestamp\": 0,\n \"source\": null,\n \"sourceId\": null\n }\n },\n \"version\": 1,\n \"isDeleted\": false\n }\n ],\n \"hasMore\": false,\n \"offset\": 9867220\n}"
Successful response - Get all line items from an account, up to 100 per request
The response is of type object
.
Was this page helpful?