curl --request POST \
--url https://api.hubapi.com/crm-objects/v1/objects/line_items
"\nExample POST URL:\nhttps://api.hubapi.com/crm-objects/v1/objects/line_items\n\nExample POST JSON:\n[\n {\n \"name\": \"hs_product_id\",\n \"value\": \"1642736\"\n },\n {\n \"name\": \"quantity\",\n \"value\": \"50\"\n },\n {\n \"name\": \"price\",\n \"value\": \"9.50\"\n },\n {\n \"name\": \"name\",\n \"value\": \"A custom name for the product for this line item. Discounting 5% on bulk purchase.\"\n }\n]\n\nExample Response:\n{\n \"objectType\": \"LINE_ITEM\",\n \"portalId\": 62515,\n \"objectId\": 9867220,\n \"properties\": {\n \"amount\": {\n \"versions\": [\n {\n \"name\": \"amount\",\n \"value\": \"475.00\",\n \"timestamp\": 0,\n \"sourceId\": \"LineItemAmountCalculator\",\n \"source\": \"CALCULATED\",\n \"sourceVid\": []\n }\n ],\n \"value\": \"475.00\",\n \"timestamp\": 0,\n \"source\": \"CALCULATED\",\n \"sourceId\": \"LineItemAmountCalculator\"\n },\n \"quantity\": {\n \"versions\": [\n {\n \"name\": \"quantity\",\n \"value\": \"50\",\n \"timestamp\": 1525368534412,\n \"source\": \"API\",\n \"sourceVid\": []\n }\n ],\n \"value\": \"50\",\n \"timestamp\": 1525368534412,\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\": \"9.50\",\n \"timestamp\": 1525368534412,\n \"source\": \"API\",\n \"sourceVid\": []\n }\n ],\n \"value\": \"9.50\",\n \"timestamp\": 1525368534412,\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\": 1525368534412,\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\": 1525368534412,\n \"source\": \"API\",\n \"sourceId\": null\n },\n \"createdate\": {\n \"versions\": [\n {\n \"name\": \"createdate\",\n \"value\": \"0\",\n \"timestamp\": 0,\n \"source\": \"API\",\n \"sourceVid\": []\n }\n ],\n \"value\": \"0\",\n \"timestamp\": 0,\n \"source\": \"API\",\n \"sourceId\": null\n },\n \"description\": {\n \"versions\": [\n {\n \"name\": \"description\",\n \"value\": \"This product has an updated description and price.\",\n \"timestamp\": 1525287810508,\n \"source\": \"API\",\n \"sourceVid\": []\n }\n ],\n \"value\": \"This product has an updated description and price.\",\n \"timestamp\": 1525287810508,\n \"source\": \"API\",\n \"sourceId\": null\n },\n \"hs_product_id\": {\n \"versions\": [\n {\n \"name\": \"hs_product_id\",\n \"value\": \"1642736\",\n \"timestamp\": 1525368534412,\n \"source\": \"API\",\n \"sourceVid\": []\n }\n ],\n \"value\": \"1642736\",\n \"timestamp\": 1525368534412,\n \"source\": \"API\",\n \"sourceId\": null\n }\n },\n \"version\": 0,\n \"isDeleted\": false\n}"
Delete a group of existing line items. Up to 100 line items can be deleted in a single request. Note: This action cannot be undone. Deleted line items cannot be updated and there is no way to restore them.
curl --request POST \
--url https://api.hubapi.com/crm-objects/v1/objects/line_items
"\nExample POST URL:\nhttps://api.hubapi.com/crm-objects/v1/objects/line_items\n\nExample POST JSON:\n[\n {\n \"name\": \"hs_product_id\",\n \"value\": \"1642736\"\n },\n {\n \"name\": \"quantity\",\n \"value\": \"50\"\n },\n {\n \"name\": \"price\",\n \"value\": \"9.50\"\n },\n {\n \"name\": \"name\",\n \"value\": \"A custom name for the product for this line item. Discounting 5% on bulk purchase.\"\n }\n]\n\nExample Response:\n{\n \"objectType\": \"LINE_ITEM\",\n \"portalId\": 62515,\n \"objectId\": 9867220,\n \"properties\": {\n \"amount\": {\n \"versions\": [\n {\n \"name\": \"amount\",\n \"value\": \"475.00\",\n \"timestamp\": 0,\n \"sourceId\": \"LineItemAmountCalculator\",\n \"source\": \"CALCULATED\",\n \"sourceVid\": []\n }\n ],\n \"value\": \"475.00\",\n \"timestamp\": 0,\n \"source\": \"CALCULATED\",\n \"sourceId\": \"LineItemAmountCalculator\"\n },\n \"quantity\": {\n \"versions\": [\n {\n \"name\": \"quantity\",\n \"value\": \"50\",\n \"timestamp\": 1525368534412,\n \"source\": \"API\",\n \"sourceVid\": []\n }\n ],\n \"value\": \"50\",\n \"timestamp\": 1525368534412,\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\": \"9.50\",\n \"timestamp\": 1525368534412,\n \"source\": \"API\",\n \"sourceVid\": []\n }\n ],\n \"value\": \"9.50\",\n \"timestamp\": 1525368534412,\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\": 1525368534412,\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\": 1525368534412,\n \"source\": \"API\",\n \"sourceId\": null\n },\n \"createdate\": {\n \"versions\": [\n {\n \"name\": \"createdate\",\n \"value\": \"0\",\n \"timestamp\": 0,\n \"source\": \"API\",\n \"sourceVid\": []\n }\n ],\n \"value\": \"0\",\n \"timestamp\": 0,\n \"source\": \"API\",\n \"sourceId\": null\n },\n \"description\": {\n \"versions\": [\n {\n \"name\": \"description\",\n \"value\": \"This product has an updated description and price.\",\n \"timestamp\": 1525287810508,\n \"source\": \"API\",\n \"sourceVid\": []\n }\n ],\n \"value\": \"This product has an updated description and price.\",\n \"timestamp\": 1525287810508,\n \"source\": \"API\",\n \"sourceId\": null\n },\n \"hs_product_id\": {\n \"versions\": [\n {\n \"name\": \"hs_product_id\",\n \"value\": \"1642736\",\n \"timestamp\": 1525368534412,\n \"source\": \"API\",\n \"sourceVid\": []\n }\n ],\n \"value\": \"1642736\",\n \"timestamp\": 1525368534412,\n \"source\": \"API\",\n \"sourceId\": null\n }\n },\n \"version\": 0,\n \"isDeleted\": false\n}"
Successful response - Delete a group of existing line items
The response is of type object
.
Was this page helpful?