POST
/
crm-objects
/
v1
/
objects
/
line_items
/
batch-update
Create a group of line items
curl --request POST \
  --url https://api.hubapi.com/crm-objects/v1/objects/line_items/batch-update
"\nExample POST URL:\nhttps://api.hubapi.com/crm-objects/v1/objects/line_items/batch-update?hapikey=demo\n\nExample POST data (updating 2 properties each for 2 line items):\n[\n  {\n    \"objectId\": 9890010,\n    \"properties\": [\n      {\n        \"name\": \"price\",\n        \"value\": \"55.00\"\n      },\n      {\n        \"name\": \"description\",\n        \"value\": \"This is an updated description for this item, it's getting a price change.\"\n      }\n    ]\n  },\n  {\n    \"objectId\": 9954744,\n    \"properties\": [\n      {\n        \"name\": \"name\",\n        \"value\": \"Updated name, new quantity\"\n      },\n      {\n        \"name\": \"quantity\",\n        \"value\": \"20\"\n      }\n    ]\n  }\n]\n\nExample Response:\n[\n  {\n    \"objectType\": \"LINE_ITEM\",\n    \"portalId\": 62515,\n    \"objectId\": 9890010,\n    \"properties\": {\n      \"amount\": {\n        \"versions\": [\n          {\n            \"name\": \"amount\",\n            \"value\": \"275.00\",\n            \"timestamp\": 0,\n            \"sourceId\": \"LineItemAmountCalculator\",\n            \"source\": \"CALCULATED\",\n            \"sourceVid\": []\n          },\n          {\n            \"name\": \"amount\",\n            \"value\": \"137.50\",\n            \"timestamp\": 0,\n            \"sourceId\": \"LineItemAmountCalculator\",\n            \"source\": \"CALCULATED\",\n            \"sourceVid\": []\n          }\n        ],\n        \"value\": \"275.00\",\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\": \"55.00\",\n            \"timestamp\": 1525372398002,\n            \"source\": \"API\",\n            \"sourceVid\": []\n          },\n          {\n            \"name\": \"price\",\n            \"value\": \"27.50\",\n            \"timestamp\": 1525359863627,\n            \"source\": \"API\",\n            \"sourceVid\": []\n          }\n        ],\n        \"value\": \"55.00\",\n        \"timestamp\": 1525372398002,\n        \"source\": \"API\",\n        \"sourceId\": null\n      },\n      \"description\": {\n        \"versions\": [\n          {\n            \"name\": \"description\",\n            \"value\": \"This is an updated description for this item, it's getting a price change.\",\n            \"timestamp\": 1525372398002,\n            \"source\": \"API\",\n            \"sourceVid\": []\n          },\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        \"value\": \"This is an updated description for this item, it's getting a price change.\",\n        \"timestamp\": 1525372398002,\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  },\n  {\n    \"objectType\": \"LINE_ITEM\",\n    \"portalId\": 62515,\n    \"objectId\": 9954744,\n    \"properties\": {\n      \"amount\": {\n        \"versions\": [\n          {\n            \"name\": \"amount\",\n            \"value\": \"200.00\",\n            \"timestamp\": 0,\n            \"sourceId\": \"LineItemAmountCalculator\",\n            \"source\": \"CALCULATED\",\n            \"sourceVid\": []\n          }\n        ],\n        \"value\": \"200.00\",\n        \"timestamp\": 0,\n        \"source\": \"CALCULATED\",\n        \"sourceId\": \"LineItemAmountCalculator\"\n      },\n      \"quantity\": {\n        \"versions\": [\n          {\n            \"name\": \"quantity\",\n            \"value\": \"20\",\n            \"timestamp\": 1525372398002,\n            \"source\": \"API\",\n            \"sourceVid\": []\n          }\n        ],\n        \"value\": \"20\",\n        \"timestamp\": 1525372398002,\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\": \"10.00\",\n            \"timestamp\": 1525287810508,\n            \"source\": \"API\",\n            \"sourceVid\": []\n          }\n        ],\n        \"value\": \"10.00\",\n        \"timestamp\": 1525287810508,\n        \"source\": \"API\",\n        \"sourceId\": null\n      },\n      \"name\": {\n        \"versions\": [\n          {\n            \"name\": \"name\",\n            \"value\": \"Updated name, new quantity\",\n            \"timestamp\": 1525372398002,\n            \"source\": \"API\",\n            \"sourceVid\": []\n          },\n          {\n            \"name\": \"name\",\n            \"value\": \"An updated product\",\n            \"timestamp\": 1525287810508,\n            \"source\": \"API\",\n            \"sourceVid\": []\n          }\n        ],\n        \"value\": \"Updated name, new quantity\",\n        \"timestamp\": 1525372398002,\n        \"source\": \"API\",\n        \"sourceId\": null\n      },\n      \"hs_product_id\": {\n        \"versions\": [\n          {\n            \"name\": \"hs_product_id\",\n            \"value\": \"1642736\",\n            \"timestamp\": 1525371444427,\n            \"source\": \"API\",\n            \"sourceVid\": []\n          }\n        ],\n        \"value\": \"1642736\",\n        \"timestamp\": 1525371444427,\n        \"source\": \"API\",\n        \"sourceId\": null\n      }\n    },\n    \"version\": 0,\n    \"isDeleted\": false\n  }\n]"

Response

200 - application/json

Successful response - Delete an existing line item

The response is of type object.