POST
/
crm-objects
/
v1
/
objects
/
line_items
/
batch-read
Get a group of line items by ID
curl --request POST \
  --url https://api.hubapi.com/crm-objects/v1/objects/line_items/batch-read
"\nExample POST URL (without properties):\nhttps://api.hubapi.com/crm-objects/v1/objects/line_items/batch-read\n\nExample POST JSON:\n{\n  \"ids\": [\n    9845651,\n    9867373\n  ]\n}\n\nExample Response:\n{\n  \"9845651\": {\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  \"9867373\": {\n    \"objectType\": \"LINE_ITEM\",\n    \"portalId\": 62515,\n    \"objectId\": 9867373,\n    \"properties\": {\n      \"hs_product_id\": {\n        \"versions\": [\n          {\n            \"name\": \"hs_product_id\",\n            \"value\": \"1645187\",\n            \"sourceVid\": []\n          }\n        ],\n        \"value\": \"1645187\",\n        \"timestamp\": 0,\n        \"source\": null,\n        \"sourceId\": null\n      }\n    },\n    \"version\": 1,\n    \"isDeleted\": false\n  }\n}\n\n\nExample POST URL (with properties):\nhttps://api.hubapi.com/crm-objects/v1/objects/line_items/batch-read?properties=name&properties=quantity&properties=price\n\nExample POST JSON:\n{\n  \"ids\": [\n    9845651,\n    9867373\n  ]\n}\n\nExample response:\n{\n  \"9845651\": {\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  },\n  \"9867373\": {\n    \"objectType\": \"LINE_ITEM\",\n    \"portalId\": 62515,\n    \"objectId\": 9867373,\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\": \"9.00\",\n            \"timestamp\": 1525369755209,\n            \"source\": \"API\",\n            \"sourceVid\": []\n          }\n        ],\n        \"value\": \"9.00\",\n        \"timestamp\": 1525369755209,\n        \"source\": \"API\",\n        \"sourceId\": null\n      },\n      \"name\": {\n        \"versions\": [\n          {\n            \"name\": \"name\",\n            \"value\": \"Widgets, special discount price\",\n            \"timestamp\": 1525369755209,\n            \"source\": \"API\",\n            \"sourceVid\": []\n          }\n        ],\n        \"value\": \"Widgets, special discount price\",\n        \"timestamp\": 1525369755209,\n        \"source\": \"API\",\n        \"sourceId\": null\n      },\n      \"hs_product_id\": {\n        \"versions\": [\n          {\n            \"name\": \"hs_product_id\",\n            \"value\": \"1645187\",\n            \"sourceVid\": []\n          }\n        ],\n        \"value\": \"1645187\",\n        \"timestamp\": 0,\n        \"source\": null,\n        \"sourceId\": null\n      }\n    },\n    \"version\": 1,\n    \"isDeleted\": false\n  }\n}"

Response

200 - application/json

Successful response - Create a group of line items

The response is of type object.