curl --request PUT \
--url https://api.hubapi.com/crm-objects/v1/objects/line_items/{id}
"\nExample PUT URL:\nhttps://api.hubapi.com/crm-objects/v1/objects/line_items/9890010\n\nExample PUT data (updating two properties):\n[\n {\n \"name\": \"description\",\n \"value\": \"An updated description for this line item. Updating the quantity.\"\n },\n {\n \"name\": \"quantity\",\n \"value\": \"5\"\n }\n]\n\nExample response:\n{\n \"objectType\": \"LINE_ITEM\",\n \"portalId\": 62515,\n \"objectId\": 9890010,\n \"properties\": {\n \"amount\": {\n \"versions\": [\n {\n \"name\": \"amount\",\n \"value\": \"137.50\",\n \"timestamp\": 0,\n \"sourceId\": \"LineItemAmountCalculator\",\n \"source\": \"CALCULATED\",\n \"sourceVid\": []\n }\n ],\n \"value\": \"137.50\",\n \"timestamp\": 0,\n \"source\": \"CALCULATED\",\n \"sourceId\": \"LineItemAmountCalculator\"\n },\n \"quantity\": {\n \"versions\": [\n {\n \"name\": \"quantity\",\n \"value\": \"5\",\n \"timestamp\": 1525371765869,\n \"source\": \"API\",\n \"sourceVid\": []\n }\n ],\n \"value\": \"5\",\n \"timestamp\": 1525371765869,\n \"source\": \"API\",\n \"sourceId\": null\n },\n \"hs_lastmodifieddate\": {\n \"versions\": [\n {\n \"name\": \"hs_lastmodifieddate\",\n \"value\": \"0\",\n \"timestamp\": 0,\n \"source\": \"CALCULATED\",\n \"sourceVid\": []\n }\n ],\n \"value\": \"0\",\n \"timestamp\": 0,\n \"source\": \"CALCULATED\",\n \"sourceId\": null\n },\n \"price\": {\n \"versions\": [\n {\n \"name\": \"price\",\n \"value\": \"27.50\",\n \"timestamp\": 1525359863627,\n \"source\": \"API\",\n \"sourceVid\": []\n }\n ],\n \"value\": \"27.50\",\n \"timestamp\": 1525359863627,\n \"source\": \"API\",\n \"sourceId\": null\n },\n \"description\": {\n \"versions\": [\n {\n \"name\": \"description\",\n \"value\": \"An updated description for this line item. Updating the quantity.\",\n \"timestamp\": 1525371765869,\n \"source\": \"API\",\n \"sourceVid\": []\n },\n {\n \"name\": \"description\",\n \"value\": \"A description of this product.\",\n \"timestamp\": 1525359863627,\n \"source\": \"API\",\n \"sourceVid\": []\n }\n ],\n \"value\": \"An updated description for this line item. Updating the quantity.\",\n \"timestamp\": 1525371765869,\n \"source\": \"API\",\n \"sourceId\": null\n },\n \"hs_product_id\": {\n \"versions\": [\n {\n \"name\": \"hs_product_id\",\n \"value\": \"1688960\",\n \"timestamp\": 1525371444427,\n \"source\": \"API\",\n \"sourceVid\": []\n }\n ],\n \"value\": \"1688960\",\n \"timestamp\": 1525371444427,\n \"source\": \"API\",\n \"sourceId\": null\n }\n },\n \"version\": 0,\n \"isDeleted\": false\n}"
Get a list of changes to line item objects. Returns 1000 (or fewer) changes, starting with the least recent change. This endpoint is designed to be polled periodically, allowing your integration to keep track of which objects have been updated so that you can get the details of those updated objects. After each request, the timestamp, changeType, and objectId of the most recently changed record (which will be the last record in the returned list of changes) should be stored by your integration, as you can use those values to get changes that occurred later, allowing you to pull only changes that occurred after your last polling request. All three values must be stored, as the combination of those values is what your integration needs to use to get changes that occurred after your last polling attempt. See the example for more details.
curl --request PUT \
--url https://api.hubapi.com/crm-objects/v1/objects/line_items/{id}
"\nExample PUT URL:\nhttps://api.hubapi.com/crm-objects/v1/objects/line_items/9890010\n\nExample PUT data (updating two properties):\n[\n {\n \"name\": \"description\",\n \"value\": \"An updated description for this line item. Updating the quantity.\"\n },\n {\n \"name\": \"quantity\",\n \"value\": \"5\"\n }\n]\n\nExample response:\n{\n \"objectType\": \"LINE_ITEM\",\n \"portalId\": 62515,\n \"objectId\": 9890010,\n \"properties\": {\n \"amount\": {\n \"versions\": [\n {\n \"name\": \"amount\",\n \"value\": \"137.50\",\n \"timestamp\": 0,\n \"sourceId\": \"LineItemAmountCalculator\",\n \"source\": \"CALCULATED\",\n \"sourceVid\": []\n }\n ],\n \"value\": \"137.50\",\n \"timestamp\": 0,\n \"source\": \"CALCULATED\",\n \"sourceId\": \"LineItemAmountCalculator\"\n },\n \"quantity\": {\n \"versions\": [\n {\n \"name\": \"quantity\",\n \"value\": \"5\",\n \"timestamp\": 1525371765869,\n \"source\": \"API\",\n \"sourceVid\": []\n }\n ],\n \"value\": \"5\",\n \"timestamp\": 1525371765869,\n \"source\": \"API\",\n \"sourceId\": null\n },\n \"hs_lastmodifieddate\": {\n \"versions\": [\n {\n \"name\": \"hs_lastmodifieddate\",\n \"value\": \"0\",\n \"timestamp\": 0,\n \"source\": \"CALCULATED\",\n \"sourceVid\": []\n }\n ],\n \"value\": \"0\",\n \"timestamp\": 0,\n \"source\": \"CALCULATED\",\n \"sourceId\": null\n },\n \"price\": {\n \"versions\": [\n {\n \"name\": \"price\",\n \"value\": \"27.50\",\n \"timestamp\": 1525359863627,\n \"source\": \"API\",\n \"sourceVid\": []\n }\n ],\n \"value\": \"27.50\",\n \"timestamp\": 1525359863627,\n \"source\": \"API\",\n \"sourceId\": null\n },\n \"description\": {\n \"versions\": [\n {\n \"name\": \"description\",\n \"value\": \"An updated description for this line item. Updating the quantity.\",\n \"timestamp\": 1525371765869,\n \"source\": \"API\",\n \"sourceVid\": []\n },\n {\n \"name\": \"description\",\n \"value\": \"A description of this product.\",\n \"timestamp\": 1525359863627,\n \"source\": \"API\",\n \"sourceVid\": []\n }\n ],\n \"value\": \"An updated description for this line item. Updating the quantity.\",\n \"timestamp\": 1525371765869,\n \"source\": \"API\",\n \"sourceId\": null\n },\n \"hs_product_id\": {\n \"versions\": [\n {\n \"name\": \"hs_product_id\",\n \"value\": \"1688960\",\n \"timestamp\": 1525371444427,\n \"source\": \"API\",\n \"sourceVid\": []\n }\n ],\n \"value\": \"1688960\",\n \"timestamp\": 1525371444427,\n \"source\": \"API\",\n \"sourceId\": null\n }\n },\n \"version\": 0,\n \"isDeleted\": false\n}"
Successful response - Get a list of changes to line item objects
The response is of type object
.
Was this page helpful?