curl --request GET \
--url https://api.hubapi.com/crm-objects/v1/change-log/line_items
"\nExample GET URL:\nhttps://api.hubapi.com/crm-objects/v1/change-log/line_items\n\nExample response:\n[\n {\n \"timestamp\": 1525297495553,\n \"changeType\": \"CHANGED\",\n \"objectId\": 9845651,\n \"changes\": {\n \"changedProperties\": [\n \"hs_lastmodifieddate\",\n \"price\",\n \"quantity\"\n ],\n \"newAssociations\": [],\n \"removedAssociations\": [],\n \"newListMemberships\": [],\n \"removedListMemberships\": []\n }\n },\n {\n \"timestamp\": 1525297514887,\n \"changeType\": \"CHANGED\",\n \"objectId\": 9845651,\n \"changes\": {\n \"changedProperties\": [\n \"hs_lastmodifieddate\",\n \"quantity\",\n \"hs_product_id\"\n ],\n \"newAssociations\": [],\n \"removedAssociations\": [],\n \"newListMemberships\": [],\n \"removedListMemberships\": []\n }\n },\n {\n \"timestamp\": 1525298220133,\n \"changeType\": \"CHANGED\",\n \"objectId\": 9867373,\n \"changes\": {\n \"changedProperties\": [\n \"hs_lastmodifieddate\",\n \"quantity\"\n ],\n \"newAssociations\": [],\n \"removedAssociations\": [],\n \"newListMemberships\": [],\n \"removedListMemberships\": []\n }\n }\n]\n\nRequest URL for the next request,to only get items that changed\nafter the most recent change in the previous request:\nhttps://api.hubapi.com/crm-objects/v1/change-log/line_items?timestamp=1525298220133&changeType=CHANGED&objectId=9867373\n\nExample response:\n[\n {\n \"timestamp\": 1525298357009,\n \"changeType\": \"CREATED\",\n \"objectId\": 9867373,\n \"changes\": {\n \"changedProperties\": [\n \"hs_lastmodifieddate\",\n \"hs_product_id\",\n \"quantity\",\n \"price\",\n \"name\",\n \"description\"\n ],\n \"newAssociations\": [],\n \"removedAssociations\": [],\n \"newListMemberships\": [],\n \"removedListMemberships\": []\n }\n }\n]\n\nNext request URL:\nhttps://api.hubapi.com/crm-objects/v1/change-log/line_items?timestamp=1525298357009&changeType=CREATED&objectId=9867373\n"
Create a new line item. The request body should be a list of properties you want to set for the new line item, with each entry being the internal name of the property to be set, and the value of that property. You must set the hs_product_id property when creating a line item. This property needs to be the objectId of a product object, and represents the product being sold.
curl --request GET \
--url https://api.hubapi.com/crm-objects/v1/change-log/line_items
"\nExample GET URL:\nhttps://api.hubapi.com/crm-objects/v1/change-log/line_items\n\nExample response:\n[\n {\n \"timestamp\": 1525297495553,\n \"changeType\": \"CHANGED\",\n \"objectId\": 9845651,\n \"changes\": {\n \"changedProperties\": [\n \"hs_lastmodifieddate\",\n \"price\",\n \"quantity\"\n ],\n \"newAssociations\": [],\n \"removedAssociations\": [],\n \"newListMemberships\": [],\n \"removedListMemberships\": []\n }\n },\n {\n \"timestamp\": 1525297514887,\n \"changeType\": \"CHANGED\",\n \"objectId\": 9845651,\n \"changes\": {\n \"changedProperties\": [\n \"hs_lastmodifieddate\",\n \"quantity\",\n \"hs_product_id\"\n ],\n \"newAssociations\": [],\n \"removedAssociations\": [],\n \"newListMemberships\": [],\n \"removedListMemberships\": []\n }\n },\n {\n \"timestamp\": 1525298220133,\n \"changeType\": \"CHANGED\",\n \"objectId\": 9867373,\n \"changes\": {\n \"changedProperties\": [\n \"hs_lastmodifieddate\",\n \"quantity\"\n ],\n \"newAssociations\": [],\n \"removedAssociations\": [],\n \"newListMemberships\": [],\n \"removedListMemberships\": []\n }\n }\n]\n\nRequest URL for the next request,to only get items that changed\nafter the most recent change in the previous request:\nhttps://api.hubapi.com/crm-objects/v1/change-log/line_items?timestamp=1525298220133&changeType=CHANGED&objectId=9867373\n\nExample response:\n[\n {\n \"timestamp\": 1525298357009,\n \"changeType\": \"CREATED\",\n \"objectId\": 9867373,\n \"changes\": {\n \"changedProperties\": [\n \"hs_lastmodifieddate\",\n \"hs_product_id\",\n \"quantity\",\n \"price\",\n \"name\",\n \"description\"\n ],\n \"newAssociations\": [],\n \"removedAssociations\": [],\n \"newListMemberships\": [],\n \"removedListMemberships\": []\n }\n }\n]\n\nNext request URL:\nhttps://api.hubapi.com/crm-objects/v1/change-log/line_items?timestamp=1525298357009&changeType=CREATED&objectId=9867373\n"
Successful response - Create a new line item
The response is of type object
.
Was this page helpful?