curl --request GET \
--url https://api.hubapi.com/crm-objects/v1/objects/line_items/{id}
"\nExample GET URL:\nhttps://api.hubapi.com/crm-objects/v1/objects/line_items/9845651?properties=hs_product_id\n\nExample response:\n{\n \"objectType\": \"LINE_ITEM\",\n \"portalId\": 62515,\n \"objectId\": 9845651,\n \"properties\": {\n \"hs_product_id\": {\n \"versions\": [\n {\n \"name\": \"hs_product_id\",\n \"value\": \"1645342\",\n \"sourceVid\": []\n }\n ],\n \"value\": \"1645342\",\n \"timestamp\": 0,\n \"source\": null,\n \"sourceId\": null\n }\n },\n \"version\": 1,\n \"isDeleted\": false\n}\n\nExample GET with properties:\nhttps://api.hubapi.com/crm-objects/v1/objects/line_items/9845651?properties=quantity&properties=price&properties=name&properties=hs_product_id\n\nExample response:\n{\n \"objectType\": \"LINE_ITEM\",\n \"portalId\": 62515,\n \"objectId\": 9845651,\n \"properties\": {\n \"quantity\": {\n \"versions\": [\n {\n \"name\": \"quantity\",\n \"value\": \"25\",\n \"timestamp\": 1525369755209,\n \"source\": \"API\",\n \"sourceVid\": []\n }\n ],\n \"value\": \"25\",\n \"timestamp\": 1525369755209,\n \"source\": \"API\",\n \"sourceId\": null\n },\n \"price\": {\n \"versions\": [\n {\n \"name\": \"price\",\n \"value\": \"27.50\",\n \"timestamp\": 1525299376761,\n \"source\": \"API\",\n \"sourceVid\": []\n }\n ],\n \"value\": \"27.50\",\n \"timestamp\": 1525299376761,\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.\",\n \"timestamp\": 1525369755209,\n \"source\": \"API\",\n \"sourceVid\": []\n }\n ],\n \"value\": \"A custom name for the product for this line item.\",\n \"timestamp\": 1525369755209,\n \"source\": \"API\",\n \"sourceId\": null\n },\n \"hs_product_id\": {\n \"versions\": [\n {\n \"name\": \"hs_product_id\",\n \"value\": \"1645342\",\n \"sourceVid\": []\n }\n ],\n \"value\": \"1645342\",\n \"timestamp\": 0,\n \"source\": null,\n \"sourceId\": null\n }\n },\n \"version\": 1,\n \"isDeleted\": false\n}"
Get a specific line item by its ID. By default, the response will only include the ID. You can get specific properties in the response by using the &properties= parameter in the URL, and that parameter can be included multiple times to get multiple properties. See the example for more details.
curl --request GET \
--url https://api.hubapi.com/crm-objects/v1/objects/line_items/{id}
"\nExample GET URL:\nhttps://api.hubapi.com/crm-objects/v1/objects/line_items/9845651?properties=hs_product_id\n\nExample response:\n{\n \"objectType\": \"LINE_ITEM\",\n \"portalId\": 62515,\n \"objectId\": 9845651,\n \"properties\": {\n \"hs_product_id\": {\n \"versions\": [\n {\n \"name\": \"hs_product_id\",\n \"value\": \"1645342\",\n \"sourceVid\": []\n }\n ],\n \"value\": \"1645342\",\n \"timestamp\": 0,\n \"source\": null,\n \"sourceId\": null\n }\n },\n \"version\": 1,\n \"isDeleted\": false\n}\n\nExample GET with properties:\nhttps://api.hubapi.com/crm-objects/v1/objects/line_items/9845651?properties=quantity&properties=price&properties=name&properties=hs_product_id\n\nExample response:\n{\n \"objectType\": \"LINE_ITEM\",\n \"portalId\": 62515,\n \"objectId\": 9845651,\n \"properties\": {\n \"quantity\": {\n \"versions\": [\n {\n \"name\": \"quantity\",\n \"value\": \"25\",\n \"timestamp\": 1525369755209,\n \"source\": \"API\",\n \"sourceVid\": []\n }\n ],\n \"value\": \"25\",\n \"timestamp\": 1525369755209,\n \"source\": \"API\",\n \"sourceId\": null\n },\n \"price\": {\n \"versions\": [\n {\n \"name\": \"price\",\n \"value\": \"27.50\",\n \"timestamp\": 1525299376761,\n \"source\": \"API\",\n \"sourceVid\": []\n }\n ],\n \"value\": \"27.50\",\n \"timestamp\": 1525299376761,\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.\",\n \"timestamp\": 1525369755209,\n \"source\": \"API\",\n \"sourceVid\": []\n }\n ],\n \"value\": \"A custom name for the product for this line item.\",\n \"timestamp\": 1525369755209,\n \"source\": \"API\",\n \"sourceId\": null\n },\n \"hs_product_id\": {\n \"versions\": [\n {\n \"name\": \"hs_product_id\",\n \"value\": \"1645342\",\n \"sourceVid\": []\n }\n ],\n \"value\": \"1645342\",\n \"timestamp\": 0,\n \"source\": null,\n \"sourceId\": null\n }\n },\n \"version\": 1,\n \"isDeleted\": false\n}"
Successful response - Get a specific line item by its ID
The response is of type object
.
Was this page helpful?