curl --request POST \
--url https://api.hubapi.com/crm-objects/v1/objects/products/batch-create
"\nExample POST URL:\nhttps://api.hubapi.com/crm-objects/v1/objects/products/batch-create\n\nExample POST JSON (creating two products):\n[\n [\n {\n \"name\": \"name\",\n \"value\": \"Another new product\"\n },\n {\n \"name\": \"description\",\n \"value\": \"A description of yet another product.\"\n },\n {\n \"name\": \"price\",\n \"value\": \"250.00\"\n },\n {\n \"name\": \"recurringbillingfrequency\",\n \"value\": \"annually\"\n }\n ],\n [\n {\n \"name\": \"name\",\n \"value\": \"A second new product\"\n },\n {\n \"name\": \"description\",\n \"value\": \"A description the second new product.\"\n },\n {\n \"name\": \"price\",\n \"value\": \"75.00\"\n },\n {\n \"name\": \"recurringbillingfrequency\",\n \"value\": \"hourly\"\n }\n ]\n]\n\nExample response:\n[\n {\n \"objectType\": \"PRODUCT\",\n \"portalId\": 62515,\n \"objectId\": 1645187,\n \"properties\": {\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\": \"250.00\",\n \"timestamp\": 1525289943771,\n \"source\": \"API\",\n \"sourceVid\": []\n }\n ],\n \"value\": \"250.00\",\n \"timestamp\": 1525289943771,\n \"source\": \"API\",\n \"sourceId\": null\n },\n \"name\": {\n \"versions\": [\n {\n \"name\": \"name\",\n \"value\": \"Another new product\",\n \"timestamp\": 1525289943771,\n \"source\": \"API\",\n \"sourceVid\": []\n }\n ],\n \"value\": \"Another new product\",\n \"timestamp\": 1525289943771,\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\": \"A description of yet another product.\",\n \"timestamp\": 1525289943771,\n \"source\": \"API\",\n \"sourceVid\": []\n }\n ],\n \"value\": \"A description of yet another product.\",\n \"timestamp\": 1525289943771,\n \"source\": \"API\",\n \"sourceId\": null\n },\n \"recurringbillingfrequency\": {\n \"versions\": [\n {\n \"name\": \"recurringbillingfrequency\",\n \"value\": \"annually\",\n \"timestamp\": 1525289943771,\n \"source\": \"API\",\n \"sourceVid\": []\n }\n ],\n \"value\": \"annually\",\n \"timestamp\": 1525289943771,\n \"source\": \"API\",\n \"sourceId\": null\n }\n },\n \"version\": 0,\n \"isDeleted\": false\n },\n {\n \"objectType\": \"PRODUCT\",\n \"portalId\": 62515,\n \"objectId\": 1642796,\n \"properties\": {\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\": \"75.00\",\n \"timestamp\": 1525289943771,\n \"source\": \"API\",\n \"sourceVid\": []\n }\n ],\n \"value\": \"75.00\",\n \"timestamp\": 1525289943771,\n \"source\": \"API\",\n \"sourceId\": null\n },\n \"name\": {\n \"versions\": [\n {\n \"name\": \"name\",\n \"value\": \"A second new product\",\n \"timestamp\": 1525289943771,\n \"source\": \"API\",\n \"sourceVid\": []\n }\n ],\n \"value\": \"A second new product\",\n \"timestamp\": 1525289943771,\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\": \"A description the second new product.\",\n \"timestamp\": 1525289943771,\n \"source\": \"API\",\n \"sourceVid\": []\n }\n ],\n \"value\": \"A description the second new product.\",\n \"timestamp\": 1525289943771,\n \"source\": \"API\",\n \"sourceId\": null\n },\n \"recurringbillingfrequency\": {\n \"versions\": [\n {\n \"name\": \"recurringbillingfrequency\",\n \"value\": \"hourly\",\n \"timestamp\": 1525289943771,\n \"source\": \"API\",\n \"sourceVid\": []\n }\n ],\n \"value\": \"hourly\",\n \"timestamp\": 1525289943771,\n \"source\": \"API\",\n \"sourceId\": null\n }\n },\n \"version\": 0,\n \"isDeleted\": false\n }\n]"
Delete a group of existing products. Up to 100 products can be deleted in a single request. Note: This action cannot be undone. Deleted products cannot be updated and there is no way to restore them
curl --request POST \
--url https://api.hubapi.com/crm-objects/v1/objects/products/batch-create
"\nExample POST URL:\nhttps://api.hubapi.com/crm-objects/v1/objects/products/batch-create\n\nExample POST JSON (creating two products):\n[\n [\n {\n \"name\": \"name\",\n \"value\": \"Another new product\"\n },\n {\n \"name\": \"description\",\n \"value\": \"A description of yet another product.\"\n },\n {\n \"name\": \"price\",\n \"value\": \"250.00\"\n },\n {\n \"name\": \"recurringbillingfrequency\",\n \"value\": \"annually\"\n }\n ],\n [\n {\n \"name\": \"name\",\n \"value\": \"A second new product\"\n },\n {\n \"name\": \"description\",\n \"value\": \"A description the second new product.\"\n },\n {\n \"name\": \"price\",\n \"value\": \"75.00\"\n },\n {\n \"name\": \"recurringbillingfrequency\",\n \"value\": \"hourly\"\n }\n ]\n]\n\nExample response:\n[\n {\n \"objectType\": \"PRODUCT\",\n \"portalId\": 62515,\n \"objectId\": 1645187,\n \"properties\": {\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\": \"250.00\",\n \"timestamp\": 1525289943771,\n \"source\": \"API\",\n \"sourceVid\": []\n }\n ],\n \"value\": \"250.00\",\n \"timestamp\": 1525289943771,\n \"source\": \"API\",\n \"sourceId\": null\n },\n \"name\": {\n \"versions\": [\n {\n \"name\": \"name\",\n \"value\": \"Another new product\",\n \"timestamp\": 1525289943771,\n \"source\": \"API\",\n \"sourceVid\": []\n }\n ],\n \"value\": \"Another new product\",\n \"timestamp\": 1525289943771,\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\": \"A description of yet another product.\",\n \"timestamp\": 1525289943771,\n \"source\": \"API\",\n \"sourceVid\": []\n }\n ],\n \"value\": \"A description of yet another product.\",\n \"timestamp\": 1525289943771,\n \"source\": \"API\",\n \"sourceId\": null\n },\n \"recurringbillingfrequency\": {\n \"versions\": [\n {\n \"name\": \"recurringbillingfrequency\",\n \"value\": \"annually\",\n \"timestamp\": 1525289943771,\n \"source\": \"API\",\n \"sourceVid\": []\n }\n ],\n \"value\": \"annually\",\n \"timestamp\": 1525289943771,\n \"source\": \"API\",\n \"sourceId\": null\n }\n },\n \"version\": 0,\n \"isDeleted\": false\n },\n {\n \"objectType\": \"PRODUCT\",\n \"portalId\": 62515,\n \"objectId\": 1642796,\n \"properties\": {\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\": \"75.00\",\n \"timestamp\": 1525289943771,\n \"source\": \"API\",\n \"sourceVid\": []\n }\n ],\n \"value\": \"75.00\",\n \"timestamp\": 1525289943771,\n \"source\": \"API\",\n \"sourceId\": null\n },\n \"name\": {\n \"versions\": [\n {\n \"name\": \"name\",\n \"value\": \"A second new product\",\n \"timestamp\": 1525289943771,\n \"source\": \"API\",\n \"sourceVid\": []\n }\n ],\n \"value\": \"A second new product\",\n \"timestamp\": 1525289943771,\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\": \"A description the second new product.\",\n \"timestamp\": 1525289943771,\n \"source\": \"API\",\n \"sourceVid\": []\n }\n ],\n \"value\": \"A description the second new product.\",\n \"timestamp\": 1525289943771,\n \"source\": \"API\",\n \"sourceId\": null\n },\n \"recurringbillingfrequency\": {\n \"versions\": [\n {\n \"name\": \"recurringbillingfrequency\",\n \"value\": \"hourly\",\n \"timestamp\": 1525289943771,\n \"source\": \"API\",\n \"sourceVid\": []\n }\n ],\n \"value\": \"hourly\",\n \"timestamp\": 1525289943771,\n \"source\": \"API\",\n \"sourceId\": null\n }\n },\n \"version\": 0,\n \"isDeleted\": false\n }\n]"
Successful response - Delete a group of existing products
The response is of type object
.
Was this page helpful?