{"info":{"_postman_id":"2179418f-48d4-48ab-a93c-be04465a1f1a","name":"Proton API Documentation","description":"<html><head></head><body><p>The Proton API consist of an AI-powered suite of REST API endpoints available to be called to return product recommendations and/or perform actions related to the Proton.ai solutions.</p>\n<p>For any requests to go through, a valid API key should be present in the header of the request. The API key will be static - we will supply it at the beginning of the integration and you won't need to dynamically generate or refresh it.</p>\n</body></html>","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","toc":[],"owner":"7131210","collectionId":"2179418f-48d4-48ab-a93c-be04465a1f1a","publishedId":"T1DtdadU","public":true,"customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"2169D4"},"publishDate":"2023-10-13T11:10:19.000Z"},"item":[{"name":"Recommendations","item":[{"name":"(Light) Complete Cart Recommendations","id":"4cd211e2-1386-4e93-8d07-d8a9b9774cb3","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"X-User-Id","type":"text","value":"{{user_id}}"},{"key":"X-Company","type":"text","value":"{{company}}"},{"key":"X-Api-Key","type":"text","value":"{{api_key}}"}],"url":"{{domain}}/{{company}}/product/recommendations/cart_lite?customer_id={{customer_id}}&count={{count}}&user_id={{user_id}}","description":"<p>This is a different flavor of the same API as the other Complete Cart but the cart is inferred through tracking data. The API only supplies the identifier of the customer and Proton infers the cart based on the items that have been to track in the past 24h.</p>\n<p>Usage is only suggested for use-cases where the explicit cart is not possible to fetch.</p>\n","urlObject":{"path":["{{company}}","product","recommendations","cart_lite"],"host":["{{domain}}"],"query":[{"description":{"content":"<p>{{customer_id_description}}</p>\n","type":"text/plain"},"key":"customer_id","value":"{{customer_id}}"},{"description":{"content":"<p>{{count_description}}</p>\n","type":"text/plain"},"key":"count","value":"{{count}}"},{"description":{"content":"<p>{{user_id_description}}</p>\n","type":"text/plain"},"key":"user_id","value":"{{user_id}}"}],"variable":[]}},"response":[],"_postman_id":"4cd211e2-1386-4e93-8d07-d8a9b9774cb3"},{"name":"Reorder Recommendations","id":"31ea1603-499b-41c3-bdf4-e0e55dab1006","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"X-User-Id","type":"text","value":"{{user_id}}"},{"key":"X-Company","type":"text","value":"{{company}}"},{"key":"X-Api-Key","type":"text","value":"{{api_key}}"}],"url":"{{domain}}/{{company}}/product/recommendations/periodic?customer_id={{customer_id}}&count={{count}}&user_id={{user_id}}","description":"<p>Recommends products this customer has purchased before and is due to order again. Proton uses purchasing patterns to prioritize products that the customer is most likely to reorder.</p>\n","urlObject":{"path":["{{company}}","product","recommendations","periodic"],"host":["{{domain}}"],"query":[{"description":{"content":"<p>{{customer_id_description}}</p>\n","type":"text/plain"},"key":"customer_id","value":"{{customer_id}}"},{"description":{"content":"<p>{{count_description}}</p>\n","type":"text/plain"},"key":"count","value":"{{count}}"},{"description":{"content":"<p>{{user_id_description}}</p>\n","type":"text/plain"},"key":"user_id","value":"{{user_id}}"}],"variable":[]}},"response":[{"id":"bcd891c9-b4f6-4410-9729-7a0664526dfd","name":"Reorder","originalRequest":{"method":"GET","header":[{"key":"X-User-Id","type":"text","value":"{{user_id}}"},{"key":"X-Company","type":"text","value":"{{company}}"},{"key":"X-Api-Key","type":"text","value":"{{api_key}}"}],"url":{"raw":"{{domain}}/{{company}}/product/recommendations/periodic?customer_id={{customer_id}}&count={{count}}&user_id={{user_id}}","host":["{{domain}}"],"path":["{{company}}","product","recommendations","periodic"],"query":[{"key":"customer_id","value":"{{customer_id}}"},{"key":"count","value":"{{count}}"},{"key":"user_id","value":"{{user_id}}","description":"the offset, for quasi-pagination"}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Server","value":"nginx/1.14.1"},{"key":"Date","value":"Wed, 06 Jul 2022 12:12:04 GMT"},{"key":"Content-Type","value":"application/json"},{"key":"Transfer-Encoding","value":"chunked"},{"key":"Connection","value":"keep-alive"},{"key":"Access-Control-Allow-Credentials","value":"true"},{"key":"Access-Control-Allow-Methods","value":"GET, POST, OPTIONS"},{"key":"Access-Control-Allow-Headers","value":"DNT,User-Agent,X-User-ID,X-Company,X-Api-Key,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Range,X-Proton-Beta,X-Proton-Frontend-Beta,X-Client-Platform,X-Transaction-ID"},{"key":"Access-Control-Expose-Headers","value":"Content-Length,Content-Range"},{"key":"Content-Encoding","value":"gzip"}],"cookie":[],"responseTime":null,"body":"{\n    \"status_message\": \"SUCCESS\",\n    \"data\": [\n        {\n            \"product_id\": \"ABC\",\n            \"name\": \"Apple iPad\",\n            \"product_super_category\": \"Miscellaneous\",\n            \"product_category\": \"Test Category\",\n            \"manufacturer\": \"Test Manufacturer\",\n            \"description\": \"This is a test\",\n            \"image_url\": \"https://proton.ai/lib_GtGPpbKCmmxDoqOm/dpswabrsvcb9qu4g.png?w=376\",\n            \"url\": \"https://proton.ai/\"\n        },\n        {\n            \"product_id\": \"DEF\",\n            \"name\": \"Apple iPad\",\n            \"product_super_category\": \"Miscellaneous\",\n            \"product_category\": \"Test Category\",\n            \"manufacturer\": \"Test Manufacturer\",\n            \"description\": \"This is a test\",\n            \"image_url\": \"https://proton.ai/lib_GtGPpbKCmmxDoqOm/dpswabrsvcb9qu4g.png?w=376\",\n            \"url\": \"https://proton.ai/\"\n        },\n        {\n            \"product_id\": \"GHI\",\n            \"name\": \"Apple iPad\",\n            \"product_super_category\": \"Miscellaneous\",\n            \"product_category\": \"Test Category\",\n            \"manufacturer\": \"Test Manufacturer\",\n            \"description\": \"This is a test\",\n            \"image_url\": \"https://proton.ai/lib_GtGPpbKCmmxDoqOm/dpswabrsvcb9qu4g.png?w=376\",\n            \"url\": \"https://proton.ai/\"\n        },\n        {\n            \"product_id\": \"JKL\",\n            \"name\": \"Apple iPad\",\n            \"product_super_category\": \"Miscellaneous\",\n            \"product_category\": \"Test Category\",\n            \"manufacturer\": \"Test Manufacturer\",\n            \"description\": \"This is a test\",\n            \"image_url\": \"https://proton.ai/lib_GtGPpbKCmmxDoqOm/dpswabrsvcb9qu4g.png?w=376\",\n            \"url\": \"https://proton.ai/\"\n        },\n        {\n            \"product_id\": \"MNO\",\n            \"name\": \"Apple iPad\",\n            \"product_super_category\": \"Miscellaneous\",\n            \"product_category\": \"Test Category\",\n            \"manufacturer\": \"Test Manufacturer\",\n            \"description\": \"This is a test\",\n            \"image_url\": \"https://proton.ai/lib_GtGPpbKCmmxDoqOm/dpswabrsvcb9qu4g.png?w=376\",\n            \"url\": \"https://proton.ai/\"\n        }\n    ],\n    \"product_id\": [\n        \"{{product_id}}\"\n    ],\n    \"customer_id\": [\n        \"{{customer_id}}\"\n    ],\n    \"count\": [\n        \"{{count}}\"\n    ],\n    \"user_id\": [\n        \"{{user_id}}\"\n    ]\n}"}],"_postman_id":"31ea1603-499b-41c3-bdf4-e0e55dab1006"},{"name":"New Recommendations","id":"1d5a261b-814d-4497-9769-2c9f63036261","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"X-User-Id","type":"text","value":"{{user_id}}"},{"key":"X-Company","type":"text","value":"{{company}}"},{"key":"X-Api-Key","type":"text","value":"{{api_key}}"}],"url":"{{domain}}/{{company}}/product/recommendations?customer_id={{customer_id}}&count={{count}}&user_id={{user_id}}","description":"<p>Recommends products this customer hasn’t ordered before (or recently) that could be a good fit for them. Proton looks at products purchased by similar customers to make these recommendations.</p>\n","urlObject":{"path":["{{company}}","product","recommendations"],"host":["{{domain}}"],"query":[{"description":{"content":"<p>{{customer_id_description}}</p>\n","type":"text/plain"},"key":"customer_id","value":"{{customer_id}}"},{"description":{"content":"<p>{{count_description}}</p>\n","type":"text/plain"},"key":"count","value":"{{count}}"},{"description":{"content":"<p>{{user_id_description}}</p>\n","type":"text/plain"},"key":"user_id","value":"{{user_id}}"}],"variable":[]}},"response":[{"id":"8a8823ec-b20e-4b80-8d90-ba1b79a29e2d","name":"New Recommendations","originalRequest":{"method":"GET","header":[{"key":"X-User-Id","type":"text","value":"{{user_id}}"},{"key":"X-Company","type":"text","value":"{{company}}"},{"key":"X-Api-Key","type":"text","value":"{{api_key}}"}],"url":{"raw":"{{domain}}/{{company}}/product/recommendations?customer_id={{customer_id}}&count={{count}}&user_id={{user_id}}","host":["{{domain}}"],"path":["{{company}}","product","recommendations"],"query":[{"key":"customer_id","value":"{{customer_id}}"},{"key":"count","value":"{{count}}"},{"key":"user_id","value":"{{user_id}}","description":"the offset, for quasi-pagination"}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Server","value":"nginx/1.14.1"},{"key":"Date","value":"Wed, 06 Jul 2022 12:12:04 GMT"},{"key":"Content-Type","value":"application/json"},{"key":"Transfer-Encoding","value":"chunked"},{"key":"Connection","value":"keep-alive"},{"key":"Access-Control-Allow-Credentials","value":"true"},{"key":"Access-Control-Allow-Methods","value":"GET, POST, OPTIONS"},{"key":"Access-Control-Allow-Headers","value":"DNT,User-Agent,X-User-ID,X-Company,X-Api-Key,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Range,X-Proton-Beta,X-Proton-Frontend-Beta,X-Client-Platform,X-Transaction-ID"},{"key":"Access-Control-Expose-Headers","value":"Content-Length,Content-Range"},{"key":"Content-Encoding","value":"gzip"}],"cookie":[],"responseTime":null,"body":"{\n    \"status_message\": \"SUCCESS\",\n    \"data\": [\n        {\n            \"product_id\": \"ABC\",\n            \"name\": \"Apple iPad\",\n            \"product_super_category\": \"Miscellaneous\",\n            \"product_category\": \"Test Category\",\n            \"manufacturer\": \"Test Manufacturer\",\n            \"description\": \"This is a test\",\n            \"image_url\": \"https://proton.ai/lib_GtGPpbKCmmxDoqOm/dpswabrsvcb9qu4g.png?w=376\",\n            \"url\": \"https://proton.ai/\"\n        },\n        {\n            \"product_id\": \"DEF\",\n            \"name\": \"Apple iPad\",\n            \"product_super_category\": \"Miscellaneous\",\n            \"product_category\": \"Test Category\",\n            \"manufacturer\": \"Test Manufacturer\",\n            \"description\": \"This is a test\",\n            \"image_url\": \"https://proton.ai/lib_GtGPpbKCmmxDoqOm/dpswabrsvcb9qu4g.png?w=376\",\n            \"url\": \"https://proton.ai/\"\n        },\n        {\n            \"product_id\": \"GHI\",\n            \"name\": \"Apple iPad\",\n            \"product_super_category\": \"Miscellaneous\",\n            \"product_category\": \"Test Category\",\n            \"manufacturer\": \"Test Manufacturer\",\n            \"description\": \"This is a test\",\n            \"image_url\": \"https://proton.ai/lib_GtGPpbKCmmxDoqOm/dpswabrsvcb9qu4g.png?w=376\",\n            \"url\": \"https://proton.ai/\"\n        },\n        {\n            \"product_id\": \"JKL\",\n            \"name\": \"Apple iPad\",\n            \"product_super_category\": \"Miscellaneous\",\n            \"product_category\": \"Test Category\",\n            \"manufacturer\": \"Test Manufacturer\",\n            \"description\": \"This is a test\",\n            \"image_url\": \"https://proton.ai/lib_GtGPpbKCmmxDoqOm/dpswabrsvcb9qu4g.png?w=376\",\n            \"url\": \"https://proton.ai/\"\n        },\n        {\n            \"product_id\": \"MNO\",\n            \"name\": \"Apple iPad\",\n            \"product_super_category\": \"Miscellaneous\",\n            \"product_category\": \"Test Category\",\n            \"manufacturer\": \"Test Manufacturer\",\n            \"description\": \"This is a test\",\n            \"image_url\": \"https://proton.ai/lib_GtGPpbKCmmxDoqOm/dpswabrsvcb9qu4g.png?w=376\",\n            \"url\": \"https://proton.ai/\"\n        }\n    ],\n    \"product_id\": [\n        \"{{product_id}}\"\n    ],\n    \"customer_id\": [\n        \"{{customer_id}}\"\n    ],\n    \"count\": [\n        \"{{count}}\"\n    ],\n    \"user_id\": [\n        \"{{user_id}}\"\n    ]\n}"}],"_postman_id":"1d5a261b-814d-4497-9769-2c9f63036261"},{"name":"Bought Also Bought","id":"bd1a3af4-b48b-411c-846c-32c0ea4fcf6e","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"X-User-Id","type":"text","value":"{{user_id}}"},{"key":"X-Company","type":"text","value":"{{company}}"},{"key":"X-Api-Key","type":"text","value":"{{api_key}}"}],"url":"{{domain}}/{{company}}/product/recommendations/bought?customer_id={{customer_id}}&count={{count}}&user_id={{user_id}}&product_id={{product_id}}","description":"<p>Recommends products that are often bought together with the input product. \"People that Buy X also Buy Y\"</p>\n","urlObject":{"path":["{{company}}","product","recommendations","bought"],"host":["{{domain}}"],"query":[{"description":{"content":"<p>{{customer_id_description}}</p>\n","type":"text/plain"},"key":"customer_id","value":"{{customer_id}}"},{"description":{"content":"<p>{{count_description}}</p>\n","type":"text/plain"},"key":"count","value":"{{count}}"},{"description":{"content":"<p>{{user_id_description}}</p>\n","type":"text/plain"},"key":"user_id","value":"{{user_id}}"},{"description":{"content":"<p>{{product_id_description}}</p>\n","type":"text/plain"},"key":"product_id","value":"{{product_id}}"}],"variable":[]}},"response":[{"id":"f4c4802a-9e01-4b1d-9ed7-d046a3f97801","name":"Bought Together","originalRequest":{"method":"GET","header":[{"key":"X-User-Id","type":"text","value":"{{user_id}}"},{"key":"X-Company","type":"text","value":"{{company}}"},{"key":"X-Api-Key","type":"text","value":"{{api_key}}"}],"url":{"raw":"{{domain}}/{{company}}/product/recommendations/bought?customer_id={{customer_id}}&count={{count}}&user_id={{user_id}}&product_id={{product_id}}","host":["{{domain}}"],"path":["{{company}}","product","recommendations","bought"],"query":[{"key":"customer_id","value":"{{customer_id}}"},{"key":"count","value":"{{count}}"},{"key":"user_id","value":"{{user_id}}","description":"the offset, for quasi-pagination"},{"key":"product_id","value":"{{product_id}}"}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Server","value":"nginx/1.14.1"},{"key":"Date","value":"Wed, 06 Jul 2022 12:12:04 GMT"},{"key":"Content-Type","value":"application/json"},{"key":"Transfer-Encoding","value":"chunked"},{"key":"Connection","value":"keep-alive"},{"key":"Access-Control-Allow-Credentials","value":"true"},{"key":"Access-Control-Allow-Methods","value":"GET, POST, OPTIONS"},{"key":"Access-Control-Allow-Headers","value":"DNT,User-Agent,X-User-ID,X-Company,X-Api-Key,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Range,X-Proton-Beta,X-Proton-Frontend-Beta,X-Client-Platform,X-Transaction-ID"},{"key":"Access-Control-Expose-Headers","value":"Content-Length,Content-Range"},{"key":"Content-Encoding","value":"gzip"}],"cookie":[],"responseTime":null,"body":"{\n    \"status_message\": \"SUCCESS\",\n    \"data\": [\n        {\n            \"product_id\": \"ABC\",\n            \"name\": \"Apple iPad\",\n            \"product_super_category\": \"Miscellaneous\",\n            \"product_category\": \"Test Category\",\n            \"manufacturer\": \"Test Manufacturer\",\n            \"description\": \"This is a test\",\n            \"image_url\": \"https://proton.ai/lib_GtGPpbKCmmxDoqOm/dpswabrsvcb9qu4g.png?w=376\",\n            \"url\": \"https://proton.ai/\"\n        },\n        {\n            \"product_id\": \"DEF\",\n            \"name\": \"Apple iPad\",\n            \"product_super_category\": \"Miscellaneous\",\n            \"product_category\": \"Test Category\",\n            \"manufacturer\": \"Test Manufacturer\",\n            \"description\": \"This is a test\",\n            \"image_url\": \"https://proton.ai/lib_GtGPpbKCmmxDoqOm/dpswabrsvcb9qu4g.png?w=376\",\n            \"url\": \"https://proton.ai/\"\n        },\n        {\n            \"product_id\": \"GHI\",\n            \"name\": \"Apple iPad\",\n            \"product_super_category\": \"Miscellaneous\",\n            \"product_category\": \"Test Category\",\n            \"manufacturer\": \"Test Manufacturer\",\n            \"description\": \"This is a test\",\n            \"image_url\": \"https://proton.ai/lib_GtGPpbKCmmxDoqOm/dpswabrsvcb9qu4g.png?w=376\",\n            \"url\": \"https://proton.ai/\"\n        },\n        {\n            \"product_id\": \"JKL\",\n            \"name\": \"Apple iPad\",\n            \"product_super_category\": \"Miscellaneous\",\n            \"product_category\": \"Test Category\",\n            \"manufacturer\": \"Test Manufacturer\",\n            \"description\": \"This is a test\",\n            \"image_url\": \"https://proton.ai/lib_GtGPpbKCmmxDoqOm/dpswabrsvcb9qu4g.png?w=376\",\n            \"url\": \"https://proton.ai/\"\n        },\n        {\n            \"product_id\": \"MNO\",\n            \"name\": \"Apple iPad\",\n            \"product_super_category\": \"Miscellaneous\",\n            \"product_category\": \"Test Category\",\n            \"manufacturer\": \"Test Manufacturer\",\n            \"description\": \"This is a test\",\n            \"image_url\": \"https://proton.ai/lib_GtGPpbKCmmxDoqOm/dpswabrsvcb9qu4g.png?w=376\",\n            \"url\": \"https://proton.ai/\"\n        }\n    ],\n    \"product_id\": [\n        \"{{product_id}}\"\n    ],\n    \"customer_id\": [\n        \"{{customer_id}}\"\n    ],\n    \"count\": [\n        \"{{count}}\"\n    ],\n    \"user_id\": [\n        \"{{user_id}}\"\n    ]\n}"}],"_postman_id":"bd1a3af4-b48b-411c-846c-32c0ea4fcf6e"},{"name":"Similar Items","id":"54b796e7-9aa1-477d-9a31-2abf282dc69d","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"X-User-Id","type":"text","value":"{{user_id}}"},{"key":"X-Company","type":"text","value":"{{company}}"},{"key":"X-Api-Key","type":"text","value":"{{api_key}}"}],"url":"{{domain}}/{{company}}/product/recommendations/similar?product_id={{product_id}}&customer_id={{customer_id}}&count={{count}}&user_id={{user_id}}","description":"<p>Recommends products that are similar to the input product. Proton uses Natural Language Processing (NLP) to match products that contain similar name, descriptions, specifications etc.</p>\n","urlObject":{"path":["{{company}}","product","recommendations","similar"],"host":["{{domain}}"],"query":[{"description":{"content":"<p>{{product_id_description}}</p>\n","type":"text/plain"},"key":"product_id","value":"{{product_id}}"},{"description":{"content":"<p>{{customer_id_description}}</p>\n","type":"text/plain"},"key":"customer_id","value":"{{customer_id}}"},{"description":{"content":"<p>{{count_description}}</p>\n","type":"text/plain"},"key":"count","value":"{{count}}"},{"description":{"content":"<p>{{user_id}}</p>\n","type":"text/plain"},"key":"user_id","value":"{{user_id}}"}],"variable":[]}},"response":[{"id":"b548c84d-3fd7-46c9-b6f1-5940e8ba7cab","name":"Similar Items","originalRequest":{"method":"GET","header":[{"key":"X-User-Id","type":"text","value":"{{user_id}}"},{"key":"X-Company","type":"text","value":"{{company}}"},{"key":"X-Api-Key","type":"text","value":"{{api_key}}"}],"url":{"raw":"{{domain}}/{{company}}/product/recommendations/similar?product_id={{product_id}}&customer_id={{customer_id}}&count={{count}}&user_id={{user_id}}","host":["{{domain}}"],"path":["{{company}}","product","recommendations","similar"],"query":[{"key":"product_id","value":"{{product_id}}"},{"key":"customer_id","value":"{{customer_id}}"},{"key":"count","value":"{{count}}"},{"key":"user_id","value":"{{user_id}}","description":"the offset, for quasi-pagination"}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Server","value":"nginx/1.14.1"},{"key":"Date","value":"Wed, 06 Jul 2022 12:12:04 GMT"},{"key":"Content-Type","value":"application/json"},{"key":"Transfer-Encoding","value":"chunked"},{"key":"Connection","value":"keep-alive"},{"key":"Access-Control-Allow-Credentials","value":"true"},{"key":"Access-Control-Allow-Methods","value":"GET, POST, OPTIONS"},{"key":"Access-Control-Allow-Headers","value":"DNT,User-Agent,X-User-ID,X-Company,X-Api-Key,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Range,X-Proton-Beta,X-Proton-Frontend-Beta,X-Client-Platform,X-Transaction-ID"},{"key":"Access-Control-Expose-Headers","value":"Content-Length,Content-Range"},{"key":"Content-Encoding","value":"gzip"}],"cookie":[],"responseTime":null,"body":"{\n    \"status_message\": \"SUCCESS\",\n    \"data\": [\n        {\n            \"product_id\": \"ABC\",\n            \"name\": \"Apple iPad\",\n            \"product_super_category\": \"Miscellaneous\",\n            \"product_category\": \"Test Category\",\n            \"manufacturer\": \"Test Manufacturer\",\n            \"description\": \"This is a test\",\n            \"image_url\": \"https://proton.ai/lib_GtGPpbKCmmxDoqOm/dpswabrsvcb9qu4g.png?w=376\",\n            \"url\": \"https://proton.ai/\"\n        },\n        {\n            \"product_id\": \"DEF\",\n            \"name\": \"Apple iPad\",\n            \"product_super_category\": \"Miscellaneous\",\n            \"product_category\": \"Test Category\",\n            \"manufacturer\": \"Test Manufacturer\",\n            \"description\": \"This is a test\",\n            \"image_url\": \"https://proton.ai/lib_GtGPpbKCmmxDoqOm/dpswabrsvcb9qu4g.png?w=376\",\n            \"url\": \"https://proton.ai/\"\n        },\n        {\n            \"product_id\": \"GHI\",\n            \"name\": \"Apple iPad\",\n            \"product_super_category\": \"Miscellaneous\",\n            \"product_category\": \"Test Category\",\n            \"manufacturer\": \"Test Manufacturer\",\n            \"description\": \"This is a test\",\n            \"image_url\": \"https://proton.ai/lib_GtGPpbKCmmxDoqOm/dpswabrsvcb9qu4g.png?w=376\",\n            \"url\": \"https://proton.ai/\"\n        },\n        {\n            \"product_id\": \"JKL\",\n            \"name\": \"Apple iPad\",\n            \"product_super_category\": \"Miscellaneous\",\n            \"product_category\": \"Test Category\",\n            \"manufacturer\": \"Test Manufacturer\",\n            \"description\": \"This is a test\",\n            \"image_url\": \"https://proton.ai/lib_GtGPpbKCmmxDoqOm/dpswabrsvcb9qu4g.png?w=376\",\n            \"url\": \"https://proton.ai/\"\n        },\n        {\n            \"product_id\": \"MNO\",\n            \"name\": \"Apple iPad\",\n            \"product_super_category\": \"Miscellaneous\",\n            \"product_category\": \"Test Category\",\n            \"manufacturer\": \"Test Manufacturer\",\n            \"description\": \"This is a test\",\n            \"image_url\": \"https://proton.ai/lib_GtGPpbKCmmxDoqOm/dpswabrsvcb9qu4g.png?w=376\",\n            \"url\": \"https://proton.ai/\"\n        }\n    ],\n    \"product_id\": [\n        \"{{product_id}}\"\n    ],\n    \"customer_id\": [\n        \"{{customer_id}}\"\n    ],\n    \"count\": [\n        \"{{count}}\"\n    ],\n    \"user_id\": [\n        \"{{user_id}}\"\n    ]\n}"}],"_postman_id":"54b796e7-9aa1-477d-9a31-2abf282dc69d"},{"name":"Recently Viewed Recommendations","id":"9a17763e-d198-4350-a115-51cfaac65512","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"X-User-Id","type":"text","value":"{{user_id}}"},{"key":"X-Company","type":"text","value":"{{company}}"},{"key":"X-Api-Key","type":"text","value":"{{api_key}}"}],"url":"{{domain}}/{{company}}/product/recommendations/recent?customer_id={{customer_id}}&count={{count}}&user_id={{user_id}}","description":"<p>Shows products that the account has recently visited. This recommendation is powered through the <a href=\"https://api.proton.ai/#8a97b4bc-8686-48aa-b796-02692e57c97b\">Track - Product View</a> Tracking API. No logic/AI is involved in this recommendation.</p>\n","urlObject":{"path":["{{company}}","product","recommendations","recent"],"host":["{{domain}}"],"query":[{"description":{"content":"<p>{{customer_id_description}}</p>\n","type":"text/plain"},"key":"customer_id","value":"{{customer_id}}"},{"description":{"content":"<p>{{count_description}}</p>\n","type":"text/plain"},"key":"count","value":"{{count}}"},{"description":{"content":"<p>{{user_id_description}}</p>\n","type":"text/plain"},"key":"user_id","value":"{{user_id}}"}],"variable":[]}},"response":[{"id":"3490811e-5229-4c22-baa8-07d5ac652515","name":"Bought Together Copy","originalRequest":{"method":"GET","header":[{"key":"X-User-Id","type":"text","value":"{{user_id}}"},{"key":"X-Company","type":"text","value":"{{company}}"},{"key":"X-Api-Key","type":"text","value":"{{api_key}}"}],"url":{"raw":"{{domain}}/{{company}}/product/recommendations/recent?customer_id={{customer_id}}&count={{count}}&user_id={{user_id}}","host":["{{domain}}"],"path":["{{company}}","product","recommendations","recent"],"query":[{"key":"customer_id","value":"{{customer_id}}"},{"key":"count","value":"{{count}}"},{"key":"user_id","value":"{{user_id}}","description":"the offset, for quasi-pagination"}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Server","value":"nginx/1.14.1"},{"key":"Date","value":"Wed, 06 Jul 2022 12:12:04 GMT"},{"key":"Content-Type","value":"application/json"},{"key":"Transfer-Encoding","value":"chunked"},{"key":"Connection","value":"keep-alive"},{"key":"Access-Control-Allow-Credentials","value":"true"},{"key":"Access-Control-Allow-Methods","value":"GET, POST, OPTIONS"},{"key":"Access-Control-Allow-Headers","value":"DNT,User-Agent,X-User-ID,X-Company,X-Api-Key,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Range,X-Proton-Beta,X-Proton-Frontend-Beta,X-Client-Platform,X-Transaction-ID"},{"key":"Access-Control-Expose-Headers","value":"Content-Length,Content-Range"},{"key":"Content-Encoding","value":"gzip"}],"cookie":[],"responseTime":null,"body":"{\n    \"status_message\": \"SUCCESS\",\n    \"data\": [\n        {\n            \"product_id\": \"ABC\",\n            \"name\": \"Apple iPad\",\n            \"product_super_category\": \"Miscellaneous\",\n            \"product_category\": \"Test Category\",\n            \"manufacturer\": \"Test Manufacturer\",\n            \"description\": \"This is a test\",\n            \"image_url\": \"https://proton.ai/lib_GtGPpbKCmmxDoqOm/dpswabrsvcb9qu4g.png?w=376\",\n            \"url\": \"https://proton.ai/\"\n        },\n        {\n            \"product_id\": \"DEF\",\n            \"name\": \"Apple iPad\",\n            \"product_super_category\": \"Miscellaneous\",\n            \"product_category\": \"Test Category\",\n            \"manufacturer\": \"Test Manufacturer\",\n            \"description\": \"This is a test\",\n            \"image_url\": \"https://proton.ai/lib_GtGPpbKCmmxDoqOm/dpswabrsvcb9qu4g.png?w=376\",\n            \"url\": \"https://proton.ai/\"\n        },\n        {\n            \"product_id\": \"GHI\",\n            \"name\": \"Apple iPad\",\n            \"product_super_category\": \"Miscellaneous\",\n            \"product_category\": \"Test Category\",\n            \"manufacturer\": \"Test Manufacturer\",\n            \"description\": \"This is a test\",\n            \"image_url\": \"https://proton.ai/lib_GtGPpbKCmmxDoqOm/dpswabrsvcb9qu4g.png?w=376\",\n            \"url\": \"https://proton.ai/\"\n        },\n        {\n            \"product_id\": \"JKL\",\n            \"name\": \"Apple iPad\",\n            \"product_super_category\": \"Miscellaneous\",\n            \"product_category\": \"Test Category\",\n            \"manufacturer\": \"Test Manufacturer\",\n            \"description\": \"This is a test\",\n            \"image_url\": \"https://proton.ai/lib_GtGPpbKCmmxDoqOm/dpswabrsvcb9qu4g.png?w=376\",\n            \"url\": \"https://proton.ai/\"\n        },\n        {\n            \"product_id\": \"MNO\",\n            \"name\": \"Apple iPad\",\n            \"product_super_category\": \"Miscellaneous\",\n            \"product_category\": \"Test Category\",\n            \"manufacturer\": \"Test Manufacturer\",\n            \"description\": \"This is a test\",\n            \"image_url\": \"https://proton.ai/lib_GtGPpbKCmmxDoqOm/dpswabrsvcb9qu4g.png?w=376\",\n            \"url\": \"https://proton.ai/\"\n        }\n    ],\n    \"product_id\": [\n        \"{{product_id}}\"\n    ],\n    \"customer_id\": [\n        \"{{customer_id}}\"\n    ],\n    \"count\": [\n        \"{{count}}\"\n    ],\n    \"user_id\": [\n        \"{{user_id}}\"\n    ]\n}"}],"_postman_id":"9a17763e-d198-4350-a115-51cfaac65512"},{"name":"Complete Cart Recommendations","id":"22a93667-5344-440e-9d37-784ac5a34a43","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"X-User-Id","type":"text","value":"{{user_id}}"},{"key":"X-Company","type":"text","value":"{{company}}"},{"key":"X-Api-Key","type":"text","value":"{{api_key}}"}],"body":{"mode":"raw","raw":"{\n  \"customer_id\": \"{{customer_id}}\",\n  \"user_id\": \"{{user_id}}\", \n  \"count\" : \"{{count}}\",\n  \"products\": [\n    {\"product_id\": \"{{product_id}}\", \"quantity\": \"719\"},\n    {\"product_id\": \"{{product_id2}}\", \"quantity\": \"221\"}\n  ]\n}","options":{"raw":{"language":"json"}}},"url":"{{domain}}/{{company}}/product/recommendations/cart","description":"<p>Recommends items that fit the cart. The model works by looking at all historical \"carts\" (based on order history) and tries to predict what products are \"missing\" from the current user's cart.</p>\n<h3 id=\"request-body-definition-json\"><strong>Request Body definition (JSON)</strong></h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th><strong>Name</strong></th>\n<th><strong>Description</strong></th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>customer_id</td>\n<td>{{customer_id_description}}</td>\n</tr>\n<tr>\n<td>user_id</td>\n<td>{{user_id_description}}</td>\n</tr>\n<tr>\n<td>count</td>\n<td>{{count_description}}</td>\n</tr>\n<tr>\n<td>products</td>\n<td>An array of product objects with product_id and quantity that describes the list of products the user has in their cart.</td>\n</tr>\n</tbody>\n</table>\n</div>","urlObject":{"path":["{{company}}","product","recommendations","cart"],"host":["{{domain}}"],"query":[],"variable":[]}},"response":[{"id":"8ff0b2c3-76ba-43b1-b9cf-e8f760f8a8ce","name":"Cart","originalRequest":{"method":"POST","header":[{"key":"X-User-Id","type":"text","value":"{{user_id}}"},{"key":"X-Company","type":"text","value":"{{company}}"},{"key":"X-Api-Key","type":"text","value":"{{api_key}}"},{"key":"Content-Type","name":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\n  \"customer_id\": \"{{customer_id}}\",\n  \"user_id\": \"{{user_id}}\", \n  \"count\" : \"{{count}}\",\n  \"products\": [\n    {\"product_id\": \"{{product_id}}\", \"quantity\": \"974\"},\n    {\"product_id\": \"{{product_id2}}\", \"quantity\": \"614\"}\n  ]\n}","options":{"raw":{"language":"json"}}},"url":"{{domain}}/{{company}}/product/recommendations/cart"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Server","value":"nginx/1.14.1"},{"key":"Date","value":"Wed, 06 Jul 2022 12:12:04 GMT"},{"key":"Content-Type","value":"application/json"},{"key":"Transfer-Encoding","value":"chunked"},{"key":"Connection","value":"keep-alive"},{"key":"Access-Control-Allow-Credentials","value":"true"},{"key":"Access-Control-Allow-Methods","value":"GET, POST, OPTIONS"},{"key":"Access-Control-Allow-Headers","value":"DNT,User-Agent,X-User-ID,X-Company,X-Api-Key,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Range,X-Proton-Beta,X-Proton-Frontend-Beta,X-Client-Platform,X-Transaction-ID"},{"key":"Access-Control-Expose-Headers","value":"Content-Length,Content-Range"},{"key":"Content-Encoding","value":"gzip"}],"cookie":[],"responseTime":null,"body":"{\n    \"status_message\": \"SUCCESS\",\n    \"data\": [\n        {\n            \"product_id\": \"ABC\",\n            \"name\": \"Apple iPad\",\n            \"product_super_category\": \"Miscellaneous\",\n            \"product_category\": \"Test Category\",\n            \"manufacturer\": \"Test Manufacturer\",\n            \"description\": \"This is a test\",\n            \"image_url\": \"https://proton.ai/lib_GtGPpbKCmmxDoqOm/dpswabrsvcb9qu4g.png?w=376\",\n            \"url\": \"https://proton.ai/\"\n        },\n        {\n            \"product_id\": \"DEF\",\n            \"name\": \"Apple iPad\",\n            \"product_super_category\": \"Miscellaneous\",\n            \"product_category\": \"Test Category\",\n            \"manufacturer\": \"Test Manufacturer\",\n            \"description\": \"This is a test\",\n            \"image_url\": \"https://proton.ai/lib_GtGPpbKCmmxDoqOm/dpswabrsvcb9qu4g.png?w=376\",\n            \"url\": \"https://proton.ai/\"\n        },\n        {\n            \"product_id\": \"GHI\",\n            \"name\": \"Apple iPad\",\n            \"product_super_category\": \"Miscellaneous\",\n            \"product_category\": \"Test Category\",\n            \"manufacturer\": \"Test Manufacturer\",\n            \"description\": \"This is a test\",\n            \"image_url\": \"https://proton.ai/lib_GtGPpbKCmmxDoqOm/dpswabrsvcb9qu4g.png?w=376\",\n            \"url\": \"https://proton.ai/\"\n        },\n        {\n            \"product_id\": \"JKL\",\n            \"name\": \"Apple iPad\",\n            \"product_super_category\": \"Miscellaneous\",\n            \"product_category\": \"Test Category\",\n            \"manufacturer\": \"Test Manufacturer\",\n            \"description\": \"This is a test\",\n            \"image_url\": \"https://proton.ai/lib_GtGPpbKCmmxDoqOm/dpswabrsvcb9qu4g.png?w=376\",\n            \"url\": \"https://proton.ai/\"\n        },\n        {\n            \"product_id\": \"MNO\",\n            \"name\": \"Apple iPad\",\n            \"product_super_category\": \"Miscellaneous\",\n            \"product_category\": \"Test Category\",\n            \"manufacturer\": \"Test Manufacturer\",\n            \"description\": \"This is a test\",\n            \"image_url\": \"https://proton.ai/lib_GtGPpbKCmmxDoqOm/dpswabrsvcb9qu4g.png?w=376\",\n            \"url\": \"https://proton.ai/\"\n        }\n    ],\n    \"product_id\": [\n        \"{{product_id}}\"\n    ],\n    \"customer_id\": [\n        \"{{customer_id}}\"\n    ],\n    \"count\": [\n        \"{{count}}\"\n    ],\n    \"user_id\": [\n        \"{{user_id}}\"\n    ]\n}"}],"_postman_id":"22a93667-5344-440e-9d37-784ac5a34a43"}],"id":"5be5bd8e-4592-4056-b78e-86811e741ee1","description":"<p>The Recommendations use transactional data exchanged with Proton to determine the best suggestion for the current context. All recommendation endpoints return a JSON array of product info blobs that can be used to populate the screen. (they contain name, price, image_url, description along with any other needed and available field.)</p>\n","_postman_id":"5be5bd8e-4592-4056-b78e-86811e741ee1"},{"name":"Tracking","item":[{"name":"Track - Product View","id":"8a97b4bc-8686-48aa-b796-02692e57c97b","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"X-User-Id","type":"text","value":"{{user_id}}"},{"key":"X-Company","type":"text","value":"{{company}}"},{"key":"X-Api-Key","type":"text","value":"{{api_key}}"}],"body":{"mode":"raw","raw":"{\n  \"company\": \"{{company}}\",\n  \"event\": \"seen\",\n  \"product_id\": \"{{product_id}}\",\n  \"customer_id\": \"{{customer_id}}\"\n}","options":{"raw":{"language":"json"}}},"url":"{{domain}}/{{company}}/track","description":"<p>Registers an event when a user lands on a product page.</p>\n<p>Usercase:</p>\n<blockquote>\n<p>On <a href=\"https://shop.%7B%7Bcompany%7D%7D.com\">https://shop.{{company}}.com</a> customer \"{{customer_id}}\" landed on the product details page for product \"{{product_id}}\"</p>\n</blockquote>\n","urlObject":{"path":["{{company}}","track"],"host":["{{domain}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"8a97b4bc-8686-48aa-b796-02692e57c97b"},{"name":"Track - Product Click","id":"18a0ba0c-b9fe-4550-8326-29e187a0e3cd","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"X-User-Id","type":"text","value":"{{user_id}}"},{"key":"X-Company","type":"text","value":"{{company}}"},{"key":"X-Api-Key","type":"text","value":"{{api_key}}"}],"body":{"mode":"raw","raw":"{\n  \"company\": \"{{company}}\",\n  \"event\": \"click\",\n  \"product_id\": \"{{product_id}}\",\n  \"customer_id\": \"{{customer_id}}\"\n}","options":{"raw":{"language":"json"}}},"url":"{{domain}}/{{company}}/track","description":"<p>Registers an event when a user clicks on a product.</p>\n<p>Usercase:</p>\n<blockquote>\n<p>On <a href=\"https://shop.%7B%7Bcompany%7D%7D.com\">https://shop.{{company}}.com</a> customer \"{{customer_id}}\" clicked product with ID \"{{product_id}}\"</p>\n</blockquote>\n","urlObject":{"path":["{{company}}","track"],"host":["{{domain}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"18a0ba0c-b9fe-4550-8326-29e187a0e3cd"},{"name":"Track - Product Click (recommended by Proton)","id":"4fcd404d-d379-4f14-9b1b-474ec9db0faa","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"X-User-Id","type":"text","value":"{{user_id}}"},{"key":"X-Company","type":"text","value":"{{company}}"},{"key":"X-Api-Key","type":"text","value":"{{api_key}}"}],"body":{"mode":"raw","raw":"{\n  \"company\": \"{{company}}\",\n  \"event\": \"click\",\n  \"model\": \"similar\",\n  \"product_id\": \"{{product_id}}\",\n  \"customer_id\": \"{{customer_id}}\"\n}","options":{"raw":{"language":"json"}}},"url":"{{domain}}/{{company}}/track","description":"<p>Registers an event when a user clicks on a product that came from a Proton recommendation.</p>\n<p>Usercase:</p>\n<blockquote>\n<p>On <a href=\"https://shop.%7B%7Bcompany%7D%7D.com\">https://shop.{{company}}.com</a> customer \"{{customer_id}}\" clicked product with ID \"{{product_id}}\". Product {{product_id}} was recommended by Proton's \"/product/recommendations/similar\" endpoint</p>\n</blockquote>\n","urlObject":{"path":["{{company}}","track"],"host":["{{domain}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"4fcd404d-d379-4f14-9b1b-474ec9db0faa"},{"name":"Track - Product Add-To-Cart","id":"69a57956-9552-4b19-a79d-aa0bec18870c","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"X-User-Id","type":"text","value":"{{user_id}}"},{"key":"X-Company","type":"text","value":"{{company}}"},{"key":"X-Api-Key","type":"text","value":"{{api_key}}"}],"body":{"mode":"raw","raw":"{\n  \"company\": \"{{company}}\",\n  \"event\": \"add_cart\",\n  \"product_id\": \"{{product_id}}\",\n  \"customer_id\": \"{{customer_id}}\"\n}","options":{"raw":{"language":"json"}}},"url":"{{domain}}/{{company}}/track","description":"<p>Registers an event when a user adds to cart a product.</p>\n<p>Usercase:</p>\n<blockquote>\n<p>On <a href=\"https://shop.%7B%7Bcompany%7D%7D.com\">https://shop.{{company}}.com</a> customer \"{{customer_id}}\" added to their cart product with ID \"{{product_id}}\".</p>\n</blockquote>\n","urlObject":{"path":["{{company}}","track"],"host":["{{domain}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"69a57956-9552-4b19-a79d-aa0bec18870c"},{"name":"Track - Product Add-To-Cart (recommended by Proton)","id":"c5ccbe00-4259-4ff1-97c8-87b390c1f2a0","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"X-User-Id","type":"text","value":"{{user_id}}"},{"key":"X-Company","type":"text","value":"{{company}}"},{"key":"X-Api-Key","type":"text","value":"{{api_key}}"}],"body":{"mode":"raw","raw":"{\n  \"company\": \"{{company}}\",\n  \"event\": \"add_cart\",\n  \"model\": \"periodic\",\n  \"product_id\": \"{{product_id}}\",\n  \"customer_id\": \"{{customer_id}}\"\n}","options":{"raw":{"language":"json"}}},"url":"{{domain}}/{{company}}/track","description":"<p>Registers an event when a user adds to cart a product that came from a Proton recommendation.</p>\n<p>Usercase:</p>\n<blockquote>\n<p>On <a href=\"https://shop.%7B%7Bcompany%7D%7D.com\">https://shop.{{company}}.com</a> customer \"{{customer_id}}\" added to their cart product with ID \"{{product_id}}\". Product \"{{product_id}}\" was recommended by Proton's \"/product/recommendations/periodic\" endpoint</p>\n</blockquote>\n","urlObject":{"path":["{{company}}","track"],"host":["{{domain}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"c5ccbe00-4259-4ff1-97c8-87b390c1f2a0"},{"name":"Track - Product Search","id":"05f8efcb-e958-493d-b7f3-73e01ccf8ea3","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"X-User-Id","type":"text","value":"{{user_id}}"},{"key":"X-Company","type":"text","value":"{{company}}"},{"key":"X-Api-Key","type":"text","value":"{{api_key}}"}],"body":{"mode":"raw","raw":"{\n  \"company\": \"{{company}}\",\n  \"event\": \"search\",\n  \"customer_id\": \"{{customer_id}}\",\n  \"queryString\": \"red apples\"\n}","options":{"raw":{"language":"json"}}},"url":"{{domain}}/{{company}}/track","description":"<p>Registers an event when a user submits a search query.</p>\n<p>Usercase:</p>\n<blockquote>\n<p>On <a href=\"https://shop.%7B%7Bcompany%7D%7D.com\">https://shop.{{company}}.com</a> customer \"{{customer_id}}\" searches for \"red apples.\"</p>\n</blockquote>\n","urlObject":{"path":["{{company}}","track"],"host":["{{domain}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"05f8efcb-e958-493d-b7f3-73e01ccf8ea3"},{"name":"Track - Login","id":"e9cc0e68-1334-4ad3-97ee-5c6abcf98f32","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"X-User-Id","type":"text","value":"{{user_id}}"},{"key":"X-Company","type":"text","value":"{{company}}"},{"key":"X-Api-Key","type":"text","value":"{{api_key}}"}],"body":{"mode":"raw","raw":"{\n  \"company\": \"{{company}}\",\n  \"old_customer_id\": \"{{customer_id2}}\",\n  \"new_customer_id\": \"{{customer_id}}\"\n}","options":{"raw":{"language":"json"}}},"url":"{{domain}}/{{company}}/track/login","description":"<p>Identifies a previously anonymous user.</p>\n<p>Usercase:</p>\n<blockquote>\n<p>On <a href=\"https://shop.%7B%7Bcompany%7D%7D.com\">https://shop.{{company}}.com</a> customer \"{{customer_id2}}\" logs in and gets assigned a new identifier \"{{customer_id}}\"\"</p>\n</blockquote>\n","urlObject":{"path":["{{company}}","track","login"],"host":["{{domain}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"e9cc0e68-1334-4ad3-97ee-5c6abcf98f32"}],"id":"22cfc7e2-9cd9-4e22-9d12-d0a03c995874","description":"<p>The Tracking APIs are available for an eCommerce use-case to be called to track user actions on the website (product-views, clicks, searches, add-to-carts) that's used to</p>\n<ul>\n<li><p>Personalize and influence recommendations</p>\n</li>\n<li><p>Power additional endpoints e.g. \"Recently Viewed\"</p>\n</li>\n<li><p>Provide visibility to your sales reps teams using the Desktop/Mobile solution so that they can follow up with customers based on e-commerce activity (e.g. recently added to cart but hasn't bought)</p>\n</li>\n</ul>\n","_postman_id":"22cfc7e2-9cd9-4e22-9d12-d0a03c995874"},{"name":"Custom Fields","item":[{"name":"Add new custom field","event":[{"listen":"test","script":{"id":"8f1249ad-b898-4940-a0ed-a4c6e3531ed9","exec":[""],"type":"text/javascript","packages":{}}}],"id":"9dcb236d-2902-489d-9c81-7b96898e00f4","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","value":"application/json","type":"text"},{"key":"Accept","value":"application/json","type":"text"},{"key":"X-User-Id","value":"{{user_id}}","type":"text"},{"key":"X-Company","value":"{{company}}","type":"text"},{"key":"X-Api-Key","value":"{{api_key}}","type":"text"}],"body":{"mode":"raw","raw":"{\n    \"display_name\": \"Good Dancer?\",\n    \"display_description\": \"Summary judgement on the individual's musical aptitude\",\n    \"field_type\": \"dropdown\",\n    \"options\": [\n        \"Yes\",\n        \"No\",\n        \"Depends on the music\"\n    ],\n    \"required\": true,\n    \"record_types\": [\n        \"opportunity\"\n    ],\n    \"editability\": [\n        \"admin\"\n    ],\n    \"visibility\": [\n        \"admin\",\n        \"manager\"\n    ],\n    \"config\": {\n        \"opportunity__pipeline_id\": \"some_pipeline_id\"\n    }\n}","options":{"raw":{"headerFamily":"json","language":"json"}}},"url":"{{domain}}/{{company}}/custom_field/create","description":"<p><code>field_id</code> is optional. If left out, the system will generate a globally unique <code>field_id</code> for you.</p>\n","urlObject":{"path":["{{company}}","custom_field","create"],"host":["{{domain}}"],"query":[],"variable":[]}},"response":[{"id":"8eefc24f-3841-42a3-b2bb-153e7067e3b5","name":"Success","originalRequest":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"},{"key":"Accept","value":"application/json"}],"body":{"mode":"raw","raw":"{\n    \"display_name\": \"Good Dancer?\",\n    \"display_description\": \"Summary judgement on the individual's musical aptitude\",\n    \"field_type\": \"dropdown\",\n    \"options\": [\n        \"Yes\",\n        \"No\",\n        \"Depends on the music\"\n    ],\n    \"required\": true,\n    \"record_types\": [\n        \"opportunity\"\n    ],\n    \"editability\": [\n        \"admin\"\n    ],\n    \"visibility\": [\n        \"admin\",\n        \"manager\"\n    ],\n    \"config\": {\n        \"opportunity__pipeline_id\": \"some_pipeline_id\"\n    }\n}","options":{"raw":{"headerFamily":"json","language":"json"}}},"url":"{{domain}}/{{company}}/custom_field/create"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json"}],"cookie":[],"responseTime":null,"body":"{\n    \"status_message\": \"SUCCESS\",\n    \"data\": {\n        \"custom_field_id\": \"b6c68103-72c9-44c7-83a2-a9151e015915\",\n        \"display_name\": \"Good Dancer?\",\n        \"display_description\": \"Summary judgement on the individual's musical aptitude\",\n        \"field_type\": \"dropdown\",\n        \"options\": [\n            \"Yes\",\n            \"No\",\n            \"Depends on the music\"\n        ],\n        \"required\": true,\n        \"record_types\": [\n            \"contact\",\n            \"customer\"\n        ],\n        \"editability\": [\n            \"admin\"\n        ],\n        \"visibility\": [\n            \"admin\",\n            \"manager\"\n        ]\n    }\n}"}],"_postman_id":"9dcb236d-2902-489d-9c81-7b96898e00f4"},{"name":"Delete a custom field","id":"4f68a0bd-158b-4ced-9972-76f9aaa94d82","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","value":"application/json","type":"text"},{"key":"Accept","value":"application/json","type":"text"},{"key":"X-User-Id","value":"{{user_id}}","type":"text"},{"key":"X-Company","value":"{{company}}","type":"text"},{"key":"X-Api-Key","value":"{{api_key}}","type":"text"}],"body":{"mode":"raw","raw":"{\n    \"custom_field_id\": \"custom_usesi_jm_awarded_date\"\n}","options":{"raw":{"headerFamily":"json","language":"json"}}},"url":"{{domain}}/{{company}}/custom_field/delete","urlObject":{"path":["{{company}}","custom_field","delete"],"host":["{{domain}}"],"query":[],"variable":[]}},"response":[{"id":"fa4fff6b-2475-4278-aeb9-1761df2024a2","name":"Success","originalRequest":{"method":"DELETE","header":[{"key":"Content-Type","value":"application/json"},{"key":"Accept","value":"application/json"}],"body":{"mode":"raw","raw":"{\n    \"field_id\": \"dkf19iwef01sdfsa\"\n}","options":{"raw":{"headerFamily":"json","language":"json"}}},"url":"{{domain}}/{{company}}/custom_field/delete"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json"}],"cookie":[],"responseTime":null,"body":"{\n    \"status_message\": \"SUCCESS\",\n    \"data\": {\n        \"custom_field_id\": \"1234\"\n    }\n}"}],"_postman_id":"4f68a0bd-158b-4ced-9972-76f9aaa94d82"},{"name":"Edit a custom field configuration","id":"731ca735-2312-4ae6-9452-d12422164208","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"PUT","header":[{"key":"Content-Type","value":"application/json","type":"text"},{"key":"Accept","value":"application/json","type":"text"},{"key":"X-User-Id","value":"{{user_id}}","type":"text"},{"key":"X-Company","value":"{{company}}","type":"text"},{"key":"X-Api-Key","value":"{{api_key}}","type":"text"}],"body":{"mode":"raw","raw":"        {\n            \"custom_field_id\": \"test percentage\",\n            \"display_name\": \"Probability%\",\n            \"display_description\": \"\",\n            \"field_type\": \"percentage\",\n            \"lookup_target\": null,\n            \"required\": true,\n            \"display_order\": 800,\n            \"record_types\": [\n                \"opportunity\"\n            ],\n            \"editability\": [\n                \"all\"\n            ],\n            \"visibility\": [\n                \"all\"\n            ],\n            \"is_ingested\": false,\n            \"conditional_logic\": null,\n            \"config\": {\n                \"opportunity__pipeline_id\": \"QN3iL5Y7zyrvDJXFQjPJva\"\n            },\n            \"group\": null\n      }\n    \n","options":{"raw":{"headerFamily":"json","language":"json"}}},"url":"{{domain}}/{{company}}/custom_field/edit","description":"<p><code>field_id</code> is required. Every other parameter is optional*.</p>\n<p>*If you change the custom field's type to <code>dropdown</code>, then <code>options</code> will also be a required parameter.</p>\n","urlObject":{"path":["{{company}}","custom_field","edit"],"host":["{{domain}}"],"query":[],"variable":[]}},"response":[{"id":"74015660-2cd0-484f-8f6d-c96feaff2112","name":"Success","originalRequest":{"method":"PUT","header":[{"key":"Content-Type","value":"application/json"},{"key":"Accept","value":"application/json"}],"body":{"mode":"raw","raw":"{\n    \"custom_field_id\": \"dkf19iwef01sdfsa\",\n    \"display_name\": \"Mode of Transportation\",\n    \"display_description\": \"How they get around\",\n    \"field_type\": \"dropdown\",\n    \"options\": [\n        \"Slide like a lizard\",\n        \"Walk like a crab\",\n        \"Drive in a cab\"\n    ],\n    \"required\": true,\n    \"record_types\": [\n        \"contact\",\n        \"customer\"\n    ],\n    \"editability\": [\n        \"admin\"\n    ],\n    \"visibility\": [\n        \"admin\",\n        \"manager\"\n    ]\n}","options":{"raw":{"headerFamily":"json","language":"json"}}},"url":"{{domain}}/{{company}}/custom_field/edit"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json"}],"cookie":[],"responseTime":null,"body":"{\n    \"status_message\": \"SUCCESS\",\n    \"data\": {\n        \"custom_field_id\": \"1234\",\n        \"display_name\": \"Mode of Transportation\",\n        \"display_description\": \"How they get around\",\n        \"field_type\": \"dropdown\",\n        \"options\": [\n            \"Slide like a lizard\",\n            \"Walk like a crab\",\n            \"Drive in a cab\"\n        ],\n        \"required\": true,\n        \"record_types\": [\n            \"contact\",\n            \"customer\"\n        ],\n        \"editability\": [\n            \"admin\"\n        ],\n        \"visibility\": [\n            \"admin\",\n            \"manager\"\n        ]\n    }\n}"}],"_postman_id":"731ca735-2312-4ae6-9452-d12422164208"},{"name":"Get all custom fields","id":"9f7455e8-532f-42a3-b83b-3ae78af85287","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"Accept","value":"application/json","type":"text"},{"key":"X-User-Id","value":"{{user_id}}","type":"text"},{"key":"X-Company","value":"{{company}}","type":"text"},{"key":"X-Api-Key","value":"{{api_key}}","type":"text"}],"url":"{{domain}}/{{company}}/custom_field/all?record_types=customer,contact","description":"<p>To retrieve all custom fields, either pass <code>records</code> as an empty list or leave it out altogether.</p>\n","urlObject":{"path":["{{company}}","custom_field","all"],"host":["{{domain}}"],"query":[{"description":{"content":"<p>Type of records (leave empty for all)</p>\n","type":"text/plain"},"key":"record_types","value":"customer,contact"}],"variable":[]}},"response":[{"id":"28e1db5a-938b-47df-913b-21f842b161cb","name":"Success","originalRequest":{"method":"GET","header":[{"key":"Accept","value":"application/json"}],"url":{"raw":"{{domain}}/{{company}}/custom_field/all?record_types=<string>","host":["{{domain}}"],"path":["{{company}}","custom_field","all"],"query":[{"key":"record_types","value":"<string>","description":"Type of records"}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json"}],"cookie":[],"responseTime":null,"body":"{\n    \"status_message\": \"SUCCESS\",\n    \"data\": [\n        {\n            \"custom_field_id\": \"b6c68103-72c9-44c7-83a2-a9151e015915\",\n            \"display_name\": \"Good Dancer?\",\n            \"display_description\": \"Summary judgement on the individual's musical aptitude\",\n            \"field_type\": \"dropdown\",\n            \"options\": [\n                \"Yes\",\n                \"No\",\n                \"Depends on the music\"\n            ],\n            \"required\": true,\n            \"record_types\": [\n                \"contact\",\n                \"customer\"\n            ],\n            \"editability\": [\n                \"admin\"\n            ],\n            \"visibility\": [\n                \"admin\",\n                \"manager\"\n            ]\n        },\n        {\n            \"custom_field_id\": \"1234\",\n            \"display_name\": \"Good Driver?\",\n            \"display_description\": \"Would you get in a car with them?\",\n            \"field_type\": \"boolean\",\n            \"required\": true,\n            \"record_types\": [\n                \"contact\",\n                \"customer\"\n            ],\n            \"editability\": [\n                \"admin\"\n            ],\n            \"visibility\": [\n                \"admin\",\n                \"manager\"\n            ]\n        }\n    ],\n    \"records\": [\n        \"customer,contact\"\n    ]\n}"}],"_postman_id":"9f7455e8-532f-42a3-b83b-3ae78af85287"},{"name":"Update a custom field instance","id":"4b025768-86ef-4747-9e5e-97b8470a210e","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"PUT","header":[{"key":"Content-Type","value":"application/json","type":"text"},{"key":"Accept","value":"application/json","type":"text"},{"key":"X-User-Id","value":"{{user_id}}","type":"text"},{"key":"X-Company","value":"{{company}}","type":"text"},{"key":"X-Api-Key","value":"{{api_key}}","type":"text"}],"body":{"mode":"raw","raw":"{\n    \"record_type\": \"contact\",\n    \"record_id\": \"125246\",\n    \"custom_field_id\": \"1234\",\n    \"value\": \"Slide like a lizard\"\n}","options":{"raw":{"headerFamily":"json","language":"json"}}},"url":"{{domain}}/{{company}}/custom_field/update_instance","urlObject":{"path":["{{company}}","custom_field","update_instance"],"host":["{{domain}}"],"query":[],"variable":[]}},"response":[{"id":"88b3d3d6-d187-4694-86b7-4e3e479fcc07","name":"Success","originalRequest":{"method":"PUT","header":[{"key":"Content-Type","value":"application/json"},{"key":"Accept","value":"application/json"}],"body":{"mode":"raw","raw":"{\n    \"record_type\": \"contact\",\n    \"record_id\": \"125246\",\n    \"custom_field_id\": \"1234\",\n    \"value\": \"Slide like a lizard\"\n}","options":{"raw":{"headerFamily":"json","language":"json"}}},"url":"{{domain}}/{{company}}/custom_field/update_instance"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json"}],"cookie":[],"responseTime":null,"body":"{\n    \"status_message\": \"SUCCESS\",\n    \"data\": {\n        \"custom_field_id\": \"1234\",\n        \"display_name\": \"Mode of Transportation\",\n        \"display_description\": \"How they get around\",\n        \"field_type\": \"dropdown\",\n        \"value\": \"Slide like a lizard\"\n    }\n}"}],"_postman_id":"4b025768-86ef-4747-9e5e-97b8470a210e"}],"id":"75318bd0-57d6-499b-90e9-2dd42d460755","description":"<h2 id=\"customfieldconfig\">CustomFieldConfig</h2>\n<h3 id=\"description\">Description</h3>\n<p>Defines the configuration settings for custom fields stored in a specific index, primarily used for creating and modifying custom fields across enabled record types such as contact, customer, and opportunity.</p>\n<h3 id=\"attributes\">Attributes</h3>\n<ul>\n<li><p><strong>custom_field_id</strong> (<code>str</code>): Automatically generated unique identifier for the custom field, using UUID v4. Can also be given.</p>\n</li>\n<li><p><strong>display_name</strong> (<code>str</code>): Human-readable name for the custom field.</p>\n</li>\n<li><p><strong>display_description</strong> (<code>str</code>): Description of the custom field to provide more context.</p>\n</li>\n<li><p><strong>field_type</strong> (<code>str</code>): Type of the custom field. Valid types currently include \"dropdown\", \"number\", \"boolean\", \"string\".</p>\n</li>\n<li><p><strong>options</strong> (<code>Optional[List[str]]</code>): List of options, required if the <code>field_type</code> is \"dropdown\".</p>\n</li>\n<li><p><strong>required</strong> (<code>bool</code>): Specifies whether the field is mandatory.</p>\n</li>\n<li><p><strong>record_types</strong> (<code>List[str]</code>): Types of records that can have this custom field. Currently enabled types are \"contact\", \"customer\", \"opportunity\".</p>\n</li>\n<li><p><strong>editability</strong> (<code>List[str]</code>): Specifies who can edit the field.</p>\n</li>\n<li><p><strong>visibility</strong> (<code>List[str]</code>): Specifies who can view the field.</p>\n</li>\n<li><p><strong>config</strong> (<code>dict</code>): Configuration for this type of custom field.</p>\n</li>\n</ul>\n<hr />\n<h2 id=\"customfieldinstance\">CustomFieldInstance</h2>\n<h3 id=\"description-1\">Description</h3>\n<p>Represents an individual instance of a custom field, as it would appear in the <code>custom_fields</code> list of various record types like contacts, customers, and opportunities.</p>\n<h3 id=\"attributes-1\">Attributes</h3>\n<ul>\n<li><p><strong>custom_field_id</strong> (<code>str</code>): Unique identifier for the custom field associated with this instance.</p>\n</li>\n<li><p><strong>value</strong> (<code>bool,str,float,int, List[str]</code>): The value of the custom field.</p>\n</li>\n</ul>\n","_postman_id":"75318bd0-57d6-499b-90e9-2dd42d460755"},{"name":"Opportunities","item":[{"name":"Create Opportunity","id":"5517ba92-eea9-4fa8-a36d-a38996ae46fb","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","value":"application/json","type":"text"},{"key":"Accept","value":"application/json","type":"text"},{"key":"X-User-Id","value":"{{user_id}}","type":"text"},{"key":"X-Company","value":"{{company}}","type":"text"},{"key":"X-Api-Key","value":"{{api_key}}","type":"text"}],"body":{"mode":"raw","raw":"","options":{"raw":{"language":"json"}}},"url":"{{domain}}/{{company}}/opportunities","description":"<p>We think of an opportunity which could be in serveral possible discreet stages as defined initially.</p>\n<h4 id=\"request-body-fields\">Request Body fields</h4>\n<ul>\n<li><code>pipeline_id</code><strong>:</strong> The uid of the pipline in which this opportunity gets created.</li>\n<li><code>stage_id</code><strong>:</strong> The id of the stage in which this opportunity is created.</li>\n<li><code>title</code> <strong>:</strong> Title of the opportunity</li>\n<li><code>owner</code> : List of user ids (generally emails) for the owners of the opportunities</li>\n<li><code>customer_id</code> <strong>:</strong> Customer or Account id for which this opportunity is meant to be</li>\n<li><code>contact_id</code>: The id of the contact associated with this opportunity</li>\n<li><code>value</code>: Dollar value of the opportunity</li>\n<li><code>associations</code>: We can associate products or tasks to an opportunity. Use <code>type</code> : \"product\" to associate a product to this opportunity</li>\n</ul>\n<h4 id=\"example-query\">Example Query</h4>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"pipeline_id\": \"123456\",\n  \"stage_id\": \"stage_3\",\n  \"title\": \"New Product Launch\",\n  \"owner\": [\"user_101\", \"user_102\"],\n  \"customer_id\": \"cust_456789\",\n  \"contact_id\": \"cont_789012\",\n  \"value\": 50000.00,    \n  \"created_from_sales_play\": true,\n  \"custom_fields\": [\n    {\n      \"custom_field_id\": \"cf_123\",\n      \"value\": \"Option 1\"\n    }\n  ],\n  \"associations\": [\n    {\"type\": \"product\", \"product_id\": \"abc123\"}\n  ],\n  \"groupings\": [\n    {\"field\": \"product_super_category\", \"value\": \"Electronics\"},\n    {\"field\": \"manufacturer\", \"value\": \"TechCorp\"}\n  ]\n}\n\n</code></pre>\n<h3 id=\"response-fields\">Response fields</h3>\n<p>Many fields in the response are similar to that of the request just repeated. Below are the important ones.</p>\n<ul>\n<li><code>data.opportunity_id</code><strong>:</strong> The uid of the newly created opportunity</li>\n<li><code>status_message</code>: Has to be <code>\"SUCCESS\"</code> to consider this a successful API call</li>\n</ul>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"status_message\": \"SUCCESS\",\n  \"data\": {\n    \"opportunity_id\": \"opp_654321\",\n    \"pipeline_id\": \"123456\",\n    \"stage_id\": \"stage_3\",\n    \"title\": \"New Product Launch\",\n    \"owner\": [\n      \"user_101\",\n      \"user_102\"\n    ],\n    \"customer_id\": \"cust_456789\",\n    \"customer_info\": null,\n    \"contact_id\": \"cont_789012\",\n    \"contact_info\": null,\n    \"value\": 50000,\n    \"closed\": false,\n    \"created_by\": \"user_101\",\n    \"created_date\": \"2023-04-15T12:00:00Z\",\n    \"created_from_sales_play\": true,\n    \"last_stage_change_date\": \"2023-04-15T12:00:00Z\",\n    \"last_updated_by\": \"user_101\",\n    \"last_update_date\": \"2023-04-15T12:00:00Z\",\n    \"last_contact_date\": null,\n    \"custom_fields\": [\n      {\n        \"custom_field_id\": \"cf_123\",\n        \"value\": \"Option 1\"\n      }\n    ],\n    \"associations\": [\n      {\n        \"type\": \"product\",\n        \"product_id\": \"abc123\"\n      }\n    ],\n    \"groupings\": [\n      {\n        \"field\": \"product_super_category\",\n        \"value\": \"Electronics\"\n      },\n      {\n        \"field\": \"manufacturer\",\n        \"value\": \"TechCorp\"\n      }\n    ],\n    \"visibility_ids\": [\n      \"vis_123\",\n      \"vis_456\"\n    ],\n    \"is_deleted\": false,\n    \"deleted_date\": null\n  }\n}\n\n</code></pre>\n","urlObject":{"path":["{{company}}","opportunities"],"host":["{{domain}}"],"query":[],"variable":[]}},"response":[{"id":"d14df2ad-858e-41ce-8e96-178f77955ff0","name":"Create Opportunity","originalRequest":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"},{"key":"Accept","value":"application/json"},{"key":"X-User-Id","value":"{{user_id}}"},{"key":"X-Company","value":"{{company}}"},{"key":"X-Api-Key","value":"{{api_key}}"}],"body":{"mode":"raw","raw":"{\r\n  \"pipeline_id\": \"123456\",\r\n  \"stage_id\": \"stage_3\",\r\n  \"title\": \"New Product Launch\",\r\n  \"owner\": [\"user_101\", \"user_102\"],\r\n  \"customer_id\": \"cust_456789\",\r\n  \"contact_id\": \"cont_789012\",\r\n  \"value\": 50000.00,\r\n  \"created_from_sales_play\": true,\r\n  \"custom_fields\": [\r\n    {\r\n      \"custom_field_id\": \"cf_123\",\r\n      \"value\": \"Option 1\"\r\n    }\r\n  ],\r\n  \"associations\": [\r\n    {\"type\": \"product\", \"product_id\": \"abc123\"}\r\n  ],\r\n  \"groupings\": [\r\n    {\"field\": \"product_super_category\", \"value\": \"Electronics\"},\r\n    {\"field\": \"manufacturer\", \"value\": \"TechCorp\"}\r\n  ]\r\n}\r\n","options":{"raw":{"language":"json"}}},"url":"{{domain}}/{{company}}/opportunities"},"status":"OK","code":200,"_postman_previewlanguage":null,"header":null,"cookie":[],"responseTime":null,"body":"{\r\n  \"status_message\": \"SUCCESS\",\r\n  \"data\": {\r\n    \"opportunity_id\": \"opp_654321\",\r\n    \"pipeline_id\": \"123456\",\r\n    \"stage_id\": \"stage_3\",\r\n    \"title\": \"New Product Launch\",\r\n    \"owner\": [\r\n      \"user_101\",\r\n      \"user_102\"\r\n    ],\r\n    \"customer_id\": \"cust_456789\",\r\n    \"customer_info\": null,\r\n    \"contact_id\": \"cont_789012\",\r\n    \"contact_info\": null,\r\n    \"value\": 50000,\r\n    \"closed\": false,\r\n    \"created_by\": \"user_101\",\r\n    \"created_date\": \"2023-04-15T12:00:00Z\",\r\n    \"created_from_sales_play\": true,\r\n    \"last_stage_change_date\": \"2023-04-15T12:00:00Z\",\r\n    \"last_updated_by\": \"user_101\",\r\n    \"last_update_date\": \"2023-04-15T12:00:00Z\",\r\n    \"last_contact_date\": null,\r\n    \"custom_fields\": [\r\n      {\r\n        \"custom_field_id\": \"cf_123\",\r\n        \"value\": \"Option 1\"\r\n      }\r\n    ],\r\n    \"associations\": [\r\n      {\r\n        \"type\": \"product\",\r\n        \"product_id\": \"abc123\"\r\n      }\r\n    ],\r\n    \"groupings\": [\r\n      {\r\n        \"field\": \"product_super_category\",\r\n        \"value\": \"Electronics\"\r\n      },\r\n      {\r\n        \"field\": \"manufacturer\",\r\n        \"value\": \"TechCorp\"\r\n      }\r\n    ],\r\n    \"visibility_ids\": [\r\n      \"vis_123\",\r\n      \"vis_456\"\r\n    ],\r\n    \"is_deleted\": false,\r\n    \"deleted_date\": null\r\n  }\r\n}"}],"_postman_id":"5517ba92-eea9-4fa8-a36d-a38996ae46fb"},{"name":"Get Opportunity","id":"bcd120cd-5eef-4947-acc5-3f9bc2661eed","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"Content-Type","value":"application/json","type":"text"},{"key":"Accept","value":"application/json","type":"text"},{"key":"X-User-Id","value":"{{user_id}}","type":"text"},{"key":"X-Company","value":"{{company}}","type":"text"},{"key":"X-Api-Key","value":"{{api_key}}","type":"text"}],"url":"{{domain}}/{{company}}/opportunities/{opportunity_id}","urlObject":{"path":["{{company}}","opportunities","{opportunity_id}"],"host":["{{domain}}"],"query":[],"variable":[]}},"response":[{"id":"bf6d0dff-ff33-472b-9849-cf61111ec71f","name":"Get Opportunity","originalRequest":{"method":"GET","header":[{"key":"Content-Type","value":"application/json"},{"key":"Accept","value":"application/json"},{"key":"X-User-Id","value":"{{user_id}}"},{"key":"X-Company","value":"{{company}}"},{"key":"X-Api-Key","value":"{{api_key}}"}],"url":"{{domain}}/{{company}}/opportunities/{opportunity_id}"},"status":"OK","code":200,"_postman_previewlanguage":null,"header":null,"cookie":[],"responseTime":null,"body":"{\r\n  \"status_message\": \"SUCCESS\",\r\n  \"data\": {\r\n    \"opportunity_id\": \"opp_654321\",\r\n    \"pipeline_id\": \"123456\",\r\n    \"stage_id\": \"stage_3\",\r\n    \"title\": \"New Product Launch\",\r\n    \"owner\": [\r\n      \"user_101\",\r\n      \"user_102\"\r\n    ],\r\n    \"customer_id\": \"cust_456789\",\r\n    \"customer_info\": null,\r\n    \"contact_id\": \"cont_789012\",\r\n    \"contact_info\": null,\r\n    \"value\": 50000,\r\n    \"closed\": false,\r\n    \"created_by\": \"user_101\",\r\n    \"created_date\": \"2023-04-15T12:00:00Z\",\r\n    \"created_from_sales_play\": true,\r\n    \"last_stage_change_date\": \"2023-04-15T12:00:00Z\",\r\n    \"last_updated_by\": \"user_101\",\r\n    \"last_update_date\": \"2023-04-15T12:00:00Z\",\r\n    \"last_contact_date\": null,\r\n    \"custom_fields\": [\r\n      {\r\n        \"custom_field_id\": \"cf_123\",\r\n        \"value\": \"Option 1\"\r\n      }\r\n    ],\r\n    \"associations\": [\r\n      {\r\n        \"type\": \"product\",\r\n        \"product_id\": \"abc123\"\r\n      }\r\n    ],\r\n    \"groupings\": [\r\n      {\r\n        \"field\": \"product_super_category\",\r\n        \"value\": \"Electronics\"\r\n      },\r\n      {\r\n        \"field\": \"manufacturer\",\r\n        \"value\": \"TechCorp\"\r\n      }\r\n    ],\r\n    \"visibility_ids\": [\r\n      \"vis_123\",\r\n      \"vis_456\"\r\n    ],\r\n    \"representative_ids\": [\r\n      \"rep_789\",\r\n      \"rep_012\"\r\n    ],\r\n    \"is_deleted\": false,\r\n    \"deleted_date\": null\r\n  }\r\n}"}],"_postman_id":"bcd120cd-5eef-4947-acc5-3f9bc2661eed"},{"name":"Update Opportunity","id":"654b16bc-d863-4542-8f3c-8a73c8c87138","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"PATCH","header":[{"key":"Content-Type","value":"application/json","type":"text"},{"key":"Accept","value":"application/json","type":"text"},{"key":"X-User-Id","value":"{{user_id}}","type":"text"},{"key":"X-Company","value":"{{company}}","type":"text"},{"key":"X-Api-Key","value":"{{api_key}}","type":"text"}],"body":{"mode":"raw","raw":"","options":{"raw":{"language":"json"}}},"url":"{{domain}}/{{company}}/opportunities/{opportunity_id}","urlObject":{"path":["{{company}}","opportunities","{opportunity_id}"],"host":["{{domain}}"],"query":[],"variable":[]}},"response":[{"id":"e58a14d0-a4b3-4d83-900f-41f6b05e29ad","name":"Update Opportunity","originalRequest":{"method":"PATCH","header":[{"key":"Content-Type","value":"application/json"},{"key":"Accept","value":"application/json"},{"key":"X-User-Id","value":"{{user_id}}"},{"key":"X-Company","value":"{{company}}"},{"key":"X-Api-Key","value":"{{api_key}}"}],"body":{"mode":"raw","raw":"{\r\n  \"title\": \"Updated Product Launch\",\r\n  \"value\": 75000.00,\r\n  \"last_updated_by\": \"user_102\",\r\n  \"custom_fields\": [\r\n    {\r\n      \"custom_field_id\": \"cf_123\",\r\n      \"value\": \"Option 2\"\r\n    }\r\n  ],\r\n  \"associations\": [\r\n    {\"type\": \"product\", \"product_id\": \"xyz789\"}\r\n  ],\r\n  \"groupings\": [\r\n    {\"field\": \"product_super_category\", \"value\": \"Home Appliances\"}\r\n  ]\r\n}\r\n","options":{"raw":{"language":"json"}}},"url":"{{domain}}/{{company}}/opportunities/{opportunity_id}"},"status":"OK","code":200,"_postman_previewlanguage":null,"header":null,"cookie":[],"responseTime":null,"body":"{\r\n  \"status_message\": \"SUCCESS\",\r\n  \"data\": {\r\n    \"opportunity_id\": \"opp_654321\",\r\n    \"pipeline_id\": \"123456\",\r\n    \"stage_id\": \"stage_3\",\r\n    \"title\": \"Updated Product Launch\",\r\n    \"owner\": [\r\n      \"user_101\",\r\n      \"user_102\"\r\n    ],\r\n    \"customer_id\": \"cust_456789\",\r\n    \"customer_info\": null,\r\n    \"contact_id\": \"cont_789012\",\r\n    \"contact_info\": null,\r\n    \"value\": 75000,\r\n    \"closed\": false,\r\n    \"created_by\": \"user_101\",\r\n    \"created_date\": \"2023-04-15T12:00:00Z\",\r\n    \"created_from_sales_play\": true,\r\n    \"last_stage_change_date\": \"2023-04-15T12:00:00Z\",\r\n    \"last_updated_by\": \"user_102\",\r\n    \"last_update_date\": \"2023-04-15T13:00:00Z\",\r\n    \"last_contact_date\": null,\r\n    \"custom_fields\": [\r\n      {\r\n        \"custom_field_id\": \"cf_123\",\r\n        \"value\": \"Option 2\"\r\n      }\r\n    ],\r\n    \"associations\": [\r\n      {\r\n        \"type\": \"product\",\r\n        \"product_id\": \"xyz789\"\r\n      }\r\n    ],\r\n    \"groupings\": [\r\n      {\r\n        \"field\": \"product_super_category\",\r\n        \"value\": \"Home Appliances\"\r\n      }\r\n    ],\r\n    \"visibility_ids\": [\r\n      \"vis_123\",\r\n      \"vis_456\"\r\n    ],\r\n    \"representative_ids\": [\r\n      \"rep_789\",\r\n      \"rep_012\"\r\n    ],\r\n    \"is_deleted\": false,\r\n    \"deleted_date\": null\r\n  }\r\n}"}],"_postman_id":"654b16bc-d863-4542-8f3c-8a73c8c87138"},{"name":"Delete Opportunity","id":"4920e048-19a2-4877-9a6a-76cc5224535b","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"DELETE","header":[{"key":"Content-Type","value":"application/json","type":"text"},{"key":"Accept","value":"application/json","type":"text"},{"key":"X-User-Id","value":"{{user_id}}","type":"text"},{"key":"X-Company","value":"{{company}}","type":"text"},{"key":"X-Api-Key","value":"{{api_key}}","type":"text"}],"url":"{{domain}}/{{company}}/opportunities/{opportunity_id}","urlObject":{"path":["{{company}}","opportunities","{opportunity_id}"],"host":["{{domain}}"],"query":[],"variable":[]}},"response":[{"id":"7bf01f11-e447-4464-9561-83fe80fcc56e","name":"Delete Opportunity","originalRequest":{"method":"DELETE","header":[{"key":"Content-Type","value":"application/json"},{"key":"Accept","value":"application/json"},{"key":"X-User-Id","value":"{{user_id}}"},{"key":"X-Company","value":"{{company}}"},{"key":"X-Api-Key","value":"{{api_key}}"}],"url":"{{domain}}/{{company}}/opportunities/{opportunity_id}"},"status":"OK","code":200,"_postman_previewlanguage":null,"header":null,"cookie":[],"responseTime":null,"body":"{\r\n  \"status_message\": \"SUCCESS\",\r\n  \"data\": {\r\n    \"opportunity_id\": \"opp_654321\",\r\n    \"pipeline_id\": \"123456\",\r\n    \"stage_id\": \"stage_3\",\r\n    \"title\": \"Updated Product Launch\",\r\n    \"owner\": [\r\n      \"user_101\",\r\n      \"user_102\"\r\n    ],\r\n    \"customer_id\": \"cust_456789\",\r\n    \"customer_info\": null,\r\n    \"contact_id\": \"cont_789012\",\r\n    \"contact_info\": null,\r\n    \"value\": 75000,\r\n    \"closed\": false,\r\n    \"created_by\": \"user_101\",\r\n    \"created_date\": \"2023-04-15T12:00:00Z\",\r\n    \"created_from_sales_play\": true,\r\n    \"last_stage_change_date\": \"2023-04-15T12:00:00Z\",\r\n    \"last_updated_by\": \"user_102\",\r\n    \"last_update_date\": \"2023-04-15T13:00:00Z\",\r\n    \"last_contact_date\": null,\r\n    \"custom_fields\": [\r\n      {\r\n        \"custom_field_id\": \"cf_123\",\r\n        \"value\": \"Option 2\"\r\n      }\r\n    ],\r\n    \"associations\": [\r\n      {\r\n        \"type\": \"product\",\r\n        \"product_id\": \"xyz789\"\r\n      }\r\n    ],\r\n    \"groupings\": [\r\n      {\r\n        \"field\": \"product_super_category\",\r\n        \"value\": \"Home Appliances\"\r\n      }\r\n    ],\r\n    \"visibility_ids\": [\r\n      \"vis_123\",\r\n      \"vis_456\"\r\n    ],\r\n    \"representative_ids\": [\r\n      \"rep_789\",\r\n      \"rep_012\"\r\n    ],\r\n    \"is_deleted\": true,\r\n    \"deleted_date\": \"2023-04-15T14:00:00Z\"\r\n  }\r\n}"}],"_postman_id":"4920e048-19a2-4877-9a6a-76cc5224535b"},{"name":"Get Opportunity Activity Feed","id":"536ad8d9-1816-4cd4-8de5-2e7b67b571be","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"Content-Type","value":"application/json"},{"key":"Accept","value":"application/json"},{"key":"X-User-Id","value":"{{user_id}}"},{"key":"X-Company","value":"{{company}}"},{"key":"X-Api-Key","value":"{{api_key}}"}],"url":"{{domain}}/{{company}}/opportunities/{opportunity_id}/activity_feed","urlObject":{"path":["{{company}}","opportunities","{opportunity_id}","activity_feed"],"host":["{{domain}}"],"query":[{"disabled":true,"description":{"content":"<p>Mode of the interactions to include in the activity feed</p>\n","type":"text/plain"},"key":"mode","value":"order|phone|website|quote|email|task|opportunity"},{"disabled":true,"description":{"content":"<p>Start date (in epoch time) of the activity feed</p>\n","type":"text/plain"},"key":"start_date","value":"1715140800"},{"disabled":true,"description":{"content":"<p>End date (in epoch time) of the activity feed</p>\n","type":"text/plain"},"key":"end_date","value":"1717041600"},{"disabled":true,"description":{"content":"<p>Quote or Order ID to filter the activity feed by</p>\n","type":"text/plain"},"key":"order_id","value":"80181351-01"},{"disabled":true,"description":{"content":"<p>Product ID to filter the activity feed by</p>\n","type":"text/plain"},"key":"product_id","value":"SF-1350E"},{"disabled":true,"description":{"content":"<p>Product Super Category to filter the activity feed by</p>\n","type":"text/plain"},"key":"product_super_category","value":"Safety"},{"disabled":true,"description":{"content":"<p>Manufacturer to filter the activity feed by</p>\n","type":"text/plain"},"key":"manufacturer","value":"3M COMPANY"},{"disabled":true,"description":{"content":"<p>Cursor provided by the response, used to paginate results</p>\n","type":"text/plain"},"key":"cursor","value":"[1692892800000, \"quote_80549814-00\"]"},{"disabled":true,"description":{"content":"<p>Number of activities to return in the response</p>\n","type":"text/plain"},"key":"count","value":"50"},{"disabled":true,"description":{"content":"<p>Sort order of activities by date</p>\n","type":"text/plain"},"key":"sort","value":"asc"}],"variable":[]}},"response":[{"id":"7a7d111e-21a8-47df-a6af-67c78950da74","name":"Get Opportunity Activity Feed","originalRequest":{"method":"GET","header":[{"key":"Content-Type","value":"application/json"},{"key":"Accept","value":"application/json"},{"key":"X-User-Id","value":"{{user_id}}"},{"key":"X-Company","value":"{{company}}"},{"key":"X-Api-Key","value":"{{api_key}}"}],"url":"{{domain}}/{{company}}/opportunities/{opportunity_id}/activity_feed"},"status":"OK","code":200,"_postman_previewlanguage":null,"header":null,"cookie":[],"responseTime":null,"body":"{\r\n    \"status_message\": \"SUCCESS\",\r\n    \"data\": {\r\n        \"activities\": [\r\n            {\r\n                \"date\": \"2024-03-12T16:31:34.486552Z\",\r\n                \"activity_id\": \"audit_2scwmyhYfeeJ7Zaa5UbgXa\",\r\n                ...\r\n            },\r\n            {\r\n                \"date\": \"2024-03-12T16:31:15.963186Z\",\r\n                \"activity_id\": \"task_96c083e4-2811-4172-9442-3183026d58e7\",\r\n                ...\r\n            }\r\n        ],\r\n        \"cursor\": null\r\n    }\r\n}"}],"_postman_id":"536ad8d9-1816-4cd4-8de5-2e7b67b571be"},{"name":"Search Opportunities","id":"065481bf-0391-4464-9366-73e8a5f66fac","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","value":"application/json","type":"text"},{"key":"Accept","value":"application/json","type":"text"},{"key":"X-User-Id","value":"{{user_id}}","type":"text"},{"key":"X-Company","value":"{{company}}","type":"text"},{"key":"X-Api-Key","value":"{{api_key}}","type":"text"}],"body":{"mode":"raw","raw":"","options":{"raw":{"language":"json"}}},"url":"{{domain}}/{{company}}/opportunities/search","description":"<p>The search route allows users to query opportunities based on various attributes using a structured filtering syntax. Each attribute can be filtered using specific operators that act on the values of the fields within an opportunity. The operators define conditions such as equality, inequality, containment, and comparisons.</p>\n<h3 id=\"constructing-queries\">Constructing Queries</h3>\n<h4 id=\"query-syntax\">Query Syntax</h4>\n<p>Queries are constructed as JSON objects where each key corresponds to an opportunity attribute, and the value is another JSON object specifying the filter criteria for that attribute. The filter object may contain one or more operators, each paired with a list of operands that must align with the data type appropriate for the operator.</p>\n<h4 id=\"operators-and-operands\">Operators and Operands</h4>\n<ul>\n<li><p><strong><code>eq</code></strong> <strong>(equals):</strong> Accepts strings, booleans, floats, and timestamps. It checks for exact matches.</p>\n</li>\n<li><p><strong><code>neq</code></strong> <strong>(does not equal):</strong> Also accepts strings, booleans, floats, and timestamps, checking for any value that does not match the operand.</p>\n</li>\n<li><p><strong><code>gt</code></strong> <strong>(greater than) and</strong> <strong><code>gte</code></strong> <strong>(greater than or equal to):</strong> These operate on floats and timestamps, useful for finding values above a certain number or date.</p>\n</li>\n<li><p><strong><code>lt</code></strong> <strong>(less than) and</strong> <strong><code>lte</code></strong> <strong>(less than or equal to):</strong> Similar to <code>gt</code>/<code>gte</code>, but for values below a certain threshold.</p>\n</li>\n<li><p><strong><code>contains</code></strong> <strong>:</strong> Specifically for strings or arrays, this operator searches for fields that include the operand within them.</p>\n</li>\n<li><p><strong><code>not_contains</code></strong> <strong>:</strong> Opposite of <code>contains</code>, looking for fields that do not include the specified substring.</p>\n</li>\n</ul>\n<p>For custom fields, the <code>custom_field_id</code> operator must be used within the <code>custom_fields</code> parameter to specify which custom field is being targeted by the query.</p>\n<p>For inherited fields, the <code>inherited_field_id</code> and <code>inherit_from</code> operators must be used within the <code>inherited_fields</code> parameter to specify which inherited field and record type, respectively, is being targeted by the query. Currently, inherited fields only support <code>customer</code> and <code>product</code> record types, and only support the <code>eq</code> comparison operator.</p>\n<h4 id=\"example-query-construction\">Example Query Construction</h4>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"title\": {\n    \"contains\": [\"Launch\"]\n  },\n  \"value\": {\n    \"gte\": [50000.00],\n    \"lt\": [100000.00]\n  },\n  \"created_date\": {\n    \"gte\": [\"2023-01-01T00:00:00Z\"],\n    \"lt\": [\"2023-12-31T23:59:59Z\"]\n  },\n  \"custom_fields\": [\n    {\n      \"custom_field_id\": \"cf_123\",\n      \"eq\": [\"High Priority\"]\n    }\n  ],\n  \"inherited_fields\": [\n    {\n      \"inherited_field_id\": \"branch\",\n      \"inherit_from\": \"customer\",\n      \"eq\": [\"1010\"]\n    },\n    {\n      \"inherited_field_id\": \"product_super_category\",\n      \"inherit_from\": \"product\",\n      \"eq\": [\"Alcohol Wipes\"]\n    }\n  ]\n}\n\n</code></pre>\n<h3 id=\"handling-errors-and-logical-consistency\">Handling Errors and Logical Consistency</h3>\n<ul>\n<li><p><strong>Syntactical Errors:</strong> If a filter uses an incorrect operator for a given type (e.g., <code>gt</code> with a string), the API will return an error.</p>\n</li>\n<li><p><strong>Logical Consistency:</strong> While the API accepts filters that are syntactically correct even if they are logically contradictory (e.g., <code>eq</code> and <code>neq</code> with the same operand), such filters will not produce results but will not return an error.</p>\n</li>\n</ul>\n<h3 id=\"restrictions\">Restrictions</h3>\n<ul>\n<li><strong>AND/OR Logic:</strong> Currently, the API does not support complex logical conditions involving OR combinations of operands. If multiple operands are supplied, it is interpreted to be a logical AND.</li>\n</ul>\n","urlObject":{"path":["{{company}}","opportunities","search"],"host":["{{domain}}"],"query":[],"variable":[]}},"response":[{"id":"82bceac5-85d7-49cc-a455-3962df7e5d52","name":"Search Opportunities","originalRequest":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"},{"key":"Accept","value":"application/json"},{"key":"X-User-Id","value":"{{user_id}}"},{"key":"X-Company","value":"{{company}}"},{"key":"X-Api-Key","value":"{{api_key}}"}],"body":{"mode":"raw","raw":"{\r\n  \"view_as_user_id\": \"user101\",\r\n  \"count\": 10,\r\n  \"offset\": 20,\r\n  \"pipeline_id\": {\r\n    \"eq\": \"123456\"\r\n  },\r\n  \"title\": {\r\n    \"contains\": \"Launch\"\r\n  },\r\n  \"value\": {\r\n    \"gte\": 50000.00,\r\n    \"lt\": 100000.00\r\n  },\r\n  \"closed\": {\r\n    \"eq\": false\r\n  },\r\n  \"created_date\": {\r\n    \"gte\": \"2023-01-01T00:00:00Z\", // Include opportunities created on or after January 1, 2023\r\n    \"lt\": \"2023-12-31T23:59:59Z\"   // And before December 31, 2023, 23:59:59\r\n  },\r\n  \"custom_fields\": [\r\n    {\r\n      \"custom_field_id\": \"cf_123\",\r\n      \"eq\": \"Option 1\"\r\n    },\r\n    {\r\n      \"custom_field_id\": \"cf_456\",\r\n      \"contains\": \"Green\"\r\n    }\r\n  ]\r\n}\r\n","options":{"raw":{"language":"json"}}},"url":"{{domain}}/{{company}}/opportunities/search"},"status":"OK","code":200,"_postman_previewlanguage":null,"header":null,"cookie":[],"responseTime":null,"body":"{\r\n  \"status_message\": \"SUCCESS\",\r\n  \"data\": {\r\n    \"opportunities\": [\r\n      {\r\n        \"opportunity_id\": \"opp_654321\",\r\n        \"pipeline_id\": \"123456\",\r\n        \"stage_id\": \"stage_3\",\r\n        \"title\": \"New Product Launch\",\r\n        \"owner\": [\r\n          \"user_101\",\r\n          \"user_102\"\r\n        ],\r\n        \"customer_id\": \"cust_456789\",\r\n        \"customer_info\": null,\r\n        \"contact_id\": \"cont_789012\",\r\n        \"contact_info\": null,\r\n        \"value\": 75000,\r\n        \"closed\": false,\r\n        \"created_by\": \"user_101\",\r\n        \"created_date\": \"2023-01-15T12:00:00Z\",\r\n        \"created_from_sales_play\": false,\r\n        \"last_stage_change_date\": \"2023-01-20T12:00:00Z\",\r\n        \"last_updated_by\": \"user_102\",\r\n        \"last_update_date\": \"2023-02-15T12:00:00Z\",\r\n        \"last_contact_date\": \"2023-02-18T12:00:00Z\",\r\n        \"custom_fields\": [\r\n          {\r\n            \"custom_field_id\": \"cf_123\",\r\n            \"value\": \"Option 1\"\r\n          },\r\n          {\r\n            \"custom_field_id\": \"cf_456\",\r\n            \"value\": \"Green Quality\"\r\n          }\r\n        ],\r\n        \"associations\": [\r\n          {\r\n            \"type\": \"product\",\r\n            \"product_id\": \"abc123\"\r\n          }\r\n        ],\r\n        \"groupings\": [\r\n          {\r\n            \"field\": \"product_super_category\",\r\n            \"value\": \"Electronics\"\r\n          },\r\n          {\r\n            \"field\": \"manufacturer\",\r\n            \"value\": \"TechCorp\"\r\n          }\r\n        ],\r\n        \"visibility_ids\": [\r\n          \"vis_123\",\r\n          \"vis_456\"\r\n        ],\r\n        \"representative_ids\": [\r\n          \"rep_789\",\r\n          \"rep_012\"\r\n        ],\r\n        \"is_deleted\": false,\r\n        \"deleted_date\": null\r\n      }\r\n    ],\r\n    \"total_count\": 1,\r\n    \"total_value\": 75000\r\n  }\r\n}"}],"_postman_id":"065481bf-0391-4464-9366-73e8a5f66fac"},{"name":"Export Opportunities","id":"f2ca3e6a-069a-4f3f-8702-137e316c6f96","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","value":"application/json","type":"text"},{"key":"Accept","value":"application/json","type":"text"},{"key":"X-User-Id","value":"{{user_id}}","type":"text"},{"key":"X-Company","value":"{{company}}","type":"text"},{"key":"X-Api-Key","value":"{{api_key}}","type":"text"}],"body":{"mode":"raw","raw":"","options":{"raw":{"language":"json"}}},"url":"{{domain}}/{{company}}/pipelines/{pipeline_id}/export","description":"<p>The search route allows users to query opportunities based on various attributes using a structured filtering syntax. Each attribute can be filtered using specific operators that act on the values of the fields within an opportunity. The operators define conditions such as equality, inequality, containment, and comparisons.</p>\n<h3 id=\"constructing-queries\">Constructing Queries</h3>\n<h4 id=\"query-syntax\">Query Syntax</h4>\n<p>Queries are constructed as JSON objects where each key corresponds to an opportunity attribute, and the value is another JSON object specifying the filter criteria for that attribute. The filter object may contain one or more operators, each paired with a list of operands that must align with the data type appropriate for the operator.</p>\n<h4 id=\"operators-and-operands\">Operators and Operands</h4>\n<ul>\n<li><p><strong><code>eq</code></strong> <strong>(equals):</strong> Accepts strings, booleans, floats, and timestamps. It checks for exact matches.</p>\n</li>\n<li><p><strong><code>neq</code></strong> <strong>(does not equal):</strong> Also accepts strings, booleans, floats, and timestamps, checking for any value that does not match the operand.</p>\n</li>\n<li><p><strong><code>gt</code></strong> <strong>(greater than) and</strong> <strong><code>gte</code></strong> <strong>(greater than or equal to):</strong> These operate on floats and timestamps, useful for finding values above a certain number or date.</p>\n</li>\n<li><p><strong><code>lt</code></strong> <strong>(less than) and</strong> <strong><code>lte</code></strong> <strong>(less than or equal to):</strong> Similar to <code>gt</code>/<code>gte</code>, but for values below a certain threshold.</p>\n</li>\n<li><p><strong><code>contains</code></strong> <strong>:</strong> Specifically for strings or arrays, this operator searches for fields that include the operand within them.</p>\n</li>\n<li><p><strong><code>not_contains</code></strong> <strong>:</strong> Opposite of <code>contains</code>, looking for fields that do not include the specified substring.</p>\n</li>\n</ul>\n<p>For custom fields, the <code>custom_field_id</code> operator must be used within the <code>custom_fields</code> parameter to specify which custom field is being targeted by the query.</p>\n<p>For inherited fields, the <code>inherited_field_id</code> and <code>inherit_from</code> operators must be used within the <code>inherited_fields</code> parameter to specify which inherited field and record type, respectively, is being targeted by the query. Currently, inherited fields only support <code>customer</code> and <code>product</code> record types, and only support the <code>eq</code> comparison operator.</p>\n<h4 id=\"example-query-construction\">Example Query Construction</h4>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"title\": {\n    \"contains\": [\"Launch\"]\n  },\n  \"value\": {\n    \"gte\": [50000.00],\n    \"lt\": [100000.00]\n  },\n  \"created_date\": {\n    \"gte\": [\"2023-01-01T00:00:00Z\"],\n    \"lt\": [\"2023-12-31T23:59:59Z\"]\n  },\n  \"custom_fields\": [\n    {\n      \"custom_field_id\": \"cf_123\",\n      \"eq\": [\"High Priority\"]\n    }\n  ],\n  \"inherited_fields\": [\n    {\n      \"inherited_field_id\": \"branch\",\n      \"inherit_from\": \"customer\",\n      \"eq\": [\"1010\"]\n    },\n    {\n      \"inherited_field_id\": \"product_super_category\",\n      \"inherit_from\": \"product\",\n      \"eq\": [\"Alcohol Wipes\"]\n    }\n  ]\n}\n\n</code></pre>\n<h3 id=\"handling-errors-and-logical-consistency\">Handling Errors and Logical Consistency</h3>\n<ul>\n<li><p><strong>Syntactical Errors:</strong> If a filter uses an incorrect operator for a given type (e.g., <code>gt</code> with a string), the API will return an error.</p>\n</li>\n<li><p><strong>Logical Consistency:</strong> While the API accepts filters that are syntactically correct even if they are logically contradictory (e.g., <code>eq</code> and <code>neq</code> with the same operand), such filters will not produce results but will not return an error.</p>\n</li>\n</ul>\n<h3 id=\"restrictions\">Restrictions</h3>\n<ul>\n<li><strong>AND/OR Logic:</strong> Currently, the API does not support complex logical conditions involving OR combinations of operands. If multiple operands are supplied, it is interpreted to be a logical AND.</li>\n</ul>\n","urlObject":{"path":["{{company}}","pipelines","{pipeline_id}","export"],"host":["{{domain}}"],"query":[],"variable":[]}},"response":[{"id":"4b2e96c3-0016-4019-8548-5fb242e1d8a4","name":"Export Opportunities","originalRequest":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"},{"key":"Accept","value":"application/json"},{"key":"X-User-Id","value":"{{user_id}}"},{"key":"X-Company","value":"{{company}}"},{"key":"X-Api-Key","value":"{{api_key}}"}],"body":{"mode":"raw","raw":"{\r\n  \"view_as_user_id\": \"user101\",\r\n  \"title\": {\r\n    \"contains\": \"Launch\"\r\n  },\r\n  \"value\": {\r\n    \"gte\": 50000.00,\r\n    \"lt\": 100000.00\r\n  },\r\n  \"closed\": {\r\n    \"eq\": false\r\n  },\r\n  \"created_date\": {\r\n    \"gte\": \"2023-01-01T00:00:00Z\", // Include opportunities created on or after January 1, 2023\r\n    \"lt\": \"2023-12-31T23:59:59Z\"   // And before December 31, 2023, 23:59:59\r\n  },\r\n  \"custom_fields\": [\r\n    {\r\n      \"custom_field_id\": \"cf_123\",\r\n      \"eq\": \"Option 1\"\r\n    },\r\n    {\r\n      \"custom_field_id\": \"cf_456\",\r\n      \"contains\": \"Green\"\r\n    }\r\n  ]\r\n}\r\n","options":{"raw":{"language":"json"}}},"url":"{{domain}}/{{company}}/pipelines/{pipeline_id}/export"},"status":"OK","code":200,"_postman_previewlanguage":null,"header":null,"cookie":[],"responseTime":null,"body":"{\r\n  \"status_message\": \"SUCCESS\",\r\n  \"data\": {\r\n    \"url\": \"https://storage.googleapis.com/export.csv\"\r\n  }\r\n}"}],"_postman_id":"f2ca3e6a-069a-4f3f-8702-137e316c6f96"},{"name":"Calculate Pipeline Metrics","id":"a10aa2a6-601d-401f-866a-baef9872af51","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","value":"application/json","type":"text"},{"key":"Accept","value":"application/json","type":"text"},{"key":"X-User-Id","value":"{{user_id}}","type":"text"},{"key":"X-Company","value":"{{company}}","type":"text"},{"key":"X-Api-Key","value":"{{api_key}}","type":"text"}],"body":{"mode":"raw","raw":"","options":{"raw":{"language":"json"}}},"url":"{{domain}}/{{company}}/pipelines/{pipeline_id}/metrics","description":"<p>Given a search query (like the <code>/search</code> endpoint), this API endpoint calculates and returns the total count, total value, and forecasted value of opportunities within a specific pipeline and satisfying the search query. The calculation takes into account the stages of opportunities and their respective probabilities of closing.</p>\n<ul>\n<li><strong>Total Count:</strong> The aggregate number of opportunities within the pipeline.</li>\n<li><strong>Total Value:</strong> The total financial value of the pipeline.</li>\n<li><strong>Forecast Value:</strong> A predictive metric estimating potential revenue from the current opportunities, weighting each opportunity's value by its stage's assigned probability.</li>\n</ul>\n","urlObject":{"path":["{{company}}","pipelines","{pipeline_id}","metrics"],"host":["{{domain}}"],"query":[],"variable":[]}},"response":[{"id":"5d35b69a-c142-4ba2-a6f1-94f1709b5ac3","name":"Calculate Pipeline Metrics","originalRequest":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"},{"key":"Accept","value":"application/json"},{"key":"X-User-Id","value":"{{user_id}}"},{"key":"X-Company","value":"{{company}}"},{"key":"X-Api-Key","value":"{{api_key}}"}],"body":{"mode":"raw","raw":"{\n  \"view_as_user_id\": \"user_123\",\n  \"value\": {\n    \"gte\": 50000.00,\n    \"lt\": 100000.00\n  },\n  \"closed\": {\n    \"eq\": false\n  }\n}\n","options":{"raw":{"language":"json"}}},"url":"{{domain}}/{{company}}/pipelines/{pipeline_id}/metrics"},"status":"OK","code":200,"_postman_previewlanguage":null,"header":null,"cookie":[],"responseTime":null,"body":"{\r\n  \"status_message\": \"SUCCESS\",\r\n  \"data\": {\r\n    \"total_count\": 150,\r\n    \"total_value\": 1200000,\r\n    \"forecast_value\": 840000\r\n  }\r\n}"}],"_postman_id":"a10aa2a6-601d-401f-866a-baef9872af51"},{"name":"Calculate Pipeline Metrics All","id":"4aa64543-ebdc-4a9d-b40b-8c411f755982","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","value":"application/json","type":"text"},{"key":"Accept","value":"application/json","type":"text"},{"key":"X-User-Id","value":"{{user_id}}","type":"text"},{"key":"X-Company","value":"{{company}}","type":"text"},{"key":"X-Api-Key","value":"{{api_key}}","type":"text"}],"body":{"mode":"raw","raw":"","options":{"raw":{"language":"json"}}},"url":"{{domain}}/{{company}}/pipelines/metrics","description":"<p>Given a search query (like the <code>/search</code> endpoint), this API endpoint calculates and returns the total count, total value, and forecasted value of opportunities for all pipelines and satisfying the search query. The calculation takes into account the stages of opportunities and their respective probabilities of closing. A <code>pipeline_id</code> filter can be added to narrow the results.</p>\n<ul>\n<li><p><strong>Total Count:</strong> The aggregate number of opportunities within the pipeline.</p>\n</li>\n<li><p><strong>Total Value:</strong> The total financial value of the pipeline.</p>\n</li>\n<li><p><strong>Forecast Value:</strong> A predictive metric estimating potential revenue from the current opportunities, weighting each opportunity's value by its stage's assigned probability.</p>\n</li>\n</ul>\n","urlObject":{"path":["{{company}}","pipelines","metrics"],"host":["{{domain}}"],"query":[],"variable":[]}},"response":[{"id":"7e203bba-643b-4e80-9520-71d4cba31d1c","name":"Calculate Pipeline Metrics All","originalRequest":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"},{"key":"Accept","value":"application/json"},{"key":"X-User-Id","value":"{{user_id}}"},{"key":"X-Company","value":"{{company}}"},{"key":"X-Api-Key","value":"{{api_key}}"}],"body":{"mode":"raw","raw":"{\n  \"view_as_user_id\": \"user_123\",\n  \"value\": {\n    \"gte\": 50000.00,\n    \"lt\": 100000.00\n  },\n  \"closed\": {\n    \"eq\": false\n  },\n  \"pipeline_id\": {\n    \"eq\": [\"pipeline-1\", \"pipeline-2\"]\n  }\n}\n","options":{"raw":{"language":"json"}}},"url":"{{domain}}/{{company}}/pipelines/metrics"},"status":"OK","code":200,"_postman_previewlanguage":null,"header":null,"cookie":[],"responseTime":null,"body":"{\r\n  \"status_message\": \"SUCCESS\",\r\n  \"data\": {\r\n    \"total_count\": 150,\r\n    \"total_value\": 1200000,\r\n    \"forecast_value\": 840000\r\n  }\r\n}"}],"_postman_id":"4aa64543-ebdc-4a9d-b40b-8c411f755982"},{"name":"Get Pipeline Mockable Users","id":"51f684e1-24fc-4c67-9ae7-fe672cd741e7","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"Content-Type","value":"application/json"},{"key":"Accept","value":"application/json"},{"key":"X-User-Id","value":"{{user_id}}"},{"key":"X-Company","value":"{{company}}"},{"key":"X-Api-Key","value":"{{api_key}}"}],"url":"{{domain}}/{{company}}/pipelines/{pipeline_id}/mock_users","urlObject":{"path":["{{company}}","pipelines","{pipeline_id}","mock_users"],"host":["{{domain}}"],"query":[{"disabled":true,"description":{"content":"<p>Query string to search on mockable users</p>\n","type":"text/plain"},"key":"q","value":""},{"disabled":true,"description":{"content":"<p>Whether to return only active users</p>\n","type":"text/plain"},"key":"active_only","value":"false"},{"disabled":true,"description":{"content":"<p>Number of users to return</p>\n","type":"text/plain"},"key":"count","value":"10"},{"disabled":true,"description":{"content":"<p>Paginated offset to return count from</p>\n","type":"text/plain"},"key":"offset","value":"0"}],"variable":[]}},"response":[{"id":"e82e3f4a-8648-44ca-9583-f9faceff31e3","name":"Get Pipeline Mockable Users","originalRequest":{"method":"GET","header":[{"key":"Content-Type","value":"application/json"},{"key":"Accept","value":"application/json"},{"key":"X-User-Id","value":"{{user_id}}"},{"key":"X-Company","value":"{{company}}"},{"key":"X-Api-Key","value":"{{api_key}}"}],"url":{"raw":"{{domain}}/{{company}}/pipelines/{pipeline_id}/mock_users?q=proton&active_only=true","host":["{{domain}}"],"path":["{{company}}","pipelines","{pipeline_id}","mock_users"],"query":[{"key":"q","value":"proton","description":"Query string to search on mockable users","type":"text"},{"key":"active_only","value":"true","description":"Whether to return only active users","type":"text"},{"key":"count","value":"10","description":"Number of users to return","type":"text","disabled":true},{"key":"offset","value":"0","description":"Paginated offset to return count from","type":"text","disabled":true}]}},"status":"OK","code":200,"_postman_previewlanguage":null,"header":null,"cookie":[],"responseTime":null,"body":"{\n    \"status_message\": \"SUCCESS\",\n    \"data\": [\n        {\n            \"user_id\": \"protontestaccount@aquiferdist.com\",\n            \"display_name\": \"Proton Test\",\n            \"email\": \"protontestaccount@aquiferdist.com\",\n            \"name\": \"Proton Test\"\n        },\n        {\n            \"user_id\": \"protontestaccount2@aquiferdist.com\",\n            \"name\": \"Proton Test\",\n            \"email\": \"protontestaccount2@aquiferdist.com\"\n        }\n    ],\n    \"q\": [\n        \"proton\"\n    ],\n    \"active_only\": [\n        \"false\"\n    ]\n}"}],"_postman_id":"51f684e1-24fc-4c67-9ae7-fe672cd741e7"}],"id":"b4fd9705-b9f6-4a40-a673-0c5f92cae695","description":"<h2 id=\"opportunity\">Opportunity</h2>\n<h3 id=\"description\">Description</h3>\n<p>Represents the core structure and definition of an Opportunity within the system, encapsulating all key attributes necessary for identifying and managing sales opportunities.</p>\n<h3 id=\"attributes\">Attributes</h3>\n<ul>\n<li><p><strong>opportunity_id</strong> (<code>str</code>): Unique identifier for the opportunity.</p>\n</li>\n<li><p><strong>pipeline_id</strong> (<code>str</code>): Identifier for the pipeline associated with this opportunity.</p>\n</li>\n<li><p><strong>stage_id</strong> (<code>str</code>): Identifier for the current stage of the opportunity within the pipeline.</p>\n</li>\n<li><p><strong>title</strong> (<code>str</code>): Title of the opportunity.</p>\n</li>\n<li><p><strong>owner</strong> (<code>List[str]</code>): List of user IDs who own or manage the opportunity.</p>\n</li>\n<li><p><strong>customer_id</strong> (<code>str</code>): Identifier for the customer associated with the opportunity.</p>\n</li>\n<li><p><strong>customer_info</strong> (<code>Optional[dict]</code>): Dictionary containing additional information about the customer. Populated if <code>customer_id</code> was found in the system.</p>\n</li>\n<li><p><strong>contact_id</strong> (<code>Optional[str]</code>): Identifier for the primary contact associated with this opportunity.</p>\n</li>\n<li><p><strong>contact_info</strong> (<code>Optional[dict]</code>): Dictionary containing additional information about the contact. Populated if <code>contact_id</code> was found in the system.</p>\n</li>\n<li><p><strong>value</strong> (<code>float</code>): Financial value of the opportunity.</p>\n</li>\n<li><p><strong>closed</strong> (<code>bool</code>): Indicates whether the opportunity is in a closed stage.</p>\n</li>\n<li><p><strong>created_by</strong> (<code>str</code>): User ID of the person who created the opportunity.</p>\n</li>\n<li><p><strong>created_date</strong> (<code>datetime</code>): Date and time when the opportunity was created.</p>\n</li>\n<li><p><strong>created_from_sales_play</strong> (<code>bool</code>): Indicates whether the opportunity was created as a result of a sales play.</p>\n</li>\n<li><p><strong>last_stage_change_date</strong> (<code>datetime</code>): Date and time when the opportunity last moved to a new stage.</p>\n</li>\n<li><p><strong>last_updated_by</strong> (<code>str</code>): User ID of the person who last updated the opportunity.</p>\n</li>\n<li><p><strong>last_update_date</strong> (<code>datetime</code>): Date and time when the opportunity was last updated.</p>\n</li>\n<li><p><strong>last_contact_date</strong> (<code>Optional[datetime]</code>): Date and time when the last contact was made with the customer or contact associated with this opportunity.</p>\n</li>\n<li><p><strong>custom_fields</strong> (<code>List[CustomFieldInstance]</code>): List of custom field instances associated with the opportunity.</p>\n</li>\n<li><p><strong>associations</strong> (<code>List[dict]</code>): List of associated entities or items related to the opportunity.</p>\n</li>\n<li><p><strong>groupings</strong> (<code>List[dict]</code>): List of groupings that categorize the opportunity.</p>\n</li>\n<li><p><strong>visibility_ids</strong> (<code>List[str]</code>): List of IDs defining who can view this opportunity.</p>\n</li>\n<li><p><strong>is_deleted</strong> (<code>bool</code>): Indicates whether the opportunity is soft-deleted.</p>\n</li>\n<li><p><strong>deleted_date</strong> (<code>Optional[datetime]</code>): Date and time when the opportunity was deleted, if applicable.</p>\n</li>\n</ul>\n<h3 id=\"remarks\">Remarks</h3>\n<ul>\n<li><p>The <code>custom_fields</code> attribute requires the definition of <code>CustomFieldInstance</code>, which holds the structure for any custom field associated with an opportunity and is defined above.</p>\n</li>\n<li><p>Soft-deleted opportunities remain in the database and can be restored or permanently removed based on system policy.</p>\n</li>\n</ul>\n<hr />\n","_postman_id":"b4fd9705-b9f6-4a40-a673-0c5f92cae695"},{"name":"Customers","item":[{"name":"Get Customer","id":"973e5b5c-c731-45dd-9fa4-bacb7e8f9c88","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"Content-Type","value":"application/json","type":"text"},{"key":"Accept","value":"application/json","type":"text"},{"key":"X-User-Id","value":"{{user_id}}","type":"text"},{"key":"X-Company","value":"{{company}}","type":"text"},{"key":"X-Api-Key","value":"{{api_key}}","type":"text"}],"url":"{{domain}}/{{company}}/v1/customers/{identifier}","description":"<h1 id=\"get-customer-api-v1\">Get Customer API v1</h1>\n<h2 id=\"overview\">Overview</h2>\n<p>The Get Customer API v1 endpoint allows you to retrieve a single customer record by its business identifier or internal UUID. The response returns the full customer record including core fields, billing hierarchy, enriched representative and account group data, custom fields, and analytics. Customers represent the accounts your sales team sells to, including their identifying information, address details, contact info, and classification data.</p>\n<h2 id=\"endpoint\">Endpoint</h2>\n<p><strong>Method</strong>: <code>GET</code>\n<strong>URL</strong>: <code>{{domain}}/{{company}}/v1/customers/{{identifier}}</code></p>\n<h2 id=\"path-parameters\">Path Parameters</h2>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Parameter</th>\n<th>Type</th>\n<th>Required</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>company</code></td>\n<td>string</td>\n<td>Yes</td>\n<td>The company (tenant) identifier</td>\n</tr>\n<tr>\n<td><code>identifier</code></td>\n<td>string</td>\n<td>Yes</td>\n<td>The customer's business <code>customer_id</code> (e.g., <code>CUST-001</code>) or internal UUID (e.g., <code>550e8400-e29b-41d4-a716-446655440000</code>)</td>\n</tr>\n</tbody>\n</table>\n</div><h2 id=\"example-request\">Example Request</h2>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>GET {{domain}}/acme/v1/customers/CUST-001\n</code></pre><p>No request body is required for this endpoint.</p>\n<h2 id=\"response-format\">Response Format</h2>\n<h3 id=\"success-response-200-ok\">Success Response (200 OK)</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"status_message\": \"success\",\n    \"data\": {\n        \"customer_id\": \"CUST-001\",\n        \"id\": \"a1b2c3d4-e5f6-7890-abcd-ef1234567890\",\n        \"name\": \"Acme Corporation\",\n        \"bill_to_id\": \"BT-100\",\n        \"is_bill_to\": false,\n        \"street_address\": \"123 Main St\",\n        \"street_address_2\": null,\n        \"city\": \"San Francisco\",\n        \"state\": \"CA\",\n        \"zip_code\": \"94105\",\n        \"country\": \"US\",\n        \"region\": \"Pacific\",\n        \"branch\": \"West Coast\",\n        \"location\": null,\n        \"coordinate\": null,\n        \"email\": \"info@acmecorp.com\",\n        \"office_phone_number\": \"+1-555-0100\",\n        \"fax_number\": null,\n        \"is_active\": true,\n        \"type\": \"distributor\",\n        \"source\": \"ERP\",\n        \"representative_ids\": [\"rep-001\", \"rep-002\"],\n        \"representatives\": [\n            {\n                \"user_id\": \"rep-001\",\n                \"name\": \"Jane Smith\",\n                \"email\": \"jane.smith@company.com\",\n                \"internal_user_id\": \"int-001\"\n            },\n            {\n                \"user_id\": \"rep-002\",\n                \"name\": \"John Doe\",\n                \"email\": \"john.doe@company.com\",\n                \"internal_user_id\": \"int-002\"\n            }\n        ],\n        \"visibility_ids\": [\"group-001\"],\n        \"account_groups\": [\n            {\n                \"account_group_id\": \"group-001\",\n                \"name\": \"West Coast Team\"\n            }\n        ],\n        \"bill_to\": {\n            \"customer_id\": \"BT-100\",\n            \"name\": \"Acme National\"\n        },\n        \"ship_tos\": null,\n        \"parent_customer_id\": null,\n        \"account_type\": \"ship_to\",\n        \"parent\": null,\n        \"children\": null,\n        \"custom_fields\": [\n            {\n                \"custom_field_id\": \"cf-industry\",\n                \"value\": \"Manufacturing\",\n                \"display_value\": { \"en\": \"Manufacturing\" }\n            }\n        ],\n        \"notepad\": \"Key account - handle with care\",\n        \"last_contact_date\": \"2024-03-15T10:30:00Z\",\n        \"last_purchase_date\": \"2024-02-20T14:00:00Z\",\n        \"last_ingested_date\": \"2024-03-10T08:00:00Z\",\n        \"total_spending\": 150000.00,\n        \"y2d_spending\": 45000.00,\n        \"last_year_spending\": 120000.00,\n        \"previous_year_spending\": 95000.00,\n        \"m2d_spending\": 12000.00,\n        \"last_year_m2d_spending\": 10000.00,\n        \"average_order_value\": 5000.00,\n        \"gross_margin_last_year\": 36000.00,\n        \"YOY\": 26.3,\n        \"YOY_dollars\": 25000.00,\n        \"YOY_Y2D\": 15.4,\n        \"YOY_Y2D_dollars\": 6000.00,\n        \"proton_score\": 85.5,\n        \"proton_score_explanation\": \"High-value customer with consistent growth\",\n        \"churn_probability\": 0.12,\n        \"churn_status\": \"low_risk\",\n        \"churn_explanation\": \"Regular purchasing pattern with recent activity\",\n        \"opportunities_count\": 3,\n        \"total_last_year_orders\": 24,\n        \"orders_per_week\": 0.46,\n        \"return_rate\": 2.1,\n        \"product_lines_purchased\": 5,\n        \"product_lines_purchased_percent\": 45.5,\n        \"n_shiptos\": 0,\n        \"external_id\": null,\n        \"lead\": null,\n        \"lead_id\": null,\n        \"is_lead\": false\n    }\n}\n\n</code></pre>\n<h3 id=\"response-fields\">Response Fields</h3>\n<p>The response returns the complete customer record. Fields are grouped by category below. All fields are nullable unless noted otherwise.</p>\n<h4 id=\"core-identification\">Core Identification</h4>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Type</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>customer_id</code></td>\n<td>string</td>\n<td>Unique business identifier for the customer</td>\n</tr>\n<tr>\n<td><code>id</code></td>\n<td>string</td>\n<td>Internal stable UUID for the customer</td>\n</tr>\n<tr>\n<td><code>name</code></td>\n<td>string</td>\n<td>Customer name</td>\n</tr>\n<tr>\n<td><code>bill_to_id</code></td>\n<td>string</td>\n<td>Bill-to parent customer ID</td>\n</tr>\n<tr>\n<td><code>is_bill_to</code></td>\n<td>boolean</td>\n<td>Whether this customer is a bill-to account</td>\n</tr>\n</tbody>\n</table>\n</div><h4 id=\"address\">Address</h4>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Type</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>street_address</code></td>\n<td>string</td>\n<td>Street address line 1</td>\n</tr>\n<tr>\n<td><code>street_address_2</code></td>\n<td>string</td>\n<td>Street address line 2</td>\n</tr>\n<tr>\n<td><code>city</code></td>\n<td>string</td>\n<td>City</td>\n</tr>\n<tr>\n<td><code>state</code></td>\n<td>string</td>\n<td>State/Province</td>\n</tr>\n<tr>\n<td><code>zip_code</code></td>\n<td>string</td>\n<td>ZIP/postal code</td>\n</tr>\n<tr>\n<td><code>country</code></td>\n<td>string</td>\n<td>Country</td>\n</tr>\n<tr>\n<td><code>region</code></td>\n<td>string</td>\n<td>Region</td>\n</tr>\n<tr>\n<td><code>branch</code></td>\n<td>string</td>\n<td>Branch</td>\n</tr>\n<tr>\n<td><code>coordinate</code></td>\n<td>object</td>\n<td>Geographic coordinates</td>\n</tr>\n<tr>\n<td><code>location</code></td>\n<td>object</td>\n<td>Location details</td>\n</tr>\n</tbody>\n</table>\n</div><h4 id=\"contact-information\">Contact Information</h4>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Type</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>email</code></td>\n<td>string</td>\n<td>Email address</td>\n</tr>\n<tr>\n<td><code>office_phone_number</code></td>\n<td>string</td>\n<td>Office phone number</td>\n</tr>\n<tr>\n<td><code>fax_number</code></td>\n<td>string</td>\n<td>Fax number</td>\n</tr>\n<tr>\n<td><code>edited_name</code></td>\n<td>string</td>\n<td>Manually edited customer name override</td>\n</tr>\n<tr>\n<td><code>edited_email</code></td>\n<td>string</td>\n<td>Manually edited email override</td>\n</tr>\n<tr>\n<td><code>edited_office_phone_number</code></td>\n<td>string</td>\n<td>Manually edited phone override</td>\n</tr>\n<tr>\n<td><code>edited_fax_number</code></td>\n<td>string</td>\n<td>Manually edited fax override</td>\n</tr>\n</tbody>\n</table>\n</div><h4 id=\"status--classification\">Status &amp; Classification</h4>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Type</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>is_active</code></td>\n<td>boolean</td>\n<td>Whether the customer is active</td>\n</tr>\n<tr>\n<td><code>type</code></td>\n<td>string</td>\n<td>Customer type classification</td>\n</tr>\n<tr>\n<td><code>source</code></td>\n<td>string</td>\n<td>Data source identifier</td>\n</tr>\n<tr>\n<td><code>to_be_deleted</code></td>\n<td>boolean</td>\n<td>Whether customer is marked for deletion</td>\n</tr>\n<tr>\n<td><code>merged_customer_id</code></td>\n<td>string</td>\n<td>ID of the customer this record was merged into</td>\n</tr>\n</tbody>\n</table>\n</div><h4 id=\"representatives\">Representatives</h4>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Type</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>representative_ids</code></td>\n<td>array of strings</td>\n<td>Raw sales representative user IDs</td>\n</tr>\n<tr>\n<td><code>representatives</code></td>\n<td>array of objects</td>\n<td>Enriched representative details (see structure below)</td>\n</tr>\n</tbody>\n</table>\n</div><p><strong>Representative object structure:</strong></p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Type</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>user_id</code></td>\n<td>string</td>\n<td>Representative user ID</td>\n</tr>\n<tr>\n<td><code>name</code></td>\n<td>string</td>\n<td>Representative full name</td>\n</tr>\n<tr>\n<td><code>email</code></td>\n<td>string</td>\n<td>Representative email address</td>\n</tr>\n<tr>\n<td><code>internal_user_id</code></td>\n<td>string</td>\n<td>Internal user identifier</td>\n</tr>\n</tbody>\n</table>\n</div><h4 id=\"account-groups--visibility\">Account Groups &amp; Visibility</h4>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Type</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>visibility_ids</code></td>\n<td>array of strings</td>\n<td>Raw account group IDs that can view this customer</td>\n</tr>\n<tr>\n<td><code>account_groups</code></td>\n<td>array of objects</td>\n<td>Enriched account group details (see structure below)</td>\n</tr>\n</tbody>\n</table>\n</div><p><strong>Account group object structure:</strong></p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Type</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>account_group_id</code></td>\n<td>string</td>\n<td>Account group identifier</td>\n</tr>\n<tr>\n<td><code>name</code></td>\n<td>string</td>\n<td>Account group name</td>\n</tr>\n</tbody>\n</table>\n</div><h4 id=\"billing-hierarchy\">Billing Hierarchy</h4>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Type</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>bill_to</code></td>\n<td>object</td>\n<td>Bill-to parent customer details (populated for ship-to accounts)</td>\n</tr>\n<tr>\n<td><code>ship_tos</code></td>\n<td>array of objects</td>\n<td>Ship-to child customers (populated for bill-to accounts)</td>\n</tr>\n</tbody>\n</table>\n</div><h4 id=\"multi-level-account-hierarchy\">Multi-level Account Hierarchy</h4>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Type</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>parent_customer_id</code></td>\n<td>string</td>\n<td>Parent customer UUID</td>\n</tr>\n<tr>\n<td><code>account_type</code></td>\n<td>string</td>\n<td>Hierarchy level: <code>national</code>, <code>bill_to</code>, or <code>ship_to</code></td>\n</tr>\n<tr>\n<td><code>parent</code></td>\n<td>object</td>\n<td>Parent customer details</td>\n</tr>\n<tr>\n<td><code>children</code></td>\n<td>array of objects</td>\n<td>Child customer details</td>\n</tr>\n</tbody>\n</table>\n</div><h4 id=\"lead-information\">Lead Information</h4>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Type</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>lead</code></td>\n<td>object</td>\n<td>Associated lead record details</td>\n</tr>\n<tr>\n<td><code>lead_id</code></td>\n<td>string</td>\n<td>Lead identifier</td>\n</tr>\n<tr>\n<td><code>is_lead</code></td>\n<td>boolean</td>\n<td>Whether this record is a lead</td>\n</tr>\n</tbody>\n</table>\n</div><h4 id=\"custom-fields--notes\">Custom Fields &amp; Notes</h4>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Type</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>custom_fields</code></td>\n<td>array or object</td>\n<td>Custom field values with display values (unpacked format)</td>\n</tr>\n<tr>\n<td><code>notepad</code></td>\n<td>string</td>\n<td>Free-text notepad content</td>\n</tr>\n<tr>\n<td><code>other_data</code></td>\n<td>object</td>\n<td>Additional miscellaneous data</td>\n</tr>\n</tbody>\n</table>\n</div><h4 id=\"dates\">Dates</h4>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Type</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>last_contact_date</code></td>\n<td>datetime</td>\n<td>Date of last contact with the customer</td>\n</tr>\n<tr>\n<td><code>last_purchase_date</code></td>\n<td>datetime</td>\n<td>Date of last purchase</td>\n</tr>\n<tr>\n<td><code>last_ingested_date</code></td>\n<td>datetime</td>\n<td>Date of last data ingestion</td>\n</tr>\n<tr>\n<td><code>date_precomputed</code></td>\n<td>datetime</td>\n<td>Precomputed analytics date</td>\n</tr>\n<tr>\n<td><code>date_precomputed_first</code></td>\n<td>datetime</td>\n<td>First precomputed analytics date</td>\n</tr>\n</tbody>\n</table>\n</div><h4 id=\"spending-metrics\">Spending Metrics</h4>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Type</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>total_spending</code></td>\n<td>float</td>\n<td>All-time total spending</td>\n</tr>\n<tr>\n<td><code>y2d_spending</code></td>\n<td>float</td>\n<td>Year-to-date spending (current year)</td>\n</tr>\n<tr>\n<td><code>last_year_spending</code></td>\n<td>float</td>\n<td>Total spending in the last 12 months</td>\n</tr>\n<tr>\n<td><code>last_y2d_spending</code></td>\n<td>float</td>\n<td>Year-to-date spending (previous year)</td>\n</tr>\n<tr>\n<td><code>previous_year_spending</code></td>\n<td>float</td>\n<td>Total spending in the previous year</td>\n</tr>\n<tr>\n<td><code>m2d_spending</code></td>\n<td>float</td>\n<td>Month-to-date spending (current month)</td>\n</tr>\n<tr>\n<td><code>last_year_m2d_spending</code></td>\n<td>float</td>\n<td>Month-to-date spending (same month last year)</td>\n</tr>\n<tr>\n<td><code>average_order_value</code></td>\n<td>float</td>\n<td>Average order value</td>\n</tr>\n<tr>\n<td><code>gross_margin_last_year</code></td>\n<td>float</td>\n<td>Gross margin for last year</td>\n</tr>\n</tbody>\n</table>\n</div><h4 id=\"year-over-year-yoy\">Year-over-Year (YOY)</h4>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Type</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>YOY</code></td>\n<td>float</td>\n<td>Year-over-year percentage change</td>\n</tr>\n<tr>\n<td><code>YOY_dollars</code></td>\n<td>float</td>\n<td>Year-over-year dollar change</td>\n</tr>\n<tr>\n<td><code>YOY_Y2D</code></td>\n<td>float</td>\n<td>Year-over-year year-to-date percentage change</td>\n</tr>\n<tr>\n<td><code>YOY_Y2D_dollars</code></td>\n<td>float</td>\n<td>Year-over-year year-to-date dollar change</td>\n</tr>\n</tbody>\n</table>\n</div><h4 id=\"scoring--churn-analytics\">Scoring &amp; Churn Analytics</h4>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Type</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>proton_score</code></td>\n<td>float</td>\n<td>AI-generated customer score</td>\n</tr>\n<tr>\n<td><code>proton_score_explanation</code></td>\n<td>string</td>\n<td>Explanation of the score</td>\n</tr>\n<tr>\n<td><code>churn_probability</code></td>\n<td>float</td>\n<td>Churn risk probability (0 to 1)</td>\n</tr>\n<tr>\n<td><code>churn_status</code></td>\n<td>string</td>\n<td>Churn status label (e.g., <code>low_risk</code>, <code>at_risk</code>)</td>\n</tr>\n<tr>\n<td><code>churn_explanation</code></td>\n<td>string</td>\n<td>Human-readable churn risk explanation</td>\n</tr>\n</tbody>\n</table>\n</div><h4 id=\"order--product-metrics\">Order &amp; Product Metrics</h4>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Type</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>total_last_year_orders</code></td>\n<td>integer</td>\n<td>Total number of orders last year</td>\n</tr>\n<tr>\n<td><code>orders_per_week</code></td>\n<td>float</td>\n<td>Average orders per week</td>\n</tr>\n<tr>\n<td><code>return_rate</code></td>\n<td>float</td>\n<td>Return rate percentage</td>\n</tr>\n<tr>\n<td><code>returned_orders_count</code></td>\n<td>integer</td>\n<td>Number of returned orders</td>\n</tr>\n<tr>\n<td><code>unreturned_orders_count</code></td>\n<td>integer</td>\n<td>Number of unreturned orders</td>\n</tr>\n<tr>\n<td><code>product_lines_purchased</code></td>\n<td>float</td>\n<td>Number of product lines purchased</td>\n</tr>\n<tr>\n<td><code>product_lines_purchased_percent</code></td>\n<td>float</td>\n<td>Percentage of available product lines purchased</td>\n</tr>\n</tbody>\n</table>\n</div><h4 id=\"opportunities--sales-plays\">Opportunities &amp; Sales Plays</h4>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Type</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>opportunities_count</code></td>\n<td>integer</td>\n<td>Number of open opportunities</td>\n</tr>\n<tr>\n<td><code>quote_sales_plays_count</code></td>\n<td>integer</td>\n<td>Number of quote sales plays</td>\n</tr>\n<tr>\n<td><code>product_initiatives_count</code></td>\n<td>integer</td>\n<td>Number of product initiatives</td>\n</tr>\n<tr>\n<td><code>product_initiative_keys</code></td>\n<td>array</td>\n<td>Product initiative identifiers</td>\n</tr>\n<tr>\n<td><code>viewed_online_sales_plays_count</code></td>\n<td>integer</td>\n<td>Number of viewed online sales plays</td>\n</tr>\n<tr>\n<td><code>first_purchase_sales_plays_count</code></td>\n<td>integer</td>\n<td>Number of first purchase sales plays</td>\n</tr>\n<tr>\n<td><code>new_quote_sales_play</code></td>\n<td>boolean</td>\n<td>New quote sales play flag</td>\n</tr>\n<tr>\n<td><code>new_viewed_online_sales_play</code></td>\n<td>boolean</td>\n<td>New viewed online sales play flag</td>\n</tr>\n<tr>\n<td><code>new_first_purchase_sales_play</code></td>\n<td>boolean</td>\n<td>New first purchase sales play flag</td>\n</tr>\n</tbody>\n</table>\n</div><h4 id=\"other\">Other</h4>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Type</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>n_shiptos</code></td>\n<td>integer</td>\n<td>Number of ship-to locations</td>\n</tr>\n<tr>\n<td><code>external_id</code></td>\n<td>string</td>\n<td>External system identifier</td>\n</tr>\n<tr>\n<td><code>response_rate</code></td>\n<td>object</td>\n<td>Contact response rate metrics</td>\n</tr>\n</tbody>\n</table>\n</div><h2 id=\"error-responses\">Error Responses</h2>\n<h3 id=\"401-unauthorized\">401 Unauthorized</h3>\n<p>Returned when authentication fails or the API key is invalid or missing.</p>\n<h3 id=\"403-forbidden\">403 Forbidden</h3>\n<p>Returned when the requesting user does not have visibility access to the customer.</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"status_message\": \"error\",\n    \"error\": {\n        \"code\": \"FORBIDDEN\",\n        \"message\": \"User does not have access to this customer\"\n    }\n}\n\n</code></pre>\n<h3 id=\"404-not-found\">404 Not Found</h3>\n<p>Returned when no customer is found with the provided identifier.</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"status_message\": \"error\",\n    \"error\": {\n        \"code\": \"NOT_FOUND\",\n        \"message\": \"Customer not found\"\n    }\n}\n\n</code></pre>\n<h3 id=\"500-internal-server-error\">500 Internal Server Error</h3>\n<p>Returned when an unexpected error occurs on the server.</p>\n<h2 id=\"best-practices\">Best Practices</h2>\n<ol>\n<li><p><strong>Use the right identifier</strong>: You can use either the business <code>customer_id</code> or the internal UUID — both work interchangeably</p>\n</li>\n<li><p><strong>Cache the UUID</strong>: The internal <code>id</code> (UUID) is stable and ideal for caching and cross-referencing</p>\n</li>\n<li><p><strong>Check enriched fields</strong>: The response includes enriched <code>representatives</code> and <code>account_groups</code> objects — use these instead of resolving IDs manually</p>\n</li>\n<li><p><strong>Handle null fields</strong>: Most fields are nullable — always check for null values before processing</p>\n</li>\n<li><p><strong>Error handling</strong>: Check for 403 (access denied) and 404 (not found) responses and handle them appropriately</p>\n</li>\n</ol>\n<h2 id=\"notes\">Notes</h2>\n<ul>\n<li><p>The response returns the complete customer record with all available fields, including analytics and scoring data</p>\n</li>\n<li><p>Representative and account group data is automatically enriched — <code>representatives</code> contains full user details resolved from <code>representative_ids</code></p>\n</li>\n<li><p>For bill-to accounts, the <code>ship_tos</code> array is populated with child ship-to customers</p>\n</li>\n<li><p>For ship-to accounts, the <code>bill_to</code> object is populated with the parent bill-to customer</p>\n</li>\n<li><p>Custom fields are returned in unpacked format with display values</p>\n</li>\n<li><p>If the identifier matches a lead record, the lead data is included in the response</p>\n</li>\n<li><p>Access control is enforced — the requesting user must belong to at least one of the customer's visibility account groups</p>\n</li>\n</ul>\n","urlObject":{"path":["{{company}}","v1","customers","{identifier}"],"host":["{{domain}}"],"query":[],"variable":[]}},"response":[{"id":"bf1db899-77e2-448e-979b-374158cb63be","name":"Get Customer","originalRequest":{"method":"GET","header":[{"key":"Content-Type","value":"application/json"},{"key":"Accept","value":"application/json"},{"key":"X-User-Id","value":"{{user_id}}"},{"key":"X-Company","value":"{{company}}"},{"key":"X-Api-Key","value":"{{api_key}}"}],"url":"{{domain}}/{{company}}/v1/customers/{identifier}"},"status":"OK","code":200,"_postman_previewlanguage":null,"header":null,"cookie":[],"responseTime":null,"body":"{\r\n    \"status_message\": \"success\",\r\n    \"data\": {\r\n        \"customer_id\": \"CUST-001\",\r\n        \"id\": \"a1b2c3d4-e5f6-7890-abcd-ef1234567890\",\r\n        \"name\": \"Acme Corporation\",\r\n        \"bill_to_id\": \"BT-100\",\r\n        \"is_bill_to\": false,\r\n        \"street_address\": \"123 Main St\",\r\n        \"street_address_2\": null,\r\n        \"city\": \"San Francisco\",\r\n        \"state\": \"CA\",\r\n        \"zip_code\": \"94105\",\r\n        \"country\": \"US\",\r\n        \"region\": \"Pacific\",\r\n        \"branch\": \"West Coast\",\r\n        \"location\": null,\r\n        \"coordinate\": null,\r\n        \"email\": \"info@acmecorp.com\",\r\n        \"office_phone_number\": \"+1-555-0100\",\r\n        \"fax_number\": null,\r\n        \"is_active\": true,\r\n        \"type\": \"distributor\",\r\n        \"source\": \"ERP\",\r\n        \"representative_ids\": [\"rep-001\", \"rep-002\"],\r\n        \"representatives\": [\r\n            {\r\n                \"user_id\": \"rep-001\",\r\n                \"name\": \"Jane Smith\",\r\n                \"email\": \"jane.smith@company.com\",\r\n                \"internal_user_id\": \"int-001\"\r\n            },\r\n            {\r\n                \"user_id\": \"rep-002\",\r\n                \"name\": \"John Doe\",\r\n                \"email\": \"john.doe@company.com\",\r\n                \"internal_user_id\": \"int-002\"\r\n            }\r\n        ],\r\n        \"visibility_ids\": [\"group-001\"],\r\n        \"account_groups\": [\r\n            {\r\n                \"account_group_id\": \"group-001\",\r\n                \"name\": \"West Coast Team\"\r\n            }\r\n        ],\r\n        \"bill_to\": {\r\n            \"customer_id\": \"BT-100\",\r\n            \"name\": \"Acme National\"\r\n        },\r\n        \"ship_tos\": null,\r\n        \"parent_customer_id\": null,\r\n        \"account_type\": \"ship_to\",\r\n        \"parent\": null,\r\n        \"children\": null,\r\n        \"custom_fields\": [\r\n            {\r\n                \"custom_field_id\": \"cf-industry\",\r\n                \"value\": \"Manufacturing\",\r\n                \"display_value\": { \"en\": \"Manufacturing\" }\r\n            }\r\n        ],\r\n        \"notepad\": \"Key account - handle with care\",\r\n        \"last_contact_date\": \"2024-03-15T10:30:00Z\",\r\n        \"last_purchase_date\": \"2024-02-20T14:00:00Z\",\r\n        \"last_ingested_date\": \"2024-03-10T08:00:00Z\",\r\n        \"total_spending\": 150000.00,\r\n        \"y2d_spending\": 45000.00,\r\n        \"last_year_spending\": 120000.00,\r\n        \"previous_year_spending\": 95000.00,\r\n        \"m2d_spending\": 12000.00,\r\n        \"last_year_m2d_spending\": 10000.00,\r\n        \"average_order_value\": 5000.00,\r\n        \"gross_margin_last_year\": 36000.00,\r\n        \"YOY\": 26.3,\r\n        \"YOY_dollars\": 25000.00,\r\n        \"YOY_Y2D\": 15.4,\r\n        \"YOY_Y2D_dollars\": 6000.00,\r\n        \"proton_score\": 85.5,\r\n        \"proton_score_explanation\": \"High-value customer with consistent growth\",\r\n        \"churn_probability\": 0.12,\r\n        \"churn_status\": \"low_risk\",\r\n        \"churn_explanation\": \"Regular purchasing pattern with recent activity\",\r\n        \"opportunities_count\": 3,\r\n        \"total_last_year_orders\": 24,\r\n        \"orders_per_week\": 0.46,\r\n        \"return_rate\": 2.1,\r\n        \"product_lines_purchased\": 5,\r\n        \"product_lines_purchased_percent\": 45.5,\r\n        \"n_shiptos\": 0,\r\n        \"external_id\": null,\r\n        \"lead\": null,\r\n        \"lead_id\": null,\r\n        \"is_lead\": false\r\n    }\r\n}"}],"_postman_id":"973e5b5c-c731-45dd-9fa4-bacb7e8f9c88"},{"name":"Update Customer","id":"2abd7eaa-8b74-42d8-8c9b-2a59b33acafa","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"PATCH","header":[{"key":"Content-Type","value":"application/json","type":"text"},{"key":"Accept","value":"application/json","type":"text"},{"key":"X-User-Id","value":"{{user_id}}","type":"text"},{"key":"X-Company","value":"{{company}}","type":"text"},{"key":"X-Api-Key","value":"{{api_key}}","type":"text"}],"body":{"mode":"raw","raw":"","options":{"raw":{"language":"json"}}},"url":"{{domain}}/{{company}}/v1/customers/{identifier}","description":"<h1 id=\"update-customer-api-v1\">Update Customer API v1</h1>\n<h2 id=\"overview\">Overview</h2>\n<p>The Update Customer API v1 endpoint allows you to partially update an existing customer record within a specific company. This endpoint uses PATCH semantics — only fields explicitly included in the request body are updated, while omitted fields remain unchanged. Fields sent with a <code>null</code> value are cleared. Customers represent the accounts your sales team sells to, including their identifying information, address details, contact info, and classification data.</p>\n<h2 id=\"endpoint\">Endpoint</h2>\n<p><strong>Method</strong>: <code>PATCH</code>\n<strong>URL</strong>: <code>{{domain}}/{{company}}/v1/customers/{{identifier}}</code></p>\n<h2 id=\"path-parameters\">Path Parameters</h2>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Parameter</th>\n<th>Type</th>\n<th>Required</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>company</code></td>\n<td>string</td>\n<td>Yes</td>\n<td>The company (tenant) identifier</td>\n</tr>\n<tr>\n<td><code>identifier</code></td>\n<td>string</td>\n<td>Yes</td>\n<td>The customer's business <code>customer_id</code> (e.g., <code>CUST-001</code>) or internal UUID (e.g., <code>550e8400-e29b-41d4-a716-446655440000</code>)</td>\n</tr>\n</tbody>\n</table>\n</div><h2 id=\"request-format\">Request Format</h2>\n<h3 id=\"request-body-structure\">Request Body Structure</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"field_name\": \"new_value\"\n}\n\n</code></pre>\n<p>Only include the fields you want to update. All fields are optional — omit a field to leave it unchanged, or send <code>null</code> to clear it.</p>\n<h3 id=\"updatable-fields\">Updatable Fields</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Type</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>name</code></td>\n<td>string</td>\n<td>Customer name</td>\n</tr>\n<tr>\n<td><code>street_address</code></td>\n<td>string</td>\n<td>Street address of the customer</td>\n</tr>\n<tr>\n<td><code>city</code></td>\n<td>string</td>\n<td>City where the customer is located</td>\n</tr>\n<tr>\n<td><code>state</code></td>\n<td>string</td>\n<td>State/Province where the customer is located</td>\n</tr>\n<tr>\n<td><code>country</code></td>\n<td>string</td>\n<td>Country where the customer is located</td>\n</tr>\n<tr>\n<td><code>zip_code</code></td>\n<td>string</td>\n<td>ZIP/postal code of the customer</td>\n</tr>\n<tr>\n<td><code>email</code></td>\n<td>string</td>\n<td>Email address of the customer</td>\n</tr>\n<tr>\n<td><code>office_phone_number</code></td>\n<td>string</td>\n<td>Office phone number of the customer</td>\n</tr>\n<tr>\n<td><code>fax_number</code></td>\n<td>string</td>\n<td>Fax number of the customer</td>\n</tr>\n<tr>\n<td><code>is_active</code></td>\n<td>boolean</td>\n<td>Whether the customer is active</td>\n</tr>\n<tr>\n<td><code>type</code></td>\n<td>string</td>\n<td>Customer type classification</td>\n</tr>\n<tr>\n<td><code>branch</code></td>\n<td>string</td>\n<td>Branch the customer belongs to</td>\n</tr>\n<tr>\n<td><code>location</code></td>\n<td>string</td>\n<td>Location identifier</td>\n</tr>\n<tr>\n<td><code>region</code></td>\n<td>string</td>\n<td>Region the customer belongs to</td>\n</tr>\n<tr>\n<td><code>source</code></td>\n<td>string</td>\n<td>Data source identifier</td>\n</tr>\n<tr>\n<td><code>representative_ids</code></td>\n<td>array of strings</td>\n<td>Sales representative IDs assigned to the customer</td>\n</tr>\n<tr>\n<td><code>visibility_ids</code></td>\n<td>array of strings</td>\n<td>Account group IDs that can view this customer</td>\n</tr>\n<tr>\n<td><code>custom_fields</code></td>\n<td>array</td>\n<td>Custom field values (see Custom Fields section below)</td>\n</tr>\n<tr>\n<td><code>notepad</code></td>\n<td>string</td>\n<td>Free-text notepad content</td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"custom-fields-format\">Custom Fields Format</h3>\n<p>When updating custom fields, send the full desired list. The provided list <strong>replaces</strong> the existing custom fields entirely. Omit the field to leave custom fields unchanged.</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"custom_fields\": [\n        {\n            \"custom_field_id\": \"cf-12345\",\n            \"value\": \"some_value\"\n        },\n        {\n            \"custom_field_id\": \"cf-67890\",\n            \"value\": [\"option1\", \"option2\"]\n        }\n    ]\n}\n\n</code></pre>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Type</th>\n<th>Required</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>custom_field_id</code></td>\n<td>string</td>\n<td>Yes</td>\n<td>The unique identifier of the custom field definition</td>\n</tr>\n<tr>\n<td><code>value</code></td>\n<td>string, number, boolean, or array of strings</td>\n<td>Yes</td>\n<td>The value to set for the custom field</td>\n</tr>\n</tbody>\n</table>\n</div><h2 id=\"example-request\">Example Request</h2>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"name\": \"Acme Corporation (Updated)\",\n    \"city\": \"Los Angeles\",\n    \"state\": \"CA\",\n    \"is_active\": true,\n    \"representative_ids\": [\"rep-001\", \"rep-002\"],\n    \"custom_fields\": [\n        {\n            \"custom_field_id\": \"cf-industry\",\n            \"value\": \"Manufacturing\"\n        }\n    ]\n}\n\n</code></pre>\n<p>This request will:</p>\n<ul>\n<li><p>Update the customer name to \"Acme Corporation (Updated)\"</p>\n</li>\n<li><p>Change the city to \"Los Angeles\" and state to \"CA\"</p>\n</li>\n<li><p>Set the customer as active</p>\n</li>\n<li><p>Replace assigned sales representatives with rep-001 and rep-002</p>\n</li>\n<li><p>Replace all custom fields with the single provided custom field</p>\n</li>\n</ul>\n<h2 id=\"response-format\">Response Format</h2>\n<h3 id=\"success-response-200-ok\">Success Response (200 OK)</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"status_message\": \"success\",\n    \"data\": {\n        \"customer_id\": \"CUST-001\",\n        \"id\": \"a1b2c3d4-e5f6-7890-abcd-ef1234567890\",\n        \"name\": \"Acme Corporation (Updated)\",\n        \"bill_to_id\": \"BT-100\",\n        \"is_bill_to\": false,\n        \"street_address\": \"123 Main St\",\n        \"city\": \"Los Angeles\",\n        \"state\": \"CA\",\n        \"zip_code\": \"94105\",\n        \"country\": \"US\",\n        \"region\": \"Pacific\",\n        \"branch\": \"West Coast\",\n        \"email\": \"info@acmecorp.com\",\n        \"office_phone_number\": \"+1-555-0100\",\n        \"fax_number\": null,\n        \"is_active\": true,\n        \"type\": \"distributor\",\n        \"source\": \"ERP\",\n        \"representative_ids\": [\"rep-001\", \"rep-002\"],\n        \"visibility_ids\": [\"group-001\"],\n        \"custom_fields\": [\n            {\n                \"custom_field_id\": \"cf-industry\",\n                \"value\": \"Manufacturing\",\n                \"display_value\": { \"en\": \"Manufacturing\" }\n            }\n        ],\n        \"notepad\": null,\n        \"last_contact_date\": \"2024-03-15T10:30:00Z\",\n        \"last_purchase_date\": \"2024-02-20T14:00:00Z\",\n        \"total_spending\": 150000.00,\n        \"y2d_spending\": 45000.00,\n        \"last_year_spending\": 120000.00,\n        \"proton_score\": 85.5,\n        \"opportunities_count\": 3\n    }\n}\n\n</code></pre>\n<p>The response returns the <strong>full updated customer record</strong>, including all fields — not just the ones that were modified.</p>\n<h3 id=\"response-fields\">Response Fields</h3>\n<p>The response includes all customer attributes. Key fields are listed below:</p>\n<h4 id=\"core-identification\">Core Identification</h4>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Type</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>customer_id</code></td>\n<td>string</td>\n<td>Unique business identifier for the customer</td>\n</tr>\n<tr>\n<td><code>id</code></td>\n<td>string</td>\n<td>Internal stable UUID for the customer</td>\n</tr>\n<tr>\n<td><code>name</code></td>\n<td>string</td>\n<td>Customer name</td>\n</tr>\n<tr>\n<td><code>bill_to_id</code></td>\n<td>string</td>\n<td>Bill-to parent customer ID (nullable)</td>\n</tr>\n<tr>\n<td><code>is_bill_to</code></td>\n<td>boolean</td>\n<td>Whether this customer is a bill-to account (nullable)</td>\n</tr>\n</tbody>\n</table>\n</div><h4 id=\"address\">Address</h4>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Type</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>street_address</code></td>\n<td>string</td>\n<td>Street address (nullable)</td>\n</tr>\n<tr>\n<td><code>street_address_2</code></td>\n<td>string</td>\n<td>Secondary street address (nullable)</td>\n</tr>\n<tr>\n<td><code>city</code></td>\n<td>string</td>\n<td>City (nullable)</td>\n</tr>\n<tr>\n<td><code>state</code></td>\n<td>string</td>\n<td>State/Province (nullable)</td>\n</tr>\n<tr>\n<td><code>zip_code</code></td>\n<td>string</td>\n<td>ZIP/postal code (nullable)</td>\n</tr>\n<tr>\n<td><code>country</code></td>\n<td>string</td>\n<td>Country (nullable)</td>\n</tr>\n<tr>\n<td><code>region</code></td>\n<td>string</td>\n<td>Region (nullable)</td>\n</tr>\n<tr>\n<td><code>branch</code></td>\n<td>string</td>\n<td>Branch (nullable)</td>\n</tr>\n</tbody>\n</table>\n</div><h4 id=\"contact\">Contact</h4>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Type</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>email</code></td>\n<td>string</td>\n<td>Email address (nullable)</td>\n</tr>\n<tr>\n<td><code>office_phone_number</code></td>\n<td>string</td>\n<td>Office phone number (nullable)</td>\n</tr>\n<tr>\n<td><code>fax_number</code></td>\n<td>string</td>\n<td>Fax number (nullable)</td>\n</tr>\n</tbody>\n</table>\n</div><h4 id=\"status--classification\">Status &amp; Classification</h4>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Type</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>is_active</code></td>\n<td>boolean</td>\n<td>Whether the customer is active (nullable)</td>\n</tr>\n<tr>\n<td><code>type</code></td>\n<td>string</td>\n<td>Customer type classification (nullable)</td>\n</tr>\n<tr>\n<td><code>source</code></td>\n<td>string</td>\n<td>Data source identifier (nullable)</td>\n</tr>\n</tbody>\n</table>\n</div><h4 id=\"relationships\">Relationships</h4>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Type</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>representative_ids</code></td>\n<td>array of strings</td>\n<td>Assigned sales representative IDs</td>\n</tr>\n<tr>\n<td><code>visibility_ids</code></td>\n<td>array of strings</td>\n<td>Account group IDs with visibility access</td>\n</tr>\n<tr>\n<td><code>representatives</code></td>\n<td>array of objects</td>\n<td>Enriched sales representative details (name, email, user_id)</td>\n</tr>\n<tr>\n<td><code>account_groups</code></td>\n<td>array of objects</td>\n<td>Enriched account group details</td>\n</tr>\n<tr>\n<td><code>ship_tos</code></td>\n<td>array of objects</td>\n<td>Ship-to child accounts (nullable)</td>\n</tr>\n<tr>\n<td><code>bill_to</code></td>\n<td>object</td>\n<td>Bill-to parent account details (nullable)</td>\n</tr>\n</tbody>\n</table>\n</div><h4 id=\"account-hierarchy\">Account Hierarchy</h4>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Type</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>parent_customer_id</code></td>\n<td>string</td>\n<td>Parent customer UUID (nullable)</td>\n</tr>\n<tr>\n<td><code>account_type</code></td>\n<td>string</td>\n<td>Hierarchy level: <code>national</code>, <code>bill_to</code>, or <code>ship_to</code> (nullable)</td>\n</tr>\n<tr>\n<td><code>parent</code></td>\n<td>object</td>\n<td>Parent customer details (nullable)</td>\n</tr>\n<tr>\n<td><code>children</code></td>\n<td>array of objects</td>\n<td>Child customer details (nullable)</td>\n</tr>\n</tbody>\n</table>\n</div><h4 id=\"custom-fields--notes\">Custom Fields &amp; Notes</h4>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Type</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>custom_fields</code></td>\n<td>array or object</td>\n<td>Custom field values with display values</td>\n</tr>\n<tr>\n<td><code>notepad</code></td>\n<td>string</td>\n<td>Free-text notepad content (nullable)</td>\n</tr>\n</tbody>\n</table>\n</div><h4 id=\"analytics--dates\">Analytics &amp; Dates</h4>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Type</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>last_contact_date</code></td>\n<td>datetime</td>\n<td>Date of last contact (nullable)</td>\n</tr>\n<tr>\n<td><code>last_purchase_date</code></td>\n<td>datetime</td>\n<td>Date of last purchase (nullable)</td>\n</tr>\n<tr>\n<td><code>total_spending</code></td>\n<td>float</td>\n<td>All-time total spending (nullable)</td>\n</tr>\n<tr>\n<td><code>y2d_spending</code></td>\n<td>float</td>\n<td>Year-to-date spending (nullable)</td>\n</tr>\n<tr>\n<td><code>last_year_spending</code></td>\n<td>float</td>\n<td>Last year total spending (nullable)</td>\n</tr>\n<tr>\n<td><code>proton_score</code></td>\n<td>float</td>\n<td>AI-generated score (nullable)</td>\n</tr>\n<tr>\n<td><code>proton_score_explanation</code></td>\n<td>string</td>\n<td>Explanation of the score (nullable)</td>\n</tr>\n<tr>\n<td><code>opportunities_count</code></td>\n<td>integer</td>\n<td>Number of open opportunities (nullable)</td>\n</tr>\n</tbody>\n</table>\n</div><h2 id=\"error-responses\">Error Responses</h2>\n<h3 id=\"400-bad-request\">400 Bad Request</h3>\n<p>Returned when the request body contains no updatable fields or is malformed.</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"status_message\": \"error\",\n    \"error\": {\n        \"code\": \"INVALID_REQUEST\",\n        \"message\": \"Invalid request data or no updatable fields provided\"\n    }\n}\n\n</code></pre>\n<h3 id=\"401-unauthorized\">401 Unauthorized</h3>\n<p>Returned when authentication fails or the API key is invalid or missing.</p>\n<h3 id=\"403-forbidden\">403 Forbidden</h3>\n<p>Returned when the requesting user does not have visibility access to the customer.</p>\n<h3 id=\"404-not-found\">404 Not Found</h3>\n<p>Returned when no customer is found with the provided identifier.</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"status_message\": \"error\",\n    \"error\": {\n        \"code\": \"NOT_FOUND\",\n        \"message\": \"Customer not found\"\n    }\n}\n\n</code></pre>\n<h3 id=\"500-internal-server-error\">500 Internal Server Error</h3>\n<p>Returned when an unexpected error occurs on the server.</p>\n<h2 id=\"best-practices\">Best Practices</h2>\n<ol>\n<li><p><strong>Send only changed fields</strong>: Only include fields you want to update — omitted fields are left unchanged</p>\n</li>\n<li><p><strong>Use null to clear fields</strong>: Send a field with value <code>null</code> to explicitly clear it</p>\n</li>\n<li><p><strong>Custom fields are replaced entirely</strong>: When updating custom fields, send the complete list — partial updates are not supported for custom fields</p>\n</li>\n<li><p><strong>Use the right identifier</strong>: You can use either the business <code>customer_id</code> or the internal UUID in the URL path</p>\n</li>\n<li><p><strong>Check access first</strong>: Ensure the requesting user has visibility access to the customer to avoid 403 errors</p>\n</li>\n<li><p><strong>Verify the response</strong>: The response returns the full updated record — use it to confirm your changes were applied correctly</p>\n</li>\n</ol>\n<h2 id=\"notes\">Notes</h2>\n<ul>\n<li><p>This endpoint uses PATCH semantics — only provided fields are updated</p>\n</li>\n<li><p>The response always returns the complete customer record, not just the updated fields</p>\n</li>\n<li><p>Updating a customer automatically creates an audit trail entry</p>\n</li>\n<li><p>A <code>customer.updated</code> webhook event is published after a successful update</p>\n</li>\n<li><p>The <code>representative_ids</code> and <code>visibility_ids</code> fields replace the entire list when provided — they do not append</p>\n</li>\n<li><p>Fields not listed in the Updatable Fields table cannot be modified through this endpoint</p>\n</li>\n</ul>\n","urlObject":{"path":["{{company}}","v1","customers","{identifier}"],"host":["{{domain}}"],"query":[],"variable":[]}},"response":[{"id":"c64d5263-8903-4639-af54-e97ba5ca66db","name":"Update Customer","originalRequest":{"method":"PATCH","header":[{"key":"Content-Type","value":"application/json"},{"key":"Accept","value":"application/json"},{"key":"X-User-Id","value":"{{user_id}}"},{"key":"X-Company","value":"{{company}}"},{"key":"X-Api-Key","value":"{{api_key}}"}],"body":{"mode":"raw","raw":"{\r\n    \"custom_fields\": [\r\n        {\r\n            \"custom_field_id\": \"0a5a3201-5ed8-4bac-a8a4-4c9d58b0a437\",\r\n            \"value\": 850\r\n        },\r\n        {\r\n            \"custom_field_id\": \"3ecfd607-7f19-4ef7-b2c8-4a2502bfabf1\",\r\n            \"value\": \"this is edited val\"\r\n        }\r\n    ]\r\n}","options":{"raw":{"language":"json"}}},"url":"{{domain}}/{{company}}/v1/customers/{identifier}"},"status":"OK","code":200,"_postman_previewlanguage":null,"header":null,"cookie":[],"responseTime":null,"body":"{\r\n    \"status_message\": \"SUCCESS\",\r\n    \"data\": {\r\n        \"customer_id\": \"1-2\",\r\n        \"name\": \"Surge Conductors\",\r\n        \"is_bill_to\": false,\r\n        \"visibility_ids\": [\r\n            \"44\",\r\n            \"james.smith@proton.ai\",\r\n            \"James Smith\"\r\n        ],\r\n        \"custom_fields\": [\r\n            {\r\n                \"custom_field_id\": \"0a5a3201-5ed8-4bac-a8a4-4c9d58b0a437\",\r\n                \"value\": 850\r\n            },\r\n            {\r\n                \"custom_field_id\": \"3ecfd607-7f19-4ef7-b2c8-4a2502bfabf1\",\r\n                \"value\": \"this is edited val\"\r\n            }\r\n        ],\r\n        \"proton_score\": 78.06983828658646,\r\n        \"custom_orders_total_open_n_days_calculated_date\": \"2024-09-03T03:04:01.164851\",\r\n        \"churn_status\": \"at_risk\",\r\n        \"YOY\": null,\r\n        \"custom_electricaldemo_branch_id\": \"44\",\r\n        \"total_last_year_orders\": 2,\r\n        \"churn_explanation\": \"Customer has recently been ordering every 18.0 days on average, and it has been 38.0 days since their last order. This is why they are classified as at risk.\",\r\n        \"zip_code\": \"55363\",\r\n        \"unreturned_orders_count\": 18,\r\n        \"custom_orders_line_total_open_n_days\": 14,\r\n        \"total_spending\": 8073.119920730591,\r\n        \"proton_score_explanation\": \"Last contact days: 63, Last order days: 39, date_score = 0.9758729785823308 Scaler = 1.0\",\r\n        \"state\": \"CA\",\r\n        \"average_order_value\": 2900.3399896621704,\r\n        \"customers_search_string_secondary\": \"\",\r\n        \"last_year_m2d_spending\": 0,\r\n        \"office_phone_number\": \"(782) 9771820\",\r\n        \"open_order_n_days_ago_line_count\": 6,\r\n        \"returned_orders_count\": 0,\r\n        \"bill_to_id\": \"1\",\r\n        \"first_purchase_sales_plays_count\": 0,\r\n        \"internal_user_id\": [\r\n            \"james.smith@proton.ai\"\r\n        ],\r\n        \"open_order_n_days_ago_total_amount\": 145990.22999999998,\r\n        \"churn_probability\": 0.8717916324332217,\r\n        \"customers_search_string\": \"1-2\",\r\n        \"last_y2d_spending\": 0,\r\n        \"new_first_purchase_sales_play\": false,\r\n        \"last_contact_date\": \"2024-07-02T12:00:00+00:00\",\r\n        \"product_lines_purchased\": 7,\r\n        \"m2d_spending\": 0,\r\n        \"street_address\": \"580 Sixth Avenue\",\r\n        \"gross_margin_last_year\": 4175.9499588012695,\r\n        \"YOY_Y2D\": null,\r\n        \"city\": \"Houston\",\r\n        \"orders_per_week\": 0.038461538461538464,\r\n        \"quote_sales_plays_count\": 0,\r\n        \"open_order_n_days_ago_latest_date\": \"2023-06-25T21:59:00\",\r\n        \"date_precomputed_first\": \"2024-09-03T03:13:01.508928\",\r\n        \"new_quote_sales_play\": false,\r\n        \"date_precomputed\": \"2024-09-03T03:13:01.790823\",\r\n        \"product_lines_purchased_percent\": 87.5,\r\n        \"opportunities_count\": 1,\r\n        \"email\": \"surge.conductors@protonelectricaldemo.com\",\r\n        \"YOY_Y2D_dollars\": 5800.679979324341,\r\n        \"last_ingested_date\": \"2024-05-23T19:07:07.492021\",\r\n        \"is_active\": true,\r\n        \"viewed_online_sales_plays_count\": 0,\r\n        \"return_rate\": 0.0,\r\n        \"custom_orders_total_open_n_days\": 11157.7,\r\n        \"new_viewed_online_sales_play\": false,\r\n        \"y2d_spending\": 5800.679979324341,\r\n        \"YOY_dollars\": 5800.679979324341,\r\n        \"product_initiatives_count\": 0,\r\n        \"previous_year_spending\": 0,\r\n        \"last_purchase_date\": \"2024-07-26T16:00:00+00:00\",\r\n        \"last_year_spending\": 5800.679979324341,\r\n        \"custom_orders_total_open_n_days_caculated_date\": \"2023-08-18T20:45:53.710904\",\r\n        \"representative_ids\": [\r\n            \"james.smith@proton.ai\"\r\n        ],\r\n        \"representatives\": [\r\n            {\r\n                \"user_id\": \"james.smith@proton.ai\",\r\n                \"internal_user_id\": \"james.smith@proton.ai\",\r\n                \"name\": \"James Smith\",\r\n                \"email\": \"james.smith@proton.ai\"\r\n            }\r\n        ],\r\n        \"product_initiative_keys\": []\r\n    }\r\n}"}],"_postman_id":"2abd7eaa-8b74-42d8-8c9b-2a59b33acafa"},{"name":"Search Customers V2","id":"10377940-1814-41ef-9299-843b9c92c7d0","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","value":"application/json","type":"text"},{"key":"Accept","value":"application/json","type":"text"},{"key":"X-User-Id","value":"{{user_id}}","type":"text"},{"key":"X-Company","value":"{{company}}","type":"text"},{"key":"X-Api-Key","value":"{{api_key}}","type":"text"}],"body":{"mode":"urlencoded","urlencoded":[]},"url":"{{domain}}/{{company}}/v2/customers/search","description":"<h1 id=\"customer-search-api-v2\">Customer Search API v2</h1>\n<h2 id=\"overview\">Overview</h2>\n<p>The Customer Search API v2 endpoint allows you to search for customers within a specific company using a query string and advanced filtering options. This endpoint supports various search operators for flexible and precise customer searches. Customers represent the accounts your sales team sells to, including their identifying information, address details, contact info, and classification data.</p>\n<h2 id=\"endpoint\">Endpoint</h2>\n<p><strong>Method</strong>: <code>POST</code>\n<strong>URL</strong>: <code>{{domain}}/{{company}}/v2/customers/search</code></p>\n<h2 id=\"request-format\">Request Format</h2>\n<h3 id=\"request-body-structure\">Request Body Structure</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"query\": \"string\",\n    \"filters\": {\n        \"field_name\": {\n            \"operator\": value\n        }\n    },\n    \"count\": integer,\n    \"offset\": integer\n}\n\n</code></pre>\n<h3 id=\"request-parameters\">Request Parameters</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Parameter</th>\n<th>Type</th>\n<th>Required</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>query</code></td>\n<td>string</td>\n<td>Yes</td>\n<td>The search query string to match against customer records (e.g., partial name or ID match)</td>\n</tr>\n<tr>\n<td><code>filters</code></td>\n<td>object</td>\n<td>No</td>\n<td>An object containing field-specific filters with search operators</td>\n</tr>\n<tr>\n<td><code>count</code></td>\n<td>integer</td>\n<td>No</td>\n<td>Number of results per page (default: 10)</td>\n</tr>\n<tr>\n<td><code>offset</code></td>\n<td>integer</td>\n<td>No</td>\n<td>Pagination offset for results (default: 0)</td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"filter-fields\">Filter Fields</h3>\n<p>The following fields can be used in the <code>filters</code> object:</p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Type</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>name</code></td>\n<td>string</td>\n<td>The name of the customer</td>\n</tr>\n<tr>\n<td><code>type</code></td>\n<td>string</td>\n<td>The type/classification of the customer</td>\n</tr>\n<tr>\n<td><code>branch</code></td>\n<td>string</td>\n<td>The branch the customer belongs to</td>\n</tr>\n<tr>\n<td><code>location</code></td>\n<td>string</td>\n<td>The location of the customer</td>\n</tr>\n<tr>\n<td><code>account_type</code></td>\n<td>string</td>\n<td>The hierarchy level of the customer (e.g., <code>national</code>, <code>bill_to</code>, <code>ship_to</code>)</td>\n</tr>\n<tr>\n<td><code>representative_ids</code></td>\n<td>string</td>\n<td>The IDs of sales representatives assigned to the customer</td>\n</tr>\n<tr>\n<td><code>bill_to_id</code></td>\n<td>string</td>\n<td>The bill-to parent customer ID</td>\n</tr>\n<tr>\n<td><code>street_address</code></td>\n<td>string</td>\n<td>The street address of the customer</td>\n</tr>\n<tr>\n<td><code>city</code></td>\n<td>string</td>\n<td>The city where the customer is located</td>\n</tr>\n<tr>\n<td><code>state</code></td>\n<td>string</td>\n<td>The state/province where the customer is located</td>\n</tr>\n<tr>\n<td><code>zip_code</code></td>\n<td>string</td>\n<td>The ZIP/postal code of the customer</td>\n</tr>\n<tr>\n<td><code>region</code></td>\n<td>string</td>\n<td>The region the customer belongs to</td>\n</tr>\n<tr>\n<td><code>country</code></td>\n<td>string</td>\n<td>The country where the customer is located</td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"search-operators\">Search Operators</h3>\n<p>Each filter field can use one or more of the following operators:</p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Operator</th>\n<th>Type</th>\n<th>Description</th>\n<th>Example</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>eq</code></td>\n<td>string, boolean, number, null</td>\n<td>Exact match (equals)</td>\n<td><code>{ \"state\": { \"eq\": \"CA\" } }</code></td>\n</tr>\n<tr>\n<td><code>neq</code></td>\n<td>string, boolean, number, null</td>\n<td>Not equal to</td>\n<td><code>{ \"type\": { \"neq\": \"inactive\" } }</code></td>\n</tr>\n<tr>\n<td><code>gt</code></td>\n<td>number, datetime</td>\n<td>Greater than</td>\n<td><code>{ \"created_date\": { \"gt\": \"2023-01-01\" } }</code></td>\n</tr>\n<tr>\n<td><code>gte</code></td>\n<td>number, datetime</td>\n<td>Greater than or equal to</td>\n<td><code>{ \"created_date\": { \"gte\": \"2023-01-01\" } }</code></td>\n</tr>\n<tr>\n<td><code>lt</code></td>\n<td>number, datetime</td>\n<td>Less than</td>\n<td><code>{ \"created_date\": { \"lt\": \"2024-01-01\" } }</code></td>\n</tr>\n<tr>\n<td><code>lte</code></td>\n<td>number, datetime</td>\n<td>Less than or equal to</td>\n<td><code>{ \"created_date\": { \"lte\": \"2023-12-31\" } }</code></td>\n</tr>\n<tr>\n<td><code>contains</code></td>\n<td>string</td>\n<td>Contains substring (case-sensitive)</td>\n<td><code>{ \"city\": { \"contains\": \"Francisco\" } }</code></td>\n</tr>\n<tr>\n<td><code>not_contains</code></td>\n<td>string</td>\n<td>Does not contain substring</td>\n<td><code>{ \"name\": { \"not_contains\": \"test\" } }</code></td>\n</tr>\n<tr>\n<td><code>exists</code></td>\n<td>boolean</td>\n<td>Field exists or not</td>\n<td><code>{ \"email\": { \"exists\": true } }</code></td>\n</tr>\n<tr>\n<td><code>includes</code></td>\n<td>array</td>\n<td>Value is included in the provided list</td>\n<td><code>{ \"state\": { \"includes\": [\"CA\", \"NY\", \"TX\"] } }</code></td>\n</tr>\n</tbody>\n</table>\n</div><p><strong>Note</strong>:</p>\n<ul>\n<li><p>Multiple operators cannot be used for the same field in a single filter</p>\n</li>\n<li><p>At least one operator must be defined for each filter field</p>\n</li>\n<li><p>Operators can accept single values or arrays (where applicable)</p>\n</li>\n</ul>\n<h2 id=\"example-request\">Example Request</h2>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"query\": \"acme\",\n    \"filters\": {\n        \"state\": { \"eq\": \"CA\" },\n        \"city\": { \"contains\": \"Francisco\" },\n        \"account_type\": { \"includes\": [\"bill_to\", \"ship_to\"] }\n    },\n    \"count\": 20,\n    \"offset\": 0\n}\n\n</code></pre>\n<p>This request will:</p>\n<ul>\n<li><p>Search for customers with names or IDs containing \"acme\"</p>\n</li>\n<li><p>Filter for customers located in California</p>\n</li>\n<li><p>Include only customers in cities containing \"Francisco\"</p>\n</li>\n<li><p>Include only customers with account type \"bill_to\" or \"ship_to\"</p>\n</li>\n</ul>\n<h2 id=\"response-format\">Response Format</h2>\n<h3 id=\"success-response-200-ok\">Success Response (200 OK)</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"status_message\": \"success\",\n    \"data\": {\n        \"message\": \"\",\n        \"items\": [\n            {\n                \"customer_id\": \"CUST-001\",\n                \"id\": \"a1b2c3d4-e5f6-7890-abcd-ef1234567890\",\n                \"name\": \"Acme Corporation\",\n                \"bill_to_id\": \"BT-100\",\n                \"street_address\": \"123 Main St\",\n                \"city\": \"San Francisco\",\n                \"state\": \"CA\",\n                \"zip_code\": \"94105\",\n                \"email\": \"info@acmecorp.com\",\n                \"office_phone_number\": \"+1-555-0100\",\n                \"fax_number\": null,\n                \"branch\": \"West Coast\",\n                \"region\": \"Pacific\",\n                \"country\": \"US\"\n            }\n        ],\n        \"total_count\": 15,\n        \"page_size\": 20,\n        \"page_number\": 1,\n        \"total_pages\": 1\n    }\n}\n\n</code></pre>\n<h3 id=\"response-fields\">Response Fields</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Type</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>status_message</code></td>\n<td>string</td>\n<td>Overall status of the request</td>\n</tr>\n<tr>\n<td><code>data.message</code></td>\n<td>string</td>\n<td>Descriptive message about the response</td>\n</tr>\n<tr>\n<td><code>data.items</code></td>\n<td>array</td>\n<td>Array of customer objects matching the search criteria</td>\n</tr>\n<tr>\n<td><code>data.total_count</code></td>\n<td>integer</td>\n<td>Total number of customers matching the search criteria</td>\n</tr>\n<tr>\n<td><code>data.page_size</code></td>\n<td>integer</td>\n<td>Number of items returned in this page</td>\n</tr>\n<tr>\n<td><code>data.page_number</code></td>\n<td>integer</td>\n<td>Current page number (calculated from offset)</td>\n</tr>\n<tr>\n<td><code>data.total_pages</code></td>\n<td>integer</td>\n<td>Total number of pages available</td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"customer-object-fields\">Customer Object Fields</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Type</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>customer_id</code></td>\n<td>string</td>\n<td>Unique business identifier for the customer</td>\n</tr>\n<tr>\n<td><code>id</code></td>\n<td>string</td>\n<td>Internal stable UUID for the customer (nullable)</td>\n</tr>\n<tr>\n<td><code>name</code></td>\n<td>string</td>\n<td>Name of the customer</td>\n</tr>\n<tr>\n<td><code>bill_to_id</code></td>\n<td>string</td>\n<td>Bill-to parent customer ID</td>\n</tr>\n<tr>\n<td><code>street_address</code></td>\n<td>string</td>\n<td>Street address of the customer (nullable)</td>\n</tr>\n<tr>\n<td><code>city</code></td>\n<td>string</td>\n<td>City where the customer is located (nullable)</td>\n</tr>\n<tr>\n<td><code>state</code></td>\n<td>string</td>\n<td>State/Province where the customer is located (nullable)</td>\n</tr>\n<tr>\n<td><code>zip_code</code></td>\n<td>string</td>\n<td>ZIP/postal code of the customer (nullable)</td>\n</tr>\n<tr>\n<td><code>email</code></td>\n<td>string</td>\n<td>Email address of the customer (nullable)</td>\n</tr>\n<tr>\n<td><code>office_phone_number</code></td>\n<td>string</td>\n<td>Office phone number of the customer (nullable)</td>\n</tr>\n<tr>\n<td><code>fax_number</code></td>\n<td>string</td>\n<td>Fax number of the customer (nullable)</td>\n</tr>\n<tr>\n<td><code>branch</code></td>\n<td>string</td>\n<td>Branch the customer belongs to (nullable)</td>\n</tr>\n<tr>\n<td><code>region</code></td>\n<td>string</td>\n<td>Region the customer belongs to (nullable)</td>\n</tr>\n<tr>\n<td><code>country</code></td>\n<td>string</td>\n<td>Country where the customer is located (nullable)</td>\n</tr>\n</tbody>\n</table>\n</div><h2 id=\"error-responses\">Error Responses</h2>\n<h3 id=\"400-bad-request\">400 Bad Request</h3>\n<p>Returned when the request is malformed or contains invalid parameters.</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"status_message\": \"error\",\n    \"error\": {\n        \"code\": \"INVALID_REQUEST\",\n        \"message\": \"Invalid request data or search query\"\n    }\n}\n\n</code></pre>\n<h3 id=\"401-unauthorized\">401 Unauthorized</h3>\n<p>Returned when authentication fails or the API key is invalid or missing.</p>\n<h3 id=\"404-not-found\">404 Not Found</h3>\n<p>Returned when the specified company does not exist.</p>\n<h3 id=\"500-internal-server-error\">500 Internal Server Error</h3>\n<p>Returned when an unexpected error occurs on the server.</p>\n<h2 id=\"pagination\">Pagination</h2>\n<p>Use the <code>count</code> and <code>offset</code> parameters to paginate through results:</p>\n<ul>\n<li><p>First page: <code>offset: 0, count: 20</code></p>\n</li>\n<li><p>Second page: <code>offset: 20, count: 20</code></p>\n</li>\n<li><p>Third page: <code>offset: 40, count: 20</code></p>\n</li>\n</ul>\n<p>The response includes <code>total_count</code>, <code>page_number</code>, and <code>total_pages</code> to help with pagination navigation.</p>\n<h2 id=\"best-practices\">Best Practices</h2>\n<ol>\n<li><p><strong>Use specific queries</strong>: Provide at least 3 characters in the <code>query</code> parameter for better performance</p>\n</li>\n<li><p><strong>Combine filters wisely</strong>: Use multiple filters to narrow down results effectively</p>\n</li>\n<li><p><strong>Handle pagination</strong>: For large result sets, implement proper pagination to avoid timeouts</p>\n</li>\n<li><p><strong>Error handling</strong>: Always check the <code>status_message</code> and handle errors appropriately</p>\n</li>\n<li><p><strong>Account hierarchy</strong>: Use <code>account_type</code> and <code>bill_to_id</code> filters to navigate customer hierarchies</p>\n</li>\n</ol>\n<h2 id=\"notes\">Notes</h2>\n<ul>\n<li><p>The search is case-insensitive for the <code>query</code> parameter</p>\n</li>\n<li><p>Filter operators are case-sensitive for string comparisons</p>\n</li>\n<li><p>Empty filter values are treated as \"match any\"</p>\n</li>\n<li><p>The <code>includes</code> operator is particularly useful for matching against multiple states, regions, or account types</p>\n</li>\n<li><p>Results are sorted by relevance to the search query by default</p>\n</li>\n<li><p>All filters are combined using AND logic — all conditions must be met for a customer to be returned</p>\n</li>\n</ul>\n","urlObject":{"path":["{{company}}","v2","customers","search"],"host":["{{domain}}"],"query":[],"variable":[]}},"response":[{"id":"3f497753-263c-4327-8197-74c21d62f88f","name":"Search Customers V2","originalRequest":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"},{"key":"Accept","value":"application/json"},{"key":"X-User-Id","value":"{{user_id}}"},{"key":"X-Company","value":"{{company}}"},{"key":"X-Api-Key","value":"{{api_key}}"}],"body":{"mode":"raw","raw":"{\r\n    \"query\": \"indu\",\r\n    \"filters\": {\r\n        \"state\": { \"eq\": \"CA\" },\r\n        \"city\": { \"neq\": \"San Jose\" },\r\n        \"bill_to_id\": { \"contains\": \"123\" },\r\n        \"street_address\": { \"not_contains\": \"Fourth\"},\r\n        \"zip_code\": { \"includes\": [ \"55759\", \"70008\", \"11835\" ] },\r\n        \"region\": { \"eq\": \"NW\" },\r\n        \"country\": { \"eq\": \"US\" }\r\n    },\r\n    \"count\": 5,\r\n    \"offset\": 0\r\n}","options":{"raw":{"language":"json"}}},"url":"{{domain}}/{{company}}/v2/customers/search"},"status":"OK","code":200,"_postman_previewlanguage":null,"header":null,"cookie":[],"responseTime":null,"body":"{\r\n    \"status_message\": \"SUCCESS\",\r\n    \"data\": {\r\n        \"message\": \"\",\r\n        \"items\": [\r\n            {\r\n                \"customer_id\": \"5117064-12227114\",\r\n                \"id\": \"93c7d1f4-a5b0-4b02-aa88-69544cfaa7dc\",\r\n                \"bill_to_id\": \"5117064\",\r\n                \"name\": \"Horizon Reactors\",\r\n                \"email\": \"accounts@horizonreactors.com\",\r\n                \"street_address\": \"160 Alewife Brook Pkwy, #1147\",\r\n                \"city\": \"Dunnigan\",\r\n                \"state\": \"CA\",\r\n                \"zip_code\": \"95937\",\r\n                \"fax_number\": \"\",\r\n                \"office_phone_number\": \"\",\r\n                \"branch\": null,\r\n                \"region\": null,\r\n                \"country\": \"US\"\r\n            },\r\n            {\r\n                \"customer_id\": \"7990634-13954328\",\r\n                \"id\": \"d3aab51d-b258-4d49-8671-299aae0c5c30\",\r\n                \"bill_to_id\": \"7990634\",\r\n                \"name\": \"Beta Systems\",\r\n                \"email\": \"accounts@betasystems.com\",\r\n                \"street_address\": \"160 Alewife Brook Pkwy, #1147\",\r\n                \"city\": \"Lompoc\",\r\n                \"state\": \"CA\",\r\n                \"zip_code\": \"93438\",\r\n                \"fax_number\": \"\",\r\n                \"office_phone_number\": \"\",\r\n                \"branch\": null,\r\n                \"region\": null,\r\n                \"country\": \"US\"\r\n            },\r\n            {\r\n                \"customer_id\": \"196446-13174770\",\r\n                \"id\": \"568ac4a8-fd04-4bcb-b19f-e318f80c997e\",\r\n                \"bill_to_id\": \"196446\",\r\n                \"name\": \"Vanguard Circuitry\",\r\n                \"email\": \"accounts@vanguardcircuitry.com\",\r\n                \"street_address\": \"160 Alewife Brook Pkwy, #1147\",\r\n                \"city\": \"Brooks\",\r\n                \"state\": \"CA\",\r\n                \"zip_code\": \"95606\",\r\n                \"fax_number\": \"\",\r\n                \"office_phone_number\": \"\",\r\n                \"branch\": null,\r\n                \"region\": null,\r\n                \"country\": \"US\"\r\n            },\r\n            {\r\n                \"customer_id\": \"1155410\",\r\n                \"id\": \"76d4e7a4-c566-4c12-9b6e-092388f460d0\",\r\n                \"bill_to_id\": \"1155410\",\r\n                \"name\": \"Spark Innovations\",\r\n                \"email\": \"accounts@sparkinnovations.com\",\r\n                \"street_address\": \"160 Alewife Brook Pkwy, #1147\",\r\n                \"city\": \"Dunnigan\",\r\n                \"state\": \"CA\",\r\n                \"zip_code\": \"95937\",\r\n                \"fax_number\": \"\",\r\n                \"office_phone_number\": \"\",\r\n                \"branch\": null,\r\n                \"region\": null,\r\n                \"country\": \"US\"\r\n            },\r\n            {\r\n                \"customer_id\": \"1736954-10377270\",\r\n                \"id\": \"c49c22ac-082d-45da-8580-189634be9901\",\r\n                \"bill_to_id\": \"1736954\",\r\n                \"name\": \"Delta Circuitry\",\r\n                \"email\": \"accounts@deltacircuitry.com\",\r\n                \"street_address\": \"160 Alewife Brook Pkwy, #1147\",\r\n                \"city\": \"Brooks\",\r\n                \"state\": \"CA\",\r\n                \"zip_code\": \"95606\",\r\n                \"fax_number\": \"\",\r\n                \"office_phone_number\": \"\",\r\n                \"branch\": null,\r\n                \"region\": null,\r\n                \"country\": \"US\"\r\n            }\r\n        ],\r\n        \"total_count\": 98,\r\n        \"page_size\": 5,\r\n        \"page_number\": 1,\r\n        \"total_pages\": 20\r\n    }\r\n}"}],"_postman_id":"10377940-1814-41ef-9299-843b9c92c7d0"},{"name":"Create Customer V1","id":"aa4d6ea6-5a5c-4dba-b9ae-7e605e33f753","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","value":"application/json","type":"text"},{"key":"Accept","value":"application/json","type":"text"},{"key":"X-User-Id","value":"{{user_id}}","type":"text"},{"key":"X-Company","value":"{{company}}","type":"text"},{"key":"X-Api-Key","value":"{{api_key}}","type":"text"}],"body":{"mode":"urlencoded","urlencoded":[]},"url":"{{domain}}/{{company}}/v1/customers","description":"<h1 id=\"create-customer-api-v1\">Create Customer API v1</h1>\n<h2 id=\"overview\">Overview</h2>\n<p>The Create Customer API v1 endpoint allows you to create a new customer record within a specific company. Customers represent the accounts your sales team sells to, including their identifying information, address details, contact info, and classification data. The endpoint validates that the <code>customer_id</code> is unique within the company before creating the record.</p>\n<h2 id=\"endpoint\">Endpoint</h2>\n<p><strong>Method</strong>: <code>POST</code><br /><strong>URL</strong>: <code>{{domain}}/{{company}}/v1/customers</code></p>\n<h2 id=\"path-parameters\">Path Parameters</h2>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Parameter</th>\n<th>Type</th>\n<th>Required</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>company</code></td>\n<td>string</td>\n<td>Yes</td>\n<td>The company (tenant) identifier</td>\n</tr>\n</tbody>\n</table>\n</div><h2 id=\"request-format\">Request Format</h2>\n<h3 id=\"request-body-structure\">Request Body Structure</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"customer_id\": \"string\",\n    \"name\": \"string\",\n    \"street_address\": \"string\",\n    \"city\": \"string\",\n    \"state\": \"string\",\n    \"country\": \"string\",\n    \"zip_code\": \"string\",\n    \"email\": \"string\",\n    \"office_phone_number\": \"string\",\n    \"fax_number\": \"string\",\n    \"is_active\": boolean,\n    \"type\": \"string\",\n    \"branch\": \"string\",\n    \"location\": \"string\",\n    \"region\": \"string\",\n    \"source\": \"string\",\n    \"bill_to_id\": \"string\",\n    \"is_bill_to\": boolean,\n    \"parent_customer_id\": \"string\",\n    \"account_type\": \"string\",\n    \"representative_ids\": [\"string\"],\n    \"visibility_ids\": [\"string\"],\n    \"custom_fields\": [\n        {\n            \"custom_field_id\": \"string\",\n            \"string_val\": \"string\",\n            \"float_val\": number,\n            \"bool_val\": boolean,\n            \"date_val\": \"string\",\n            \"string_val_list\": [\"string\"]\n        }\n    ]\n}\n\n</code></pre>\n<h3 id=\"required-fields\">Required Fields</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Type</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>customer_id</code></td>\n<td>string</td>\n<td>Unique business identifier for the customer (must be unique within the company)</td>\n</tr>\n<tr>\n<td><code>name</code></td>\n<td>string</td>\n<td>Customer name</td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"optional-fields\">Optional Fields</h3>\n<h4 id=\"address\">Address</h4>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Type</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>street_address</code></td>\n<td>string</td>\n<td>Street address of the customer</td>\n</tr>\n<tr>\n<td><code>city</code></td>\n<td>string</td>\n<td>City where the customer is located</td>\n</tr>\n<tr>\n<td><code>state</code></td>\n<td>string</td>\n<td>State/Province where the customer is located</td>\n</tr>\n<tr>\n<td><code>country</code></td>\n<td>string</td>\n<td>Country where the customer is located</td>\n</tr>\n<tr>\n<td><code>zip_code</code></td>\n<td>string</td>\n<td>ZIP/postal code of the customer</td>\n</tr>\n</tbody>\n</table>\n</div><h4 id=\"contact-information\">Contact Information</h4>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Type</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>email</code></td>\n<td>string</td>\n<td>Email address of the customer</td>\n</tr>\n<tr>\n<td><code>office_phone_number</code></td>\n<td>string</td>\n<td>Office phone number of the customer</td>\n</tr>\n<tr>\n<td><code>fax_number</code></td>\n<td>string</td>\n<td>Fax number of the customer</td>\n</tr>\n</tbody>\n</table>\n</div><h4 id=\"status--classification\">Status &amp; Classification</h4>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Type</th>\n<th>Default</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>is_active</code></td>\n<td>boolean</td>\n<td><code>true</code></td>\n<td>Whether the customer is active</td>\n</tr>\n<tr>\n<td><code>type</code></td>\n<td>string</td>\n<td>null</td>\n<td>Customer type classification</td>\n</tr>\n<tr>\n<td><code>branch</code></td>\n<td>string</td>\n<td>null</td>\n<td>Branch the customer belongs to</td>\n</tr>\n<tr>\n<td><code>location</code></td>\n<td>string</td>\n<td>null</td>\n<td>Location identifier</td>\n</tr>\n<tr>\n<td><code>region</code></td>\n<td>string</td>\n<td>null</td>\n<td>Region the customer belongs to</td>\n</tr>\n<tr>\n<td><code>source</code></td>\n<td>string</td>\n<td>null</td>\n<td>Data source identifier</td>\n</tr>\n</tbody>\n</table>\n</div><h4 id=\"account-hierarchy\">Account Hierarchy</h4>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Type</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>bill_to_id</code></td>\n<td>string</td>\n<td>Bill-to parent customer ID</td>\n</tr>\n<tr>\n<td><code>is_bill_to</code></td>\n<td>boolean</td>\n<td>Whether this customer is a bill-to account</td>\n</tr>\n<tr>\n<td><code>parent_customer_id</code></td>\n<td>string</td>\n<td>Parent customer UUID for multi-level hierarchy</td>\n</tr>\n<tr>\n<td><code>account_type</code></td>\n<td>string</td>\n<td>Hierarchy level: <code>national</code>, <code>bill_to</code>, or <code>ship_to</code></td>\n</tr>\n</tbody>\n</table>\n</div><h4 id=\"assignments--visibility\">Assignments &amp; Visibility</h4>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Type</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>representative_ids</code></td>\n<td>array of strings</td>\n<td>Sales representative IDs assigned to the customer</td>\n</tr>\n<tr>\n<td><code>visibility_ids</code></td>\n<td>array of strings</td>\n<td>Account group IDs that can view this customer</td>\n</tr>\n</tbody>\n</table>\n</div><h4 id=\"custom-fields\">Custom Fields</h4>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Type</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>custom_fields</code></td>\n<td>array</td>\n<td>List of custom field values (see Custom Fields section below)</td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"custom-fields-format\">Custom Fields Format</h3>\n<p>Each custom field object in the <code>custom_fields</code> array has the following structure:</p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Type</th>\n<th>Required</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>custom_field_id</code></td>\n<td>string</td>\n<td>Yes</td>\n<td>The unique identifier of the custom field definition</td>\n</tr>\n<tr>\n<td><code>string_val</code></td>\n<td>string</td>\n<td>No</td>\n<td>String value for the custom field</td>\n</tr>\n<tr>\n<td><code>float_val</code></td>\n<td>number</td>\n<td>No</td>\n<td>Numeric value for the custom field</td>\n</tr>\n<tr>\n<td><code>bool_val</code></td>\n<td>boolean</td>\n<td>No</td>\n<td>Boolean value for the custom field</td>\n</tr>\n<tr>\n<td><code>date_val</code></td>\n<td>string</td>\n<td>No</td>\n<td>Date value in ISO 8601 format (e.g., <code>2024-01-15</code>)</td>\n</tr>\n<tr>\n<td><code>string_val_list</code></td>\n<td>array of strings</td>\n<td>No</td>\n<td>List of string values for multi-select custom fields</td>\n</tr>\n</tbody>\n</table>\n</div><p><strong>Note</strong>: Provide only one value field per custom field object, matching the custom field's defined type.</p>\n<h2 id=\"example-request\">Example Request</h2>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"customer_id\": \"CUST-001\",\n    \"name\": \"Acme Corporation\",\n    \"street_address\": \"123 Main St\",\n    \"city\": \"San Francisco\",\n    \"state\": \"CA\",\n    \"country\": \"USA\",\n    \"zip_code\": \"94105\",\n    \"email\": \"contact@acme.com\",\n    \"is_active\": true,\n    \"representative_ids\": [\"rep_101\", \"rep_102\"],\n    \"custom_fields\": [\n        {\n            \"custom_field_id\": \"cf_industry\",\n            \"string_val\": \"Technology\"\n        },\n        {\n            \"custom_field_id\": \"cf_annual_revenue\",\n            \"float_val\": 5000000.00\n        }\n    ]\n}\n\n</code></pre>\n<p>This request will:</p>\n<ul>\n<li><p>Create a new customer with ID \"CUST-001\" named \"Acme Corporation\"</p>\n</li>\n<li><p>Set the address to 123 Main St, San Francisco, CA 94105, USA</p>\n</li>\n<li><p>Set the email to <a href=\"https://mailto:contact@acme.com\">contact@acme.com</a></p>\n</li>\n<li><p>Mark the customer as active</p>\n</li>\n<li><p>Assign sales representatives rep_101 and rep_102</p>\n</li>\n<li><p>Set two custom fields: industry as \"Technology\" and annual revenue as 5,000,000</p>\n</li>\n</ul>\n<h2 id=\"response-format\">Response Format</h2>\n<h3 id=\"success-response-200-ok\">Success Response (200 OK)</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"status_message\": \"success\",\n    \"data\": {\n        \"customer_id\": \"CUST-001\",\n        \"id\": \"a1b2c3d4-e5f6-7890-abcd-ef1234567890\",\n        \"created\": true\n    }\n}\n\n</code></pre>\n<h3 id=\"response-fields\">Response Fields</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Type</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>status_message</code></td>\n<td>string</td>\n<td>Overall status of the request</td>\n</tr>\n<tr>\n<td><code>data.customer_id</code></td>\n<td>string</td>\n<td>The business identifier of the created customer</td>\n</tr>\n<tr>\n<td><code>data.id</code></td>\n<td>string</td>\n<td>The internal stable UUID assigned to the customer</td>\n</tr>\n<tr>\n<td><code>data.created</code></td>\n<td>boolean</td>\n<td><code>true</code> if the customer was successfully created</td>\n</tr>\n</tbody>\n</table>\n</div><h2 id=\"error-responses\">Error Responses</h2>\n<h3 id=\"400-bad-request\">400 Bad Request</h3>\n<p>Returned when the request is malformed, missing required fields, or the <code>customer_id</code> already exists.</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"status_message\": \"error\",\n    \"error\": {\n        \"code\": \"INVALID_REQUEST\",\n        \"message\": \"Customer with customer_id 'CUST-001' already exists.\"\n    }\n}\n\n</code></pre>\n<h3 id=\"401-unauthorized\">401 Unauthorized</h3>\n<p>Returned when authentication fails or the API key is invalid or missing.</p>\n<h3 id=\"404-not-found\">404 Not Found</h3>\n<p>Returned when the specified company does not exist.</p>\n<h3 id=\"500-internal-server-error\">500 Internal Server Error</h3>\n<p>Returned when an unexpected error occurs on the server.</p>\n<h2 id=\"best-practices\">Best Practices</h2>\n<ol>\n<li><p><strong>Use meaningful customer IDs</strong>: Choose a <code>customer_id</code> format that is consistent and identifiable (e.g., <code>CUST-001</code>, <code>ACC-12345</code>)</p>\n</li>\n<li><p><strong>Check for duplicates</strong>: The <code>customer_id</code> must be unique within a company — the endpoint returns a 400 error if it already exists</p>\n</li>\n<li><p><strong>Set hierarchy fields together</strong>: When creating customers in an account hierarchy, set <code>bill_to_id</code>, <code>account_type</code>, and optionally <code>parent_customer_id</code> together for consistency</p>\n</li>\n<li><p><strong>Match custom field types</strong>: Use the correct value field (<code>string_val</code>, <code>float_val</code>, <code>bool_val</code>, <code>date_val</code>, or <code>string_val_list</code>) that matches the custom field definition</p>\n</li>\n<li><p><strong>Save the UUID</strong>: Store the returned <code>id</code> (UUID) for subsequent API calls — it can be used as the <code>identifier</code> in Get and Update endpoints</p>\n</li>\n</ol>\n<h2 id=\"notes\">Notes</h2>\n<ul>\n<li><p>The <code>customer_id</code> must be unique within the company — duplicate IDs will be rejected with a 400 error</p>\n</li>\n<li><p>The <code>is_active</code> field defaults to <code>true</code> if not provided</p>\n</li>\n<li><p>A <code>customer.created</code> webhook event is published after a successful creation</p>\n</li>\n<li><p>The returned <code>id</code> is a stable internal UUID that can be used interchangeably with <code>customer_id</code> in other endpoints</p>\n</li>\n<li><p>Custom fields must reference valid custom field definitions configured for the company</p>\n</li>\n<li><p>Date values in custom fields must use ISO 8601 format (e.g., <code>2024-01-15</code> or <code>2024-01-15T10:30:00Z</code>)</p>\n</li>\n</ul>\n","urlObject":{"path":["{{company}}","v1","customers"],"host":["{{domain}}"],"query":[],"variable":[]}},"response":[{"id":"9bc71b93-6215-4aff-ab5a-ea421fc3df27","name":"Create Customer V1","originalRequest":{"method":"POST","header":[{"key":"Content-Type","value":"application/json","type":"text"},{"key":"Accept","value":"application/json","type":"text"},{"key":"X-User-Id","value":"{{user_id}}","type":"text"},{"key":"X-Company","value":"{{company}}","type":"text"},{"key":"X-Api-Key","value":"{{api_key}}","type":"text"}],"body":{"mode":"raw","raw":"{\n    \"customer_id\": \"CUST-001\",\n    \"name\": \"Acme Corporation\",\n    \"street_address\": \"123 Main St\",\n    \"city\": \"San Francisco\",\n    \"state\": \"CA\",\n    \"country\": \"USA\",\n    \"zip_code\": \"94105\",\n    \"email\": \"contact@acme.com\",\n    \"is_active\": true,\n    \"representative_ids\": [\"rep_101\", \"rep_102\"],\n    \"custom_fields\": [\n        {\n            \"custom_field_id\": \"cf_industry\",\n            \"string_val\": \"Technology\"\n        },\n        {\n            \"custom_field_id\": \"cf_annual_revenue\",\n            \"float_val\": 5000000.00\n        }\n    ]\n}"},"url":"{{domain}}/{{company}}/v1/customers"},"_postman_previewlanguage":"","header":[],"cookie":[{"expires":"Invalid Date","domain":"","path":""}],"responseTime":null,"body":"{\n    \"status_message\": \"success\",\n    \"data\": {\n        \"customer_id\": \"CUST-001\",\n        \"id\": \"a1b2c3d4-e5f6-7890-abcd-ef1234567890\",\n        \"created\": true\n    }\n}"}],"_postman_id":"aa4d6ea6-5a5c-4dba-b9ae-7e605e33f753"},{"name":"Create Customers Bulk V1","id":"d197a4f7-c521-4747-9bee-fd49a942d554","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","value":"application/json","type":"text"},{"key":"Accept","value":"application/json","type":"text"},{"key":"X-User-Id","value":"{{user_id}}","type":"text"},{"key":"X-Company","value":"{{company}}","type":"text"},{"key":"X-Api-Key","value":"{{api_key}}","type":"text"}],"body":{"mode":"urlencoded","urlencoded":[]},"url":"{{domain}}/{{company}}/v1/customers/bulk","description":"<h1 id=\"bulk-create-customers-api-v1\">Bulk Create Customers API v1</h1>\n<h2 id=\"overview\">Overview</h2>\n<p>The Bulk Create Customers API v1 endpoint allows you to create multiple customer records in a single request within a specific company. The endpoint processes each item independently — valid items succeed even if others fail, providing per-item error reporting. Customers represent the accounts your sales team sells to, including their identifying information, address details, contact info, and classification data.</p>\n<h2 id=\"endpoint\">Endpoint</h2>\n<p><strong>Method</strong>: <code>POST</code>\n<strong>URL</strong>: <code>{{domain}}/{{company}}/v1/customers/bulk</code></p>\n<h2 id=\"path-parameters\">Path Parameters</h2>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Parameter</th>\n<th>Type</th>\n<th>Required</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>company</code></td>\n<td>string</td>\n<td>Yes</td>\n<td>The company (tenant) identifier</td>\n</tr>\n</tbody>\n</table>\n</div><h2 id=\"request-format\">Request Format</h2>\n<h3 id=\"request-body-structure\">Request Body Structure</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"items\": [\n        {\n            \"customer_id\": \"string\",\n            \"name\": \"string\",\n            \"street_address\": \"string\",\n            \"city\": \"string\",\n            \"state\": \"string\",\n            \"country\": \"string\",\n            \"zip_code\": \"string\",\n            \"email\": \"string\",\n            \"office_phone_number\": \"string\",\n            \"fax_number\": \"string\",\n            \"is_active\": boolean,\n            \"type\": \"string\",\n            \"branch\": \"string\",\n            \"location\": \"string\",\n            \"region\": \"string\",\n            \"source\": \"string\",\n            \"bill_to_id\": \"string\",\n            \"is_bill_to\": boolean,\n            \"parent_customer_id\": \"string\",\n            \"account_type\": \"string\",\n            \"representative_ids\": [\"string\"],\n            \"visibility_ids\": [\"string\"],\n            \"custom_fields\": [\n                {\n                    \"custom_field_id\": \"string\",\n                    \"string_val\": \"string\",\n                    \"float_val\": number,\n                    \"bool_val\": boolean,\n                    \"date_val\": \"string\",\n                    \"string_val_list\": [\"string\"]\n                }\n            ]\n        }\n    ]\n}\n\n</code></pre>\n<h3 id=\"request-parameters\">Request Parameters</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Parameter</th>\n<th>Type</th>\n<th>Required</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>items</code></td>\n<td>array</td>\n<td>Yes</td>\n<td>List of customer objects to create (minimum: 1, maximum: 1,000)</td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"customer-item-fields\">Customer Item Fields</h3>\n<h4 id=\"required-fields\">Required Fields</h4>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Type</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>customer_id</code></td>\n<td>string</td>\n<td>Unique business identifier for the customer (must be unique within the company and within the batch)</td>\n</tr>\n<tr>\n<td><code>name</code></td>\n<td>string</td>\n<td>Customer name</td>\n</tr>\n</tbody>\n</table>\n</div><h4 id=\"optional-fields\">Optional Fields</h4>\n<h5 id=\"address\">Address</h5>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Type</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>street_address</code></td>\n<td>string</td>\n<td>Street address of the customer</td>\n</tr>\n<tr>\n<td><code>city</code></td>\n<td>string</td>\n<td>City where the customer is located</td>\n</tr>\n<tr>\n<td><code>state</code></td>\n<td>string</td>\n<td>State/Province where the customer is located</td>\n</tr>\n<tr>\n<td><code>country</code></td>\n<td>string</td>\n<td>Country where the customer is located</td>\n</tr>\n<tr>\n<td><code>zip_code</code></td>\n<td>string</td>\n<td>ZIP/postal code of the customer</td>\n</tr>\n</tbody>\n</table>\n</div><h5 id=\"contact-information\">Contact Information</h5>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Type</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>email</code></td>\n<td>string</td>\n<td>Email address of the customer</td>\n</tr>\n<tr>\n<td><code>office_phone_number</code></td>\n<td>string</td>\n<td>Office phone number of the customer</td>\n</tr>\n<tr>\n<td><code>fax_number</code></td>\n<td>string</td>\n<td>Fax number of the customer</td>\n</tr>\n</tbody>\n</table>\n</div><h5 id=\"status--classification\">Status &amp; Classification</h5>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Type</th>\n<th>Default</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>is_active</code></td>\n<td>boolean</td>\n<td><code>true</code></td>\n<td>Whether the customer is active</td>\n</tr>\n<tr>\n<td><code>type</code></td>\n<td>string</td>\n<td>null</td>\n<td>Customer type classification</td>\n</tr>\n<tr>\n<td><code>branch</code></td>\n<td>string</td>\n<td>null</td>\n<td>Branch the customer belongs to</td>\n</tr>\n<tr>\n<td><code>location</code></td>\n<td>string</td>\n<td>null</td>\n<td>Location identifier</td>\n</tr>\n<tr>\n<td><code>region</code></td>\n<td>string</td>\n<td>null</td>\n<td>Region the customer belongs to</td>\n</tr>\n<tr>\n<td><code>source</code></td>\n<td>string</td>\n<td>null</td>\n<td>Data source identifier</td>\n</tr>\n</tbody>\n</table>\n</div><h5 id=\"account-hierarchy\">Account Hierarchy</h5>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Type</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>bill_to_id</code></td>\n<td>string</td>\n<td>Bill-to parent customer ID</td>\n</tr>\n<tr>\n<td><code>is_bill_to</code></td>\n<td>boolean</td>\n<td>Whether this customer is a bill-to account</td>\n</tr>\n<tr>\n<td><code>parent_customer_id</code></td>\n<td>string</td>\n<td>Parent customer UUID for multi-level hierarchy</td>\n</tr>\n<tr>\n<td><code>account_type</code></td>\n<td>string</td>\n<td>Hierarchy level: <code>national</code>, <code>bill_to</code>, or <code>ship_to</code></td>\n</tr>\n</tbody>\n</table>\n</div><h5 id=\"assignments--visibility\">Assignments &amp; Visibility</h5>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Type</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>representative_ids</code></td>\n<td>array of strings</td>\n<td>Sales representative IDs assigned to the customer</td>\n</tr>\n<tr>\n<td><code>visibility_ids</code></td>\n<td>array of strings</td>\n<td>Account group IDs that can view this customer</td>\n</tr>\n</tbody>\n</table>\n</div><h5 id=\"custom-fields\">Custom Fields</h5>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Type</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>custom_fields</code></td>\n<td>array</td>\n<td>List of custom field values (see Custom Fields section below)</td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"custom-fields-format\">Custom Fields Format</h3>\n<p>Each custom field object in the <code>custom_fields</code> array has the following structure:</p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Type</th>\n<th>Required</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>custom_field_id</code></td>\n<td>string</td>\n<td>Yes</td>\n<td>The unique identifier of the custom field definition</td>\n</tr>\n<tr>\n<td><code>string_val</code></td>\n<td>string</td>\n<td>No</td>\n<td>String value for the custom field</td>\n</tr>\n<tr>\n<td><code>float_val</code></td>\n<td>number</td>\n<td>No</td>\n<td>Numeric value for the custom field</td>\n</tr>\n<tr>\n<td><code>bool_val</code></td>\n<td>boolean</td>\n<td>No</td>\n<td>Boolean value for the custom field</td>\n</tr>\n<tr>\n<td><code>date_val</code></td>\n<td>string</td>\n<td>No</td>\n<td>Date value in ISO 8601 format (e.g., <code>2024-01-15</code>)</td>\n</tr>\n<tr>\n<td><code>string_val_list</code></td>\n<td>array of strings</td>\n<td>No</td>\n<td>List of string values for multi-select custom fields</td>\n</tr>\n</tbody>\n</table>\n</div><p><strong>Note</strong>: Provide only one value field per custom field object, matching the custom field's defined type.</p>\n<h2 id=\"example-request\">Example Request</h2>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"items\": [\n        {\n            \"customer_id\": \"CUST-001\",\n            \"name\": \"Acme Corporation\",\n            \"email\": \"contact@acme.com\",\n            \"is_active\": true,\n            \"custom_fields\": [\n                {\n                    \"custom_field_id\": \"cf_industry\",\n                    \"string_val\": \"Technology\"\n                },\n                {\n                    \"custom_field_id\": \"cf_annual_revenue\",\n                    \"float_val\": 5000000.00\n                },\n                {\n                    \"custom_field_id\": \"cf_is_enterprise\",\n                    \"bool_val\": true\n                }\n            ]\n        },\n        {\n            \"customer_id\": \"CUST-002\",\n            \"name\": \"Beta Inc\",\n            \"city\": \"New York\",\n            \"state\": \"NY\",\n            \"custom_fields\": [\n                {\n                    \"custom_field_id\": \"cf_industry\",\n                    \"string_val\": \"Manufacturing\"\n                }\n            ]\n        },\n        {\n            \"customer_id\": \"\",\n            \"name\": \"\"\n        }\n    ]\n}\n\n</code></pre>\n<p>This request will:</p>\n<ul>\n<li><p>Create \"Acme Corporation\" (CUST-001) with custom fields for industry, revenue, and enterprise status</p>\n</li>\n<li><p>Create \"Beta Inc\" (CUST-002) with city, state, and industry custom field</p>\n</li>\n<li><p>Fail on the third item because <code>customer_id</code> and <code>name</code> are empty</p>\n</li>\n</ul>\n<h2 id=\"response-format\">Response Format</h2>\n<h3 id=\"success-response-200-ok\">Success Response (200 OK)</h3>\n<p>The response always returns 200 OK, even if some items fail. Check the <code>summary</code> and individual <code>results</code> to determine the outcome of each item.</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"status_message\": \"success\",\n    \"data\": {\n        \"summary\": {\n            \"total\": 3,\n            \"successful\": 2,\n            \"failed\": 1,\n            \"created\": 2,\n            \"updated\": 0,\n            \"errors\": [\n                {\n                    \"index\": 2,\n                    \"id\": null,\n                    \"input\": {\n                        \"customer_id\": \"\",\n                        \"name\": \"\"\n                    },\n                    \"errors\": [\n                        {\n                            \"field\": \"customer_id\",\n                            \"code\": \"required\",\n                            \"message\": \"Customer ID is required\",\n                            \"value\": \"\"\n                        },\n                        {\n                            \"field\": \"name\",\n                            \"code\": \"required\",\n                            \"message\": \"Customer name is required\",\n                            \"value\": \"\"\n                        }\n                    ]\n                }\n            ]\n        },\n        \"results\": [\n            {\n                \"index\": 0,\n                \"id\": \"CUST-001\",\n                \"success\": true,\n                \"created\": true\n            },\n            {\n                \"index\": 1,\n                \"id\": \"CUST-002\",\n                \"success\": true,\n                \"created\": true\n            },\n            {\n                \"index\": 2,\n                \"id\": null,\n                \"success\": false,\n                \"errors\": [\n                    {\n                        \"field\": \"customer_id\",\n                        \"code\": \"required\",\n                        \"message\": \"Customer ID is required\",\n                        \"value\": \"\"\n                    },\n                    {\n                        \"field\": \"name\",\n                        \"code\": \"required\",\n                        \"message\": \"Customer name is required\",\n                        \"value\": \"\"\n                    }\n                ]\n            }\n        ]\n    }\n}\n\n</code></pre>\n<h3 id=\"summary-fields\">Summary Fields</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Type</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>summary.total</code></td>\n<td>integer</td>\n<td>Total number of items in the request</td>\n</tr>\n<tr>\n<td><code>summary.successful</code></td>\n<td>integer</td>\n<td>Number of items processed successfully</td>\n</tr>\n<tr>\n<td><code>summary.failed</code></td>\n<td>integer</td>\n<td>Number of items that failed</td>\n</tr>\n<tr>\n<td><code>summary.created</code></td>\n<td>integer</td>\n<td>Number of new records created</td>\n</tr>\n<tr>\n<td><code>summary.updated</code></td>\n<td>integer</td>\n<td>Number of existing records updated (always 0 for this endpoint)</td>\n</tr>\n<tr>\n<td><code>summary.errors</code></td>\n<td>array</td>\n<td>Detailed error information for each failed item (null if no errors)</td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"result-item-fields\">Result Item Fields</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Type</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>index</code></td>\n<td>integer</td>\n<td>Position of the item in the request array (0-based)</td>\n</tr>\n<tr>\n<td><code>id</code></td>\n<td>string</td>\n<td>The <code>customer_id</code> of the record (null if validation failed before ID extraction)</td>\n</tr>\n<tr>\n<td><code>success</code></td>\n<td>boolean</td>\n<td>Whether this item was processed successfully</td>\n</tr>\n<tr>\n<td><code>created</code></td>\n<td>boolean</td>\n<td><code>true</code> if a new record was created (null on failure)</td>\n</tr>\n<tr>\n<td><code>errors</code></td>\n<td>array</td>\n<td>List of validation errors for this item (null on success)</td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"error-item-fields\">Error Item Fields</h3>\n<p>Each error in the <code>summary.errors</code> array contains:</p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Type</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>index</code></td>\n<td>integer</td>\n<td>Position of the failed item in the request array (0-based)</td>\n</tr>\n<tr>\n<td><code>id</code></td>\n<td>string</td>\n<td>The <code>customer_id</code> if available (null otherwise)</td>\n</tr>\n<tr>\n<td><code>input</code></td>\n<td>object</td>\n<td>The original input data that was submitted</td>\n</tr>\n<tr>\n<td><code>errors</code></td>\n<td>array</td>\n<td>List of field-level errors</td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"field-error-structure\">Field Error Structure</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Type</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>field</code></td>\n<td>string</td>\n<td>The field name that failed validation</td>\n</tr>\n<tr>\n<td><code>code</code></td>\n<td>string</td>\n<td>Error code (e.g., <code>required</code>, <code>duplicate</code>, <code>internal_error</code>)</td>\n</tr>\n<tr>\n<td><code>message</code></td>\n<td>string</td>\n<td>Human-readable error description</td>\n</tr>\n<tr>\n<td><code>value</code></td>\n<td>string</td>\n<td>The invalid value that was provided (null if not applicable)</td>\n</tr>\n</tbody>\n</table>\n</div><h2 id=\"error-codes\">Error Codes</h2>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Code</th>\n<th>Field</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>required</code></td>\n<td><code>customer_id</code>, <code>name</code></td>\n<td>A required field is missing or empty</td>\n</tr>\n<tr>\n<td><code>duplicate</code></td>\n<td><code>customer_id</code></td>\n<td>The <code>customer_id</code> already exists in the database or appears more than once in the same batch</td>\n</tr>\n<tr>\n<td><code>internal_error</code></td>\n<td><code>_general</code></td>\n<td>An unexpected error occurred while processing the item</td>\n</tr>\n</tbody>\n</table>\n</div><h2 id=\"error-responses\">Error Responses</h2>\n<h3 id=\"400-bad-request\">400 Bad Request</h3>\n<p>Returned when the request structure itself is invalid (e.g., missing <code>items</code> array).</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"status_message\": \"error\",\n    \"error\": {\n        \"code\": \"INVALID_REQUEST\",\n        \"message\": \"Invalid request data\"\n    }\n}\n\n</code></pre>\n<h3 id=\"401-unauthorized\">401 Unauthorized</h3>\n<p>Returned when authentication fails or the API key is invalid or missing.</p>\n<h3 id=\"413-payload-too-large\">413 Payload Too Large</h3>\n<p>Returned when the <code>items</code> array exceeds the maximum of 1,000 items.</p>\n<h3 id=\"500-internal-server-error\">500 Internal Server Error</h3>\n<p>Returned when an unexpected error occurs on the server.</p>\n<h2 id=\"processing-behavior\">Processing Behavior</h2>\n<p>The endpoint processes items in three phases:</p>\n<ol>\n<li><p><strong>Validation</strong>: Each item is checked for required fields (<code>customer_id</code>, <code>name</code>) and in-batch duplicate <code>customer_id</code> values</p>\n</li>\n<li><p><strong>Duplicate Check</strong>: A single batch query checks which <code>customer_id</code> values already exist in the database</p>\n</li>\n<li><p><strong>Creation</strong>: Valid, non-duplicate items are created individually with webhook events published for each</p>\n</li>\n</ol>\n<p><strong>Key behaviors:</strong></p>\n<ul>\n<li><p><strong>Partial success</strong>: Valid items are created even if other items in the batch fail</p>\n</li>\n<li><p><strong>Non-atomic</strong>: There is no rollback — successfully created items remain even if later items fail</p>\n</li>\n<li><p><strong>Order preserved</strong>: Results are returned in the same order as the input items</p>\n</li>\n<li><p><strong>Independent errors</strong>: Each item has its own error tracking, allowing you to identify and retry only failed items</p>\n</li>\n</ul>\n<h2 id=\"best-practices\">Best Practices</h2>\n<ol>\n<li><p><strong>Stay within limits</strong>: Send a maximum of 1,000 items per request</p>\n</li>\n<li><p><strong>Ensure unique IDs</strong>: Verify that all <code>customer_id</code> values are unique both within the batch and against existing records</p>\n</li>\n<li><p><strong>Handle partial failures</strong>: Always check both <code>summary.failed</code> and individual <code>results</code> to identify which items need to be retried</p>\n</li>\n<li><p><strong>Retry only failed items</strong>: Use the <code>index</code> and <code>id</code> fields in error responses to identify and resubmit only the items that failed</p>\n</li>\n<li><p><strong>Match custom field types</strong>: Use the correct value field (<code>string_val</code>, <code>float_val</code>, <code>bool_val</code>, <code>date_val</code>, or <code>string_val_list</code>) that matches each custom field's definition</p>\n</li>\n<li><p><strong>Batch appropriately</strong>: For very large imports, split into multiple requests of up to 1,000 items each</p>\n</li>\n</ol>\n<h2 id=\"notes\">Notes</h2>\n<ul>\n<li><p>The <code>is_active</code> field defaults to <code>true</code> if not provided</p>\n</li>\n<li><p>A <code>customer.created</code> webhook event is published for each successfully created customer</p>\n</li>\n<li><p>In-batch duplicates are handled by accepting the first occurrence and rejecting subsequent ones with a <code>duplicate</code> error code</p>\n</li>\n<li><p>The response always returns HTTP 200, even for partial failures — check the <code>summary</code> for the actual outcome</p>\n</li>\n<li><p>Custom fields must reference valid custom field definitions configured for the company</p>\n</li>\n<li><p>Date values in custom fields must use ISO 8601 format (e.g., <code>2024-01-15</code> or <code>2024-01-15T10:30:00Z</code>)</p>\n</li>\n</ul>\n","urlObject":{"path":["{{company}}","v1","customers","bulk"],"host":["{{domain}}"],"query":[],"variable":[]}},"response":[{"id":"885562ea-4ba0-43d4-8133-d621e6969631","name":"Create Customers Bulk V1","originalRequest":{"method":"POST","header":[{"key":"Content-Type","value":"application/json","type":"text"},{"key":"Accept","value":"application/json","type":"text"},{"key":"X-User-Id","value":"{{user_id}}","type":"text"},{"key":"X-Company","value":"{{company}}","type":"text"},{"key":"X-Api-Key","value":"{{api_key}}","type":"text"}],"body":{"mode":"raw","raw":"{\n    \"items\": [\n        {\n            \"customer_id\": \"CUST-001\",\n            \"name\": \"Acme Corporation\",\n            \"email\": \"contact@acme.com\",\n            \"is_active\": true,\n            \"custom_fields\": [\n                {\n                    \"custom_field_id\": \"cf_industry\",\n                    \"string_val\": \"Technology\"\n                },\n                {\n                    \"custom_field_id\": \"cf_annual_revenue\",\n                    \"float_val\": 5000000.00\n                },\n                {\n                    \"custom_field_id\": \"cf_is_enterprise\",\n                    \"bool_val\": true\n                }\n            ]\n        },\n        {\n            \"customer_id\": \"CUST-002\",\n            \"name\": \"Beta Inc\",\n            \"city\": \"New York\",\n            \"state\": \"NY\",\n            \"custom_fields\": [\n                {\n                    \"custom_field_id\": \"cf_industry\",\n                    \"string_val\": \"Manufacturing\"\n                }\n            ]\n        },\n        {\n            \"customer_id\": \"\",\n            \"name\": \"\"\n        }\n    ]\n}"},"url":"{{domain}}/{{company}}/v1/customers/bulk"},"_postman_previewlanguage":"","header":[],"cookie":[{"expires":"Invalid Date","domain":"","path":""}],"responseTime":null,"body":"{\n    \"status_message\": \"success\",\n    \"data\": {\n        \"summary\": {\n            \"total\": 3,\n            \"successful\": 2,\n            \"failed\": 1,\n            \"created\": 2,\n            \"updated\": 0,\n            \"errors\": [\n                {\n                    \"index\": 2,\n                    \"id\": null,\n                    \"input\": {\n                        \"customer_id\": \"\",\n                        \"name\": \"\"\n                    },\n                    \"errors\": [\n                        {\n                            \"field\": \"customer_id\",\n                            \"code\": \"required\",\n                            \"message\": \"Customer ID is required\",\n                            \"value\": \"\"\n                        },\n                        {\n                            \"field\": \"name\",\n                            \"code\": \"required\",\n                            \"message\": \"Customer name is required\",\n                            \"value\": \"\"\n                        }\n                    ]\n                }\n            ]\n        },\n        \"results\": [\n            {\n                \"index\": 0,\n                \"id\": \"CUST-001\",\n                \"success\": true,\n                \"created\": true\n            },\n            {\n                \"index\": 1,\n                \"id\": \"CUST-002\",\n                \"success\": true,\n                \"created\": true\n            },\n            {\n                \"index\": 2,\n                \"id\": null,\n                \"success\": false,\n                \"errors\": [\n                    {\n                        \"field\": \"customer_id\",\n                        \"code\": \"required\",\n                        \"message\": \"Customer ID is required\",\n                        \"value\": \"\"\n                    },\n                    {\n                        \"field\": \"name\",\n                        \"code\": \"required\",\n                        \"message\": \"Customer name is required\",\n                        \"value\": \"\"\n                    }\n                ]\n            }\n        ]\n    }\n}"}],"_postman_id":"d197a4f7-c521-4747-9bee-fd49a942d554"}],"id":"c5bbeca6-3e1c-435d-a67b-10c8bfa15585","description":"<h2 id=\"description\">Description</h2>\n<p>Manage customer records within your Proton account. Customers represent the accounts your sales team sells to — each with identifying information, address details, contact info, sales representative assignments, account hierarchy, and custom fields.</p>\n<p>Use these endpoints to create, retrieve, update, and search customers programmatically.</p>\n","_postman_id":"c5bbeca6-3e1c-435d-a67b-10c8bfa15585"},{"name":"Quotes","item":[{"name":"Get Quote v2","id":"bc011dd7-ebe1-4150-8ae0-e1dd53f32d3b","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"Content-Type","value":"application/json","type":"text"},{"key":"Accept","value":"application/json","type":"text"},{"key":"X-User-Id","value":"{{user_id}}","type":"text"},{"key":"X-Company","value":"{{company}}","type":"text"},{"key":"X-Api-Key","value":"{{api_key}}","type":"text"}],"url":"{{domain}}/{{company}}/quotes/{quote_id}","urlObject":{"path":["{{company}}","quotes","{quote_id}"],"host":["{{domain}}"],"query":[],"variable":[]}},"response":[{"id":"7c23d19f-ee08-450d-8fb7-17d96f5aa2c4","name":"Get Quote","originalRequest":{"method":"GET","header":[{"key":"Content-Type","value":"application/json"},{"key":"Accept","value":"application/json"},{"key":"X-User-Id","value":"{{user_id}}"},{"key":"X-Company","value":"{{company}}"},{"key":"X-Api-Key","value":"{{api_key}}"}],"url":"{{domain}}/{{company}}/v2/quotes/{quote_id}"},"status":"OK","code":200,"_postman_previewlanguage":null,"header":null,"cookie":[],"responseTime":null,"body":"{\r\n    \"status_message\": \"SUCCESS\",\r\n    \"data\": {\r\n        \"quote_id\": \"S100519712.001\",\r\n        \"bill_to_id\": \"55\",\r\n        \"customer_id\": \"550\",\r\n        \"expiration_date\": null,\r\n        \"last_ingested_date\": \"2024-11-06T15:56:52.944951\",\r\n        \"last_contact_date\": null,\r\n        \"associations\": [],\r\n        \"contact_id\": null,\r\n        \"contact_name\": null,\r\n        \"contact_email\": null,\r\n        \"status_last_modified\": \"2024-07-13T10:20:28.465750+00:00\",\r\n        \"status_erp\": null,\r\n        \"status_rep\": null,\r\n        \"status\": \"open\",\r\n        \"n_days_from_quote_to_order\": 0.0,\r\n        \"total_value\": 6345.582699,\r\n        \"remaining_value\": 6345.582699,\r\n        \"realized_value\": 0.0,\r\n        \"num_quote_lines\": 1.0,\r\n        \"num_purchased_quote_lines\": 0.0,\r\n        \"source\": \"erp\",\r\n        \"total_value_initial\": 6345.582699,\r\n        \"total_value_last_modified\": \"2024-08-10T10:14:23.290107+00:00\",\r\n        \"manufacturer\": \"\",\r\n        \"quantity_total\": 48,\r\n        \"custom_fields\": [\r\n            {\r\n                \"custom_field_id\": \"custom_quote_branch_header\",\r\n                \"value\": \"WEST\"\r\n            },\r\n            {\r\n                \"custom_field_id\": \"custom_quote_ordered_by_header\",\r\n                \"value\": \"Mark Johnson\"\r\n            },\r\n            {\r\n                \"custom_field_id\": \"custom_quote_writer_header\",\r\n                \"value\": \"SMITHJ\"\r\n            },\r\n            {\r\n                \"custom_field_id\": \"custom_quote_margin_perc_header\",\r\n                \"value\": \"31.43%\"\r\n            },\r\n            {\r\n                \"custom_field_id\": \"custom_quote_shipping_notes_header\",\r\n                \"value\": \"ALLOW 4-6 WEEKS DELIVER JUST TO BE SAFE.\"\r\n            }\r\n        ],\r\n        \"created_date\": \"2024-10-16T16:00:00+00:00\",\r\n        \"customer_name\": \"Western Construction Ltd\",\r\n        \"customer_is_active\": true,\r\n        \"customer_info\": {\r\n            \"customer_id\": \"550\",\r\n            \"bill_to_id\": \"55\",\r\n            \"is_bill_to\": false,\r\n            \"name\": \"Western Construction Ltd\",\r\n            \"street_address\": \"PO BOX 123\",\r\n            \"city\": \"Springfield\",\r\n            \"state\": \"SK\",\r\n            \"zip_code\": \"S0G 5C0\",\r\n            \"visibility_ids\": [\r\n                \"WEST\",\r\n                \"SMITHJ\"\r\n            ],\r\n            \"internal_user_id\": [\r\n                \"SMITHJ\"\r\n            ],\r\n            \"representative_ids\": [\r\n                \"john.smith@company.com\"\r\n            ],\r\n            \"blacklist_customer_groups\": [\r\n                \"_global_blacklist\"\r\n            ],\r\n            \"customers_search_string\": \"550 Western Construction Ltd Springfield Saskatchewan SK S0G 5C0\",\r\n            \"customers_search_string_secondary\": \"PO BOX 123\",\r\n            \"proton_score\": 0.0,\r\n            \"proton_score_explanation\": \"Last contact days: 5, Last order days: 1, date_score = 0.000452622223240535 Scaler = 0.11574535450000001\",\r\n            \"churn_status\": \"active\",\r\n            \"churn_probability\": 0.0,\r\n            \"churn_explanation\": \"Customer has recently been ordering every 10.0 days on average, and it has been 0.0 days since their last order. This is why they are classified as active.\",\r\n            \"product_lines_purchased\": 8,\r\n            \"product_lines_purchased_percent\": 15.384615384615385,\r\n            \"product_initiatives_count\": 0,\r\n            \"product_initiative_keys\": [],\r\n            \"opportunities_count\": 1,\r\n            \"quote_sales_plays_count\": 3,\r\n            \"viewed_online_sales_plays_count\": 0,\r\n            \"return_rate\": 0.1506849315068493,\r\n            \"first_purchased\": false,\r\n            \"is_active\": true,\r\n            \"orders_per_week\": 1.4038461538461537,\r\n            \"unreturned_orders_count\": 176,\r\n            \"returned_orders_count\": 11,\r\n            \"total_spending\": 317452.68405246735,\r\n            \"average_order_value\": 1493.4508324094015,\r\n            \"total_last_year_orders\": 73,\r\n            \"YOY\": 30.02556708544346,\r\n            \"YOY_Y2D\": 83.23567052629771,\r\n            \"YOY_dollars\": 25175.39256978035,\r\n            \"YOY_Y2D_dollars\": 46745.735021829605,\r\n            \"last_year_spending\": 109021.9107658863,\r\n            \"previous_year_spending\": 83846.51819610596,\r\n            \"last_year_m2d_spending\": 0,\r\n            \"m2d_spending\": 9799.54428100586,\r\n            \"y2d_spending\": 102906.43478703499,\r\n            \"last_y2d_spending\": 56160.69976520538,\r\n            \"gross_margin_last_year\": 24307.592491924763,\r\n            \"last_purchase_date\": \"2024-10-15T16:00:00+00:00\",\r\n            \"last_contact_date\": \"2024-10-16T16:20:50.122744\",\r\n            \"last_ingested_date\": \"2024-10-16T11:11:24.970605\",\r\n            \"date_precomputed_first\": \"2024-10-16T11:08:55.139774\",\r\n            \"date_precomputed\": \"2024-10-16T11:08:55.250962\",\r\n            \"custom_fields\": [\r\n                {\r\n                    \"string_val\": \"WEST\",\r\n                    \"custom_field_id\": \"custom_branch_id\"\r\n                },\r\n                {\r\n                    \"string_val\": \"DEALER\",\r\n                    \"custom_field_id\": \"custom_customer_type\"\r\n                },\r\n                {\r\n                    \"float_val\": 144999.67,\r\n                    \"custom_field_id\": \"custom_annual_target\"\r\n                },\r\n                {\r\n                    \"string_val\": \"WESTA\",\r\n                    \"custom_field_id\": \"custom_price_class\"\r\n                },\r\n                {\r\n                    \"string_val\": \"NET 30 2%\",\r\n                    \"custom_field_id\": \"custom_terms\"\r\n                },\r\n                {\r\n                    \"float_val\": 41707.86,\r\n                    \"custom_field_id\": \"custom_account_balance\"\r\n                },\r\n                {\r\n                    \"float_val\": 26000,\r\n                    \"custom_field_id\": \"custom_credit_limit\"\r\n                },\r\n                {\r\n                    \"float_val\": 1,\r\n                    \"custom_field_id\": \"custom_days_since_last_order\"\r\n                }\r\n            ],\r\n            \"bill_to\": {\r\n                \"customer_id\": \"55\",\r\n                \"bill_to_id\": \"55\",\r\n                \"is_bill_to\": true,\r\n                \"name\": \"Western Construction Group\",\r\n                \"street_address\": \"100 Corporate Drive\",\r\n                \"city\": \"Regina\",\r\n                \"state\": \"SK\",\r\n                \"zip_code\": \"S4P 3Y2\",\r\n                \"visibility_ids\": [\"WEST\"],\r\n                \"internal_user_id\": [\"SMITHJ\"],\r\n                \"representative_ids\": [\"john.smith@company.com\"],\r\n                \"blacklist_customer_groups\": [\"_global_blacklist\"],\r\n                \"customers_search_string\": \"55 Western Construction Group Regina Saskatchewan SK S4P 3Y2\",\r\n                \"customers_search_string_secondary\": \"100 Corporate Drive\",\r\n                \"proton_score\": 0.0,\r\n                \"proton_score_explanation\": \"Last contact days: 2, Last order days: 1, date_score = 0.000452622223240535 Scaler = 0.15\",\r\n                \"churn_status\": \"active\",\r\n                \"churn_probability\": 0.0,\r\n                \"churn_explanation\": \"Customer has never made an order and is thus classified as prospect.\",\r\n                \"product_lines_purchased\": 12,\r\n                \"product_lines_purchased_percent\": 0.25,\r\n                \"product_initiatives_count\": 0,\r\n                \"product_initiative_keys\": [],\r\n                \"opportunities_count\": 2,\r\n                \"quote_sales_plays_count\": 5,\r\n                \"viewed_online_sales_plays_count\": 1,\r\n                \"return_rate\": 0.0,\r\n                \"first_purchased\": false,\r\n                \"is_active\": true,\r\n                \"orders_per_week\": 4.5,\r\n                \"n_shiptos\": 8,\r\n                \"unreturned_orders_count\": 425,\r\n                \"total_spending\": 450000.00,\r\n                \"average_order_value\": 1850.25,\r\n                \"total_last_year_orders\": 245,\r\n                \"YOY\": 125.5,\r\n                \"YOY_Y2D\": 145.2,\r\n                \"YOY_dollars\": 55000.00,\r\n                \"YOY_Y2D_dollars\": 65000.00,\r\n                \"last_year_spending\": 225000.00,\r\n                \"previous_year_spending\": 170000.00,\r\n                \"last_year_m2d_spending\": 3500.00,\r\n                \"m2d_spending\": 4500.00,\r\n                \"y2d_spending\": 185000.00,\r\n                \"last_y2d_spending\": 120000.00,\r\n                \"gross_margin_last_year\": 35000.00,\r\n                \"last_purchase_date\": \"2024-10-15T16:00:00+00:00\",\r\n                \"last_contact_date\": \"2024-10-14T14:30:00.000000+00:00\",\r\n                \"last_ingested_date\": \"2024-10-16T10:00:00.000000+00:00\",\r\n                \"date_precomputed_first\": \"2024-10-16T09:00:00.000000+00:00\",\r\n                \"date_precomputed\": \"2024-10-16T09:30:00.000000+00:00\"\r\n            }\r\n        },\r\n        \"quote_lines\": [\r\n            {\r\n                \"interaction_id\": \"S100519712_150_1-quote\",\r\n                \"order_id\": \"S100519712.001\",\r\n                \"quantity\": 16,\r\n                \"net_price\": 2955.949365,\r\n                \"margin\": 954.349365,\r\n                \"quote_status\": \"open\",\r\n                \"product\": {\r\n                    \"product_id\": \"199738\",\r\n                    \"name\": \"Double-Bowl Sink Premium Series, Rectangle Shape\",\r\n                    \"product_super_category\": \"PLB\",\r\n                    \"product_category\": \"PREMIUM\",\r\n                    \"manufacturer\": \"ALPHA\",\r\n                    \"available\": true,\r\n                    \"available_qty\": 3,\r\n                    \"date_ingested\": \"2024-10-16 09:00:43.521000+00:00\",\r\n                    \"blacklist_group\": null,\r\n                    \"is_deleted\": false,\r\n                    \"last_ingested_date\": \"2024-10-16T10:15:51.791295\",\r\n                    \"is_online_product\": true,\r\n                    \"image_url\": \"https://res.cloudinary.com/company/f_auto,w_200/Images/199738_sink.jpg\",\r\n                    \"description\": \"Double-Bowl Sink, Rectangle Shape, 16 in Bowl Length, 14 in Bowl Width, 8 in Bowl Depth, 3 Faucet Holes, 2 Bowls, 31-1/4 in x 20-1/2 in Overall, Stainless Steel\",\r\n                    \"specifications\": \"Bowl Depth: 8 in; Bowl Length: 16 in; Bowl Width: 14 in; Material: Stainless Steel; Number of Bowls: 2\",\r\n                    \"url\": \"https://company.com/Product/sink-199738\",\r\n                    \"literature\": [\r\n                        {\r\n                            \"name\": \"Specification Sheet\",\r\n                            \"url\": \"https://res.cloudinary.com/company/Documents/199738_spec_sheet.pdf\"\r\n                        }\r\n                    ],\r\n                    \"ecommerce_product_id\": \"355558192\",\r\n                    \"other_data\": {\r\n                        \"custom_product_is_deactivated\": false\r\n                    },\r\n                    \"price\": null\r\n                },\r\n                \"custom_fields\": [\r\n                    {\r\n                        \"custom_field_id\": \"custom_quote_branch\",\r\n                        \"value\": \"WEST\"\r\n                    },\r\n                    {\r\n                        \"custom_field_id\": \"custom_quote_ordered_by\",\r\n                        \"value\": \"Mark Johnson\"\r\n                    },\r\n                    {\r\n                        \"custom_field_id\": \"custom_quote_writer\",\r\n                        \"value\": \"SMITHJ\"\r\n                    },\r\n                    {\r\n                        \"custom_field_id\": \"custom_quote_margin_perc\",\r\n                        \"value\": \"32.29%\"\r\n                    }\r\n                ]\r\n            }\r\n        ]\r\n    }\r\n}"}],"_postman_id":"bc011dd7-ebe1-4150-8ae0-e1dd53f32d3b"},{"name":"Get Quote Header","id":"4fe96cd1-6c66-4a7f-9425-49cdfba7fc1d","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"Content-Type","value":"application/json","type":"text"},{"key":"Accept","value":"application/json","type":"text"},{"key":"X-User-Id","value":"{{user_id}}","type":"text"},{"key":"X-Company","value":"{{company}}","type":"text"},{"key":"X-Api-Key","value":"{{api_key}}","type":"text"}],"url":"{{domain}}/{{company}}/quote_headers/{quote_id}","description":"<p>This endpoint allows clients to fetch detailed quote header information for specified quote IDs within a company. The response includes quote details, associated products, contacts, customer information, and calculated values such as realized and unrealized values.</p>\n","urlObject":{"path":["{{company}}","quote_headers","{quote_id}"],"host":["{{domain}}"],"query":[],"variable":[]}},"response":[{"id":"4aed3535-8dee-4fe9-9eb1-87b9cf3122a4","name":"Get Quote Header","originalRequest":{"method":"GET","header":[{"key":"Content-Type","value":"application/json","type":"text"},{"key":"Accept","value":"application/json","type":"text"},{"key":"X-User-Id","value":"{{user_id}}","type":"text"},{"key":"X-Company","value":"{{company}}","type":"text"},{"key":"X-Api-Key","value":"{{api_key}}","type":"text"}],"url":"{{domain}}/{{company}}/quote_headers/4282129"},"status":"OK","code":200,"_postman_previewlanguage":null,"header":null,"cookie":[],"responseTime":null,"body":"{\n    \"status_message\": \"SUCCESS\",\n    \"data\": {\n        \"quote_id\": \"4282129\",\n        \"bill_to_id\": \"61300\",\n        \"customer_id\": \"61300-1\",\n        \"expiration_date\": null,\n        \"last_ingested_date\": \"2024-09-13T06:18:54.244812+00:00\",\n        \"last_contact_date\": null,\n        \"associations\": {},\n        \"contact_id\": null,\n        \"contact_name\": \"RYAN\",\n        \"contact_email\": null,\n        \"status_last_modified\": \"2024-09-13T06:33:19.475795+00:00\",\n        \"status_erp\": null,\n        \"status_rep\": null,\n        \"status\": \"open\",\n        \"n_days_from_quote_to_order\": 0.0,\n        \"total_value\": 11176.9,\n        \"remaining_value\": 11176.9,\n        \"realized_value\": 0.0,\n        \"num_quote_lines\": 11.0,\n        \"num_purchased_quote_lines\": 0.0,\n        \"source\": \"erp\",\n        \"total_value_initial\": 11176.9,\n        \"total_value_last_modified\": \"2024-09-13T06:18:54.244812+00:00\",\n        \"manufacturer\": \"JAM SYSTEMS\",\n        \"quantity_total\": 146,\n        \"custom_fields\": [],\n        \"created_date\": \"2024-09-12T16:00:00+00:00\",\n        \"customer_name\": \"Lloyd Lumber Co\",\n        \"customer_is_active\": true\n    }\n}"}],"_postman_id":"4fe96cd1-6c66-4a7f-9425-49cdfba7fc1d"},{"name":"Search Quotes","id":"9952f5e0-79b1-4f02-adf1-1a2a1d65156d","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"X-User-Id","value":"{{user_id}}","type":"text"},{"key":"X-Company","value":"{{company}}","type":"text"},{"key":"X-Api-Key","value":"{{api_key}}","type":"text"}],"body":{"mode":"raw","raw":"{\n    \"customer_id\":{\"eq\":[\"cust_123\"]},\n    \"sort_order\": \"desc\",\n    \"count\": 100,\n    \"offset\": 0,\n    \"all_accounts\": false,\n    \"requesting_user_id\": \"protontestaccount@test.com\",\n    \"sort_field\": \"created_date\",\n    \"total_value\": {\n        \"gte\": 50000.00,\n        \"lt\": 100000.00\n    },\n    \"created_date\": {\n        \"gte\": \"2023-01-01T00:00:00Z\", // Include quotes created on or after January 1, 2023\n        \"lt\": \"2023-12-31T23:59:59Z\"   // And before December 31, 2023, 23:59:59\n    },\n    \"num_quote_lines\": {\n        \"gte\": 3.00,\n        \"lt\": 20000.00\n    },\n    \"status\": {\n        \"includes\": [\"partial\", \"open\"]\n    },\n    \"quote_id\": {\n        \"contains\": \"80\"\n    },\n    \"customer_is_active\": {\n        \"eq\": true\n    },\n    \"customer_name\": {\n        \"not_contains\": \"AAAAA\"\n    }\n}","options":{"raw":{"language":"json"}}},"url":"{{domain}}/{{company}}/quote_headers/search","urlObject":{"path":["{{company}}","quote_headers","search"],"host":["{{domain}}"],"query":[],"variable":[]}},"response":[{"id":"1d6f0c2f-2500-47e9-aa24-eb16d5c41d6b","name":"Search Quotes","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"customer_id\":{\"eq\":[\"cust_123\"]},\n    \"sort_order\": \"desc\",\n    \"count\": 100,\n    \"offset\": 0,\n    \"requesting_user_id\": \"protontestaccount@test.com\",\n    \"sort_field\": \"created_date\",\n    \"total_value\": {\n        \"gte\": 50000.00,\n        \"lt\": 100000.00\n    },\n    \"created_date\": {\n        \"gte\": \"2023-01-01T00:00:00Z\", // Include quotes created on or after January 1, 2023\n        \"lt\": \"2023-12-31T23:59:59Z\"   // And before December 31, 2023, 23:59:59\n    },\n    \"num_quote_lines\": {\n        \"gte\": 3.00,\n        \"lt\": 20000.00\n    },\n    \"status\": {\n        \"includes\": [\"partial\", \"open\"]\n    },\n    \"quote_id\": {\n        \"contains\": \"80\"\n    },\n    \"customer_is_active\": {\n        \"eq\": true\n    },\n    \"customer_name\": {\n        \"not_contains\": \"AAAAA\"\n    }\n}","options":{"raw":{"language":"json"}}},"url":"{{domain}}/{{company}}/quote_headers/search"},"_postman_previewlanguage":null,"header":null,"cookie":[],"responseTime":null,"body":"{\n    \"status_message\": \"SUCCESS\",\n    \"data\": {\n        \"quote_headers\": [\n            {\n                \"quote_id\": \"cust_123\",\n                \"created_date\": \"2020-10-22T16:00:00+00:00\",\n                \"customer_id\": \"46759-0\",\n                \"customer_name\": \"ExampleCustomer\",\n                \"customer_is_active\": true,\n                \"total_value\": 7.43,\n                \"last_contact_date\": null,\n                \"status\": \"open\",\n                \"num_quote_lines\": 1\n            }\n        ],\n        \"total_count\": 2445\n    }\n}"}],"_postman_id":"9952f5e0-79b1-4f02-adf1-1a2a1d65156d"},{"name":"Edit Quote","id":"fcd65ba1-030d-49d7-a2de-c4e3480ba234","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"PATCH","header":[],"body":{"mode":"raw","raw":"{\n    \"customer_id\": \"cust-0\",\n    \"contact_id\": \"cont-0\",\n    \"notes\": \"test_notes\",\n    \"quote_lines\": [\n        {\n            \"interaction_id\": \"123-00-001-quote\",\n            \"product_id\": \"METCAL 123\",\n            \"quantity\": 3,\n            \"net_price\": 196.6,\n            \"list_price\": 196.6,\n            \"margin\": 25.11,\n            \"quote_status\": \"open\"\n        }\n    ]\n}","options":{"raw":{"language":"json"}}},"url":"{{domain}}/{{company}}/quotes/{{quote_id}}","urlObject":{"path":["{{company}}","quotes","{{quote_id}}"],"host":["{{domain}}"],"query":[],"variable":[]}},"response":[{"id":"b7fe8765-4479-4b99-ad22-5f81729eee3d","name":"Search Quotes","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"customer_id\":{\"eq\":[\"cust_123\"]},\n    \"sort_order\": \"desc\",\n    \"count\": 100,\n    \"offset\": 0,\n    \"requesting_user_id\": \"protontestaccount@test.com\",\n    \"sort_field\": \"created_date\",\n    \"total_value\": {\n        \"gte\": 50000.00,\n        \"lt\": 100000.00\n    },\n    \"created_date\": {\n        \"gte\": \"2023-01-01T00:00:00Z\", // Include quotes created on or after January 1, 2023\n        \"lt\": \"2023-12-31T23:59:59Z\"   // And before December 31, 2023, 23:59:59\n    },\n    \"num_quote_lines\": {\n        \"gte\": 3.00,\n        \"lt\": 20000.00\n    },\n    \"status\": {\n        \"includes\": [\"partial\", \"open\"]\n    },\n    \"quote_id\": {\n        \"contains\": \"80\"\n    },\n    \"customer_is_active\": {\n        \"eq\": true\n    },\n    \"customer_name\": {\n        \"not_contains\": \"AAAAA\"\n    }\n}","options":{"raw":{"language":"json"}}},"url":"{{domain}}/{{company}}/quote_headers/search"},"_postman_previewlanguage":null,"header":null,"cookie":[],"responseTime":null,"body":"{\n    \"status_message\": \"SUCCESS\",\n    \"data\": {\n        \"quote_headers\": [\n            {\n                \"quote_id\": \"cust_123\",\n                \"created_date\": \"2020-10-22T16:00:00+00:00\",\n                \"customer_id\": \"46759-0\",\n                \"customer_name\": \"ExampleCustomer\",\n                \"customer_is_active\": true,\n                \"total_value\": 7.43,\n                \"last_contact_date\": null,\n                \"status\": \"open\",\n                \"num_quote_lines\": 1\n            }\n        ],\n        \"total_count\": 2445\n    }\n}"}],"_postman_id":"fcd65ba1-030d-49d7-a2de-c4e3480ba234"}],"id":"1d8af12e-8509-452a-875f-afc4f3122619","_postman_id":"1d8af12e-8509-452a-875f-afc4f3122619","description":""},{"name":"Leads","item":[{"name":"Search Leads V1","id":"b7dd072b-10c3-4bf6-b6b5-8b58a725bd0a","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","value":"application/json","type":"text"},{"key":"Accept","value":"application/json","type":"text"},{"key":"X-User-Id","value":"{{user_id}}","type":"text"},{"key":"X-Company","value":"{{company}}","type":"text"},{"key":"X-Api-Key","value":"{{api_key}}","type":"text"}],"body":{"mode":"urlencoded","urlencoded":[]},"url":"{{domain}}/{{company}}/v1/leads/search","description":"<h1 id=\"lead-search-api-v1\">Lead Search API v1</h1>\n<h2 id=\"overview\">Overview</h2>\n<p>The Lead Search API v1 endpoint allows you to search for leads within a specific company using a query string and advanced filtering options. This endpoint supports various search operators for flexible and precise lead searches. Leads represent potential customers in your sales pipeline with tracking for stages, sources, and conversion activities.</p>\n<h2 id=\"endpoint\">Endpoint</h2>\n<p><strong>Method</strong>: <code>POST</code><br /><strong>URL</strong>: <code>{{domain}}/{{company}}/v1/leads/search</code></p>\n<h2 id=\"request-format\">Request Format</h2>\n<h3 id=\"request-body-structure\">Request Body Structure</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"query\": \"string\",\n    \"filters\": {\n        \"field_name\": {\n            \"operator\": value\n        }\n    },\n    \"count\": integer,\n    \"offset\": integer\n}\n\n</code></pre>\n<h3 id=\"request-parameters\">Request Parameters</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Parameter</th>\n<th>Type</th>\n<th>Required</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>query</code></td>\n<td>string</td>\n<td>Yes</td>\n<td>The search query string to match against lead records (e.g., partial name match)</td>\n</tr>\n<tr>\n<td><code>filters</code></td>\n<td>object</td>\n<td>No</td>\n<td>An object containing field-specific filters with search operators</td>\n</tr>\n<tr>\n<td><code>count</code></td>\n<td>integer</td>\n<td>No</td>\n<td>Number of results per page (default: 10)</td>\n</tr>\n<tr>\n<td><code>offset</code></td>\n<td>integer</td>\n<td>No</td>\n<td>Pagination offset for results (default: 0)</td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"filter-fields\">Filter Fields</h3>\n<p>The following fields can be used in the <code>filters</code> object:</p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Type</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>street_address</code></td>\n<td>string</td>\n<td>The street address of the lead</td>\n</tr>\n<tr>\n<td><code>city</code></td>\n<td>string</td>\n<td>The city where the lead is located</td>\n</tr>\n<tr>\n<td><code>state</code></td>\n<td>string</td>\n<td>The state/province where the lead is located</td>\n</tr>\n<tr>\n<td><code>zip_code</code></td>\n<td>string</td>\n<td>The postal/zip code for the lead's address</td>\n</tr>\n<tr>\n<td><code>region</code></td>\n<td>string</td>\n<td>The region where the lead is located</td>\n</tr>\n<tr>\n<td><code>country</code></td>\n<td>string</td>\n<td>The country of the lead</td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"search-operators\">Search Operators</h3>\n<p>Each filter field can use one or more of the following operators:</p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Operator</th>\n<th>Type</th>\n<th>Description</th>\n<th>Example</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>eq</code></td>\n<td>string, boolean, number, null</td>\n<td>Exact match (equals)</td>\n<td><code>{ \"state\": { \"eq\": \"CA\" } }</code></td>\n</tr>\n<tr>\n<td><code>neq</code></td>\n<td>string, boolean, number, null</td>\n<td>Not equal to</td>\n<td><code>{ \"city\": { \"neq\": \"San Jose\" } }</code></td>\n</tr>\n<tr>\n<td><code>gt</code></td>\n<td>number, datetime</td>\n<td>Greater than</td>\n<td><code>{ \"lead_created_date\": { \"gt\": \"2023-01-01\" } }</code></td>\n</tr>\n<tr>\n<td><code>gte</code></td>\n<td>number, datetime</td>\n<td>Greater than or equal to</td>\n<td><code>{ \"lead_created_date\": { \"gte\": \"2023-01-01\" } }</code></td>\n</tr>\n<tr>\n<td><code>lt</code></td>\n<td>number, datetime</td>\n<td>Less than</td>\n<td><code>{ \"lead_created_date\": { \"lt\": \"2024-01-01\" } }</code></td>\n</tr>\n<tr>\n<td><code>lte</code></td>\n<td>number, datetime</td>\n<td>Less than or equal to</td>\n<td><code>{ \"lead_created_date\": { \"lte\": \"2023-12-31\" } }</code></td>\n</tr>\n<tr>\n<td><code>contains</code></td>\n<td>string</td>\n<td>Contains substring (case-sensitive)</td>\n<td><code>{ \"street_address\": { \"contains\": \"Main\" } }</code></td>\n</tr>\n<tr>\n<td><code>not_contains</code></td>\n<td>string</td>\n<td>Does not contain substring</td>\n<td><code>{ \"street_address\": { \"not_contains\": \"Fourth\" } }</code></td>\n</tr>\n<tr>\n<td><code>exists</code></td>\n<td>boolean</td>\n<td>Field exists or not</td>\n<td><code>{ \"region\": { \"exists\": true } }</code></td>\n</tr>\n<tr>\n<td><code>includes</code></td>\n<td>array</td>\n<td>Value is included in the provided list</td>\n<td><code>{ \"zip_code\": { \"includes\": [\"55759\", \"70008\", \"11835\"] } }</code></td>\n</tr>\n</tbody>\n</table>\n</div><p><strong>Note</strong>:</p>\n<ul>\n<li><p>Multiple operators cannot be used for the same field in a single filter</p>\n</li>\n<li><p>At least one operator must be defined for each filter field</p>\n</li>\n<li><p>Operators can accept single values or arrays (where applicable)</p>\n</li>\n</ul>\n<h2 id=\"example-request\">Example Request</h2>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"query\": \"tech\",\n    \"filters\": {\n        \"state\": { \"eq\": \"CA\" },\n        \"city\": { \"neq\": \"San Jose\" },\n        \"street_address\": { \"contains\": \"Main\" },\n        \"zip_code\": { \"includes\": [\"55759\", \"70008\", \"11835\"] },\n        \"region\": { \"eq\": \"NW\" },\n        \"country\": { \"eq\": \"US\" }\n    },\n    \"count\": 5,\n    \"offset\": 0\n}\n\n</code></pre>\n<p>This request will:</p>\n<ul>\n<li><p>Search for leads with names containing \"tech\"</p>\n</li>\n<li><p>Filter for leads in California (CA)</p>\n</li>\n<li><p>Exclude leads in San Jose</p>\n</li>\n<li><p>Include only leads with \"Main\" in their street address</p>\n</li>\n<li><p>Include only leads with zip codes 55759, 70008, or 11835</p>\n</li>\n<li><p>Filter for leads in the Northwest (NW) region</p>\n</li>\n<li><p>Filter for leads in the United States</p>\n</li>\n</ul>\n<h2 id=\"response-format\">Response Format</h2>\n<h3 id=\"success-response-200-ok\">Success Response (200 OK)</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"status_message\": \"success\",\n    \"data\": {\n        \"message\": \"\",\n        \"items\": [\n            {\n                \"lead_id\": \"LEAD-001\",\n                \"name\": \"Tech Solutions Inc\",\n                \"bill_to_id\": \"BT-789012\",\n                \"street_address\": \"456 Main Avenue\",\n                \"city\": \"Los Angeles\",\n                \"state\": \"CA\",\n                \"zip_code\": \"55759\",\n                \"email\": \"contact@techsolutions.com\",\n                \"fax_number\": \"+1-555-0456\",\n                \"office_phone_number\": \"+1-555-0400\",\n                \"branch\": \"West Coast\",\n                \"region\": \"NW\",\n                \"country\": \"US\",\n                \"is_active\": true,\n                \"lead_stage\": \"qualified\",\n                \"lead_source\": \"website\",\n                \"lead_created_by\": \"USER-123\",\n                \"lead_created_by_name\": \"John Smith\",\n                \"lead_created_date\": \"2023-11-15T10:30:00Z\",\n                \"lead_update_stage_date\": \"2023-11-20T14:45:00Z\"\n            }\n        ],\n        \"total_count\": 28,\n        \"page_size\": 5,\n        \"page_number\": 1,\n        \"total_pages\": 6\n    }\n}\n\n</code></pre>\n<h3 id=\"response-fields\">Response Fields</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Type</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>status_message</code></td>\n<td>string</td>\n<td>Overall status of the request</td>\n</tr>\n<tr>\n<td><code>data.message</code></td>\n<td>string</td>\n<td>Descriptive message about the response</td>\n</tr>\n<tr>\n<td><code>data.items</code></td>\n<td>array</td>\n<td>Array of lead objects matching the search criteria</td>\n</tr>\n<tr>\n<td><code>data.total_count</code></td>\n<td>integer</td>\n<td>Total number of leads matching the search criteria</td>\n</tr>\n<tr>\n<td><code>data.page_size</code></td>\n<td>integer</td>\n<td>Number of items returned in this page</td>\n</tr>\n<tr>\n<td><code>data.page_number</code></td>\n<td>integer</td>\n<td>Current page number (calculated from offset)</td>\n</tr>\n<tr>\n<td><code>data.total_pages</code></td>\n<td>integer</td>\n<td>Total number of pages available</td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"lead-object-fields\">Lead Object Fields</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Type</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>lead_id</code></td>\n<td>string</td>\n<td>Unique identifier for the lead</td>\n</tr>\n<tr>\n<td><code>name</code></td>\n<td>string</td>\n<td>Lead/company name</td>\n</tr>\n<tr>\n<td><code>bill_to_id</code></td>\n<td>string</td>\n<td>Billing identifier associated with the lead</td>\n</tr>\n<tr>\n<td><code>street_address</code></td>\n<td>string</td>\n<td>Street address (nullable)</td>\n</tr>\n<tr>\n<td><code>city</code></td>\n<td>string</td>\n<td>City (nullable)</td>\n</tr>\n<tr>\n<td><code>state</code></td>\n<td>string</td>\n<td>State/Province (nullable)</td>\n</tr>\n<tr>\n<td><code>zip_code</code></td>\n<td>string</td>\n<td>Postal/ZIP code (nullable)</td>\n</tr>\n<tr>\n<td><code>email</code></td>\n<td>string</td>\n<td>Email address (nullable)</td>\n</tr>\n<tr>\n<td><code>fax_number</code></td>\n<td>string</td>\n<td>Fax number (nullable)</td>\n</tr>\n<tr>\n<td><code>office_phone_number</code></td>\n<td>string</td>\n<td>Office phone number (nullable)</td>\n</tr>\n<tr>\n<td><code>branch</code></td>\n<td>string</td>\n<td>Branch information (nullable)</td>\n</tr>\n<tr>\n<td><code>region</code></td>\n<td>string</td>\n<td>Region (nullable)</td>\n</tr>\n<tr>\n<td><code>country</code></td>\n<td>string</td>\n<td>Country (nullable)</td>\n</tr>\n<tr>\n<td><code>is_active</code></td>\n<td>boolean</td>\n<td>Whether the lead is currently active (nullable)</td>\n</tr>\n<tr>\n<td><code>lead_stage</code></td>\n<td>string</td>\n<td>Current stage in the lead pipeline (nullable)</td>\n</tr>\n<tr>\n<td><code>lead_source</code></td>\n<td>string</td>\n<td>Source where the lead originated (nullable)</td>\n</tr>\n<tr>\n<td><code>lead_created_by</code></td>\n<td>string</td>\n<td>User ID of the person who created the lead (nullable)</td>\n</tr>\n<tr>\n<td><code>lead_created_by_name</code></td>\n<td>string</td>\n<td>Name of the person who created the lead (nullable)</td>\n</tr>\n<tr>\n<td><code>lead_created_date</code></td>\n<td>datetime</td>\n<td>Date and time when the lead was created (nullable)</td>\n</tr>\n<tr>\n<td><code>lead_update_stage_date</code></td>\n<td>datetime</td>\n<td>Date and time when the lead stage was last updated (nullable)</td>\n</tr>\n</tbody>\n</table>\n</div><h2 id=\"error-responses\">Error Responses</h2>\n<h3 id=\"400-bad-request\">400 Bad Request</h3>\n<p>Returned when the request is malformed or contains invalid parameters.</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"status_message\": \"error\",\n    \"error\": {\n        \"code\": \"INVALID_REQUEST\",\n        \"message\": \"Invalid filter operator 'contains' for field 'state'. Field 'state' only supports operators: eq, neq\"\n    }\n}\n\n</code></pre>\n<h3 id=\"401-unauthorized\">401 Unauthorized</h3>\n<p>Returned when authentication fails or is missing.</p>\n<h3 id=\"404-not-found\">404 Not Found</h3>\n<p>Returned when the specified company does not exist.</p>\n<h3 id=\"500-internal-server-error\">500 Internal Server Error</h3>\n<p>Returned when an unexpected error occurs on the server.</p>\n<h2 id=\"pagination\">Pagination</h2>\n<p>Use the <code>count</code> and <code>offset</code> parameters to paginate through results:</p>\n<ul>\n<li><p>First page: <code>offset: 0, count: 20</code></p>\n</li>\n<li><p>Second page: <code>offset: 20, count: 20</code></p>\n</li>\n<li><p>Third page: <code>offset: 40, count: 20</code></p>\n</li>\n</ul>\n<p>The response includes <code>total_count</code>, <code>page_number</code>, and <code>total_pages</code> to help with pagination navigation.</p>\n<h2 id=\"best-practices\">Best Practices</h2>\n<ol>\n<li><p><strong>Use specific queries</strong>: Provide at least 3 characters in the <code>query</code> parameter for better performance</p>\n</li>\n<li><p><strong>Combine filters wisely</strong>: Use multiple filters to narrow down results effectively</p>\n</li>\n<li><p><strong>Handle pagination</strong>: For large result sets, implement proper pagination to avoid timeouts</p>\n</li>\n<li><p><strong>Error handling</strong>: Always check the <code>status_message</code> and handle errors appropriately</p>\n</li>\n</ol>\n<h2 id=\"notes\">Notes</h2>\n<ul>\n<li><p>The search is case-insensitive for the <code>query</code> parameter</p>\n</li>\n<li><p>Filter operators are case-sensitive for string comparisons</p>\n</li>\n<li><p>Empty filter values are treated as \"match any\"</p>\n</li>\n<li><p>The <code>includes</code> operator is particularly useful for matching against multiple possible values</p>\n</li>\n<li><p>Results are sorted by relevance to the search query by default</p>\n</li>\n<li><p>Lead-specific fields (<code>lead_stage</code>, <code>lead_source</code>, etc.) are only populated for records that have lead data</p>\n</li>\n</ul>\n","urlObject":{"path":["{{company}}","v1","leads","search"],"host":["{{domain}}"],"query":[],"variable":[]}},"response":[{"id":"99a2e00f-2124-4a2e-995c-7d74a488196e","name":"Search Leads V1","originalRequest":{"method":"POST","header":[{"key":"Content-Type","value":"application/json","type":"text"},{"key":"Accept","value":"application/json","type":"text"},{"key":"X-User-Id","value":"{{user_id}}","type":"text"},{"key":"X-Company","value":"{{company}}","type":"text"},{"key":"X-Api-Key","value":"{{api_key}}","type":"text"}],"body":{"mode":"raw","raw":"{\n    \"query\": \"tech\",\n    \"filters\": {\n        \"state\": { \"eq\": \"CA\" },\n        \"city\": { \"neq\": \"San Jose\" },\n        \"street_address\": { \"contains\": \"Main\" },\n        \"zip_code\": { \"includes\": [\"55759\", \"70008\", \"11835\"] },\n        \"region\": { \"eq\": \"NW\" },\n        \"country\": { \"eq\": \"US\" }\n    },\n    \"count\": 5,\n    \"offset\": 0\n}","options":{"raw":{"language":"json"}}},"url":"{{domain}}/{{company}}/v1/leads/search"},"_postman_previewlanguage":"","header":[],"cookie":[{"expires":"Invalid Date","domain":"","path":""}],"responseTime":null,"body":"\n{\n    \"status_message\": \"success\",\n    \"data\": {\n        \"message\": \"\",\n        \"items\": [\n            {\n                \"lead_id\": \"LEAD-001\",\n                \"name\": \"Tech Solutions Inc\",\n                \"bill_to_id\": \"BT-789012\",\n                \"street_address\": \"456 Main Avenue\",\n                \"city\": \"Los Angeles\",\n                \"state\": \"CA\",\n                \"zip_code\": \"55759\",\n                \"email\": \"contact@techsolutions.com\",\n                \"fax_number\": \"+1-555-0456\",\n                \"office_phone_number\": \"+1-555-0400\",\n                \"branch\": \"West Coast\",\n                \"region\": \"NW\",\n                \"country\": \"US\",\n                \"is_active\": true,\n                \"lead_stage\": \"qualified\",\n                \"lead_source\": \"website\",\n                \"lead_created_by\": \"USER-123\",\n                \"lead_created_by_name\": \"John Smith\",\n                \"lead_created_date\": \"2023-11-15T10:30:00Z\",\n                \"lead_update_stage_date\": \"2023-11-20T14:45:00Z\"\n            }\n        ],\n        \"total_count\": 28,\n        \"page_size\": 5,\n        \"page_number\": 1,\n        \"total_pages\": 6\n    }\n}"}],"_postman_id":"b7dd072b-10c3-4bf6-b6b5-8b58a725bd0a"}],"id":"1a2480db-1053-4121-9e81-bb321e076f69","_postman_id":"1a2480db-1053-4121-9e81-bb321e076f69","description":""},{"name":"Contacts","item":[{"name":"Search Contacts V1","id":"2630f917-bd95-4aed-9c66-18310a45a8de","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"X-User-Id","value":"{{user_id}}","type":"text"},{"key":"X-Company","value":"{{company}}","type":"text"},{"key":"X-Api-Key","value":"{{api_key}}","type":"text"}],"url":"{{domain}}/{{company}}/v1/contacts/search","description":"<h1 id=\"contact-search-api-v1\">Contact Search API v1</h1>\n<h2 id=\"overview\">Overview</h2>\n<p>The Contact Search API v1 endpoint allows you to search for contacts within a specific company using a query string and advanced filtering options. This endpoint supports various search operators for flexible and precise contact searches. Contacts represent individual people associated with customers, including their roles, contact information, and relationship details.</p>\n<h2 id=\"endpoint\">Endpoint</h2>\n<p><strong>Method</strong>: <code>POST</code><br /><strong>URL</strong>: <code>{{domain}}/{{company}}/v1/contacts/search</code></p>\n<h2 id=\"request-format\">Request Format</h2>\n<h3 id=\"request-body-structure\">Request Body Structure</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"query\": \"string\",\n    \"filters\": {\n        \"field_name\": {\n            \"operator\": value\n        }\n    },\n    \"count\": integer,\n    \"offset\": integer\n}\n\n</code></pre>\n<h3 id=\"request-parameters\">Request Parameters</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Parameter</th>\n<th>Type</th>\n<th>Required</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>query</code></td>\n<td>string</td>\n<td>Yes</td>\n<td>The search query string to match against contact records (e.g., partial name match)</td>\n</tr>\n<tr>\n<td><code>filters</code></td>\n<td>object</td>\n<td>No</td>\n<td>An object containing field-specific filters with search operators</td>\n</tr>\n<tr>\n<td><code>count</code></td>\n<td>integer</td>\n<td>No</td>\n<td>Number of results per page (default: 10)</td>\n</tr>\n<tr>\n<td><code>offset</code></td>\n<td>integer</td>\n<td>No</td>\n<td>Pagination offset for results (default: 0)</td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"filter-fields\">Filter Fields</h3>\n<p>The following fields can be used in the <code>filters</code> object:</p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Type</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>customer_id</code></td>\n<td>string</td>\n<td>The unique identifier of the customer associated with the contact</td>\n</tr>\n<tr>\n<td><code>contact_type</code></td>\n<td>string</td>\n<td>The type/category of the contact</td>\n</tr>\n<tr>\n<td><code>position</code></td>\n<td>string</td>\n<td>The job position or role of the contact</td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"search-operators\">Search Operators</h3>\n<p>Each filter field can use one or more of the following operators:</p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Operator</th>\n<th>Type</th>\n<th>Description</th>\n<th>Example</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>eq</code></td>\n<td>string, boolean, number, null</td>\n<td>Exact match (equals)</td>\n<td><code>{ \"contact_type\": { \"eq\": \"primary\" } }</code></td>\n</tr>\n<tr>\n<td><code>neq</code></td>\n<td>string, boolean, number, null</td>\n<td>Not equal to</td>\n<td><code>{ \"contact_type\": { \"neq\": \"secondary\" } }</code></td>\n</tr>\n<tr>\n<td><code>gt</code></td>\n<td>number, datetime</td>\n<td>Greater than</td>\n<td><code>{ \"created_date\": { \"gt\": \"2023-01-01\" } }</code></td>\n</tr>\n<tr>\n<td><code>gte</code></td>\n<td>number, datetime</td>\n<td>Greater than or equal to</td>\n<td><code>{ \"created_date\": { \"gte\": \"2023-01-01\" } }</code></td>\n</tr>\n<tr>\n<td><code>lt</code></td>\n<td>number, datetime</td>\n<td>Less than</td>\n<td><code>{ \"created_date\": { \"lt\": \"2024-01-01\" } }</code></td>\n</tr>\n<tr>\n<td><code>lte</code></td>\n<td>number, datetime</td>\n<td>Less than or equal to</td>\n<td><code>{ \"created_date\": { \"lte\": \"2023-12-31\" } }</code></td>\n</tr>\n<tr>\n<td><code>contains</code></td>\n<td>string</td>\n<td>Contains substring (case-sensitive)</td>\n<td><code>{ \"position\": { \"contains\": \"Manager\" } }</code></td>\n</tr>\n<tr>\n<td><code>not_contains</code></td>\n<td>string</td>\n<td>Does not contain substring</td>\n<td><code>{ \"position\": { \"not_contains\": \"Assistant\" } }</code></td>\n</tr>\n<tr>\n<td><code>exists</code></td>\n<td>boolean</td>\n<td>Field exists or not</td>\n<td><code>{ \"position\": { \"exists\": true } }</code></td>\n</tr>\n<tr>\n<td><code>includes</code></td>\n<td>array</td>\n<td>Value is included in the provided list</td>\n<td><code>{ \"contact_type\": { \"includes\": [\"primary\", \"billing\", \"technical\"] } }</code></td>\n</tr>\n</tbody>\n</table>\n</div><p><strong>Note</strong>:</p>\n<ul>\n<li><p>Multiple operators cannot be used for the same field in a single filter</p>\n</li>\n<li><p>At least one operator must be defined for each filter field</p>\n</li>\n<li><p>Operators can accept single values or arrays (where applicable)</p>\n</li>\n</ul>\n<h2 id=\"example-request\">Example Request</h2>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"query\": \"john\",\n    \"filters\": {\n        \"customer_id\": { \"eq\": \"CUST-12345\" },\n        \"contact_type\": { \"includes\": [\"primary\", \"billing\"] },\n        \"position\": { \"contains\": \"Manager\" }\n    },\n    \"count\": 10,\n    \"offset\": 0\n}\n\n</code></pre>\n<p>This request will:</p>\n<ul>\n<li><p>Search for contacts with names containing \"john\"</p>\n</li>\n<li><p>Filter for contacts associated with customer \"CUST-12345\"</p>\n</li>\n<li><p>Include only contacts with type \"primary\" or \"billing\"</p>\n</li>\n<li><p>Include only contacts with \"Manager\" in their position title</p>\n</li>\n</ul>\n<h2 id=\"response-format\">Response Format</h2>\n<h3 id=\"success-response-200-ok\">Success Response (200 OK)</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"status_message\": \"success\",\n    \"data\": {\n        \"message\": \"Contacts retrieved successfully\",\n        \"items\": [\n            {\n                \"contact_id\": \"CONTACT-001\",\n                \"name\": \"John\",\n                \"surname\": \"Smith\",\n                \"full_name\": \"John Smith\",\n                \"customer_id\": \"CUST-12345\",\n                \"customer_name\": \"ABC Manufacturing Corp\",\n                \"contact_type\": \"primary\",\n                \"position\": \"Operations Manager\",\n                \"email\": \"john.smith@abcmanufacturing.com\",\n                \"phone_number\": \"+1-555-0123\",\n                \"street_address\": \"789 Industrial Blvd\",\n                \"city\": \"Chicago\",\n                \"state\": \"IL\",\n                \"country\": \"US\",\n                \"zip_code\": \"60601\"\n            }\n        ],\n        \"total_count\": 15,\n        \"page_size\": 10,\n        \"page_number\": 1,\n        \"total_pages\": 2\n    }\n}\n\n</code></pre>\n<h3 id=\"response-fields\">Response Fields</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Type</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>status_message</code></td>\n<td>string</td>\n<td>Overall status of the request</td>\n</tr>\n<tr>\n<td><code>data.message</code></td>\n<td>string</td>\n<td>Descriptive message about the response</td>\n</tr>\n<tr>\n<td><code>data.items</code></td>\n<td>array</td>\n<td>Array of contact objects matching the search criteria</td>\n</tr>\n<tr>\n<td><code>data.total_count</code></td>\n<td>integer</td>\n<td>Total number of contacts matching the search criteria</td>\n</tr>\n<tr>\n<td><code>data.page_size</code></td>\n<td>integer</td>\n<td>Number of items returned in this page</td>\n</tr>\n<tr>\n<td><code>data.page_number</code></td>\n<td>integer</td>\n<td>Current page number (calculated from offset)</td>\n</tr>\n<tr>\n<td><code>data.total_pages</code></td>\n<td>integer</td>\n<td>Total number of pages available</td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"contact-object-fields\">Contact Object Fields</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Type</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>contact_id</code></td>\n<td>string</td>\n<td>Unique identifier for the contact</td>\n</tr>\n<tr>\n<td><code>name</code></td>\n<td>string</td>\n<td>First name of the contact (nullable)</td>\n</tr>\n<tr>\n<td><code>surname</code></td>\n<td>string</td>\n<td>Last name of the contact (nullable)</td>\n</tr>\n<tr>\n<td><code>full_name</code></td>\n<td>string</td>\n<td>Full name of the contact (nullable)</td>\n</tr>\n<tr>\n<td><code>customer_id</code></td>\n<td>string</td>\n<td>Unique identifier of the associated customer (nullable)</td>\n</tr>\n<tr>\n<td><code>customer_name</code></td>\n<td>string</td>\n<td>Name of the associated customer (nullable)</td>\n</tr>\n<tr>\n<td><code>contact_type</code></td>\n<td>string</td>\n<td>Type/category of the contact (nullable)</td>\n</tr>\n<tr>\n<td><code>position</code></td>\n<td>string</td>\n<td>Job position or role of the contact (nullable)</td>\n</tr>\n<tr>\n<td><code>email</code></td>\n<td>string</td>\n<td>Primary email address of the contact (nullable)</td>\n</tr>\n<tr>\n<td><code>phone_number</code></td>\n<td>string</td>\n<td>Primary phone number of the contact (nullable)</td>\n</tr>\n<tr>\n<td><code>street_address</code></td>\n<td>string</td>\n<td>Street address of the contact (nullable)</td>\n</tr>\n<tr>\n<td><code>city</code></td>\n<td>string</td>\n<td>City where the contact is located (nullable)</td>\n</tr>\n<tr>\n<td><code>state</code></td>\n<td>string</td>\n<td>State/Province where the contact is located (nullable)</td>\n</tr>\n<tr>\n<td><code>country</code></td>\n<td>string</td>\n<td>Country where the contact is located (nullable)</td>\n</tr>\n<tr>\n<td><code>zip_code</code></td>\n<td>string</td>\n<td>Postal/ZIP code of the contact's address (nullable)</td>\n</tr>\n</tbody>\n</table>\n</div><h2 id=\"error-responses\">Error Responses</h2>\n<h3 id=\"400-bad-request\">400 Bad Request</h3>\n<p>Returned when the request is malformed or contains invalid parameters.</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"status_message\": \"error\",\n    \"error\": {\n        \"code\": \"INVALID_REQUEST\",\n        \"message\": \"Invalid filter operator 'contains' for field 'customer_id'. Field 'customer_id' only supports operators: eq, neq\"\n    }\n}\n\n</code></pre>\n<h3 id=\"401-unauthorized\">401 Unauthorized</h3>\n<p>Returned when authentication fails or is missing.</p>\n<h3 id=\"404-not-found\">404 Not Found</h3>\n<p>Returned when the specified company does not exist.</p>\n<h3 id=\"500-internal-server-error\">500 Internal Server Error</h3>\n<p>Returned when an unexpected error occurs on the server.</p>\n<h2 id=\"pagination\">Pagination</h2>\n<p>Use the <code>count</code> and <code>offset</code> parameters to paginate through results:</p>\n<ul>\n<li><p>First page: <code>offset: 0, count: 20</code></p>\n</li>\n<li><p>Second page: <code>offset: 20, count: 20</code></p>\n</li>\n<li><p>Third page: <code>offset: 40, count: 20</code></p>\n</li>\n</ul>\n<p>The response includes <code>total_count</code>, <code>page_number</code>, and <code>total_pages</code> to help with pagination navigation.</p>\n<h2 id=\"best-practices\">Best Practices</h2>\n<ol>\n<li><p><strong>Use specific queries</strong>: Provide at least 3 characters in the <code>query</code> parameter for better performance</p>\n</li>\n<li><p><strong>Combine filters wisely</strong>: Use multiple filters to narrow down results effectively</p>\n</li>\n<li><p><strong>Handle pagination</strong>: For large result sets, implement proper pagination to avoid timeouts</p>\n</li>\n<li><p><strong>Error handling</strong>: Always check the <code>status_message</code> and handle errors appropriately</p>\n</li>\n<li><p><strong>Customer association</strong>: Use <code>customer_id</code> filter to find all contacts for a specific customer</p>\n</li>\n</ol>\n<h2 id=\"notes\">Notes</h2>\n<ul>\n<li><p>The search is case-insensitive for the <code>query</code> parameter</p>\n</li>\n<li><p>Filter operators are case-sensitive for string comparisons</p>\n</li>\n<li><p>Empty filter values are treated as \"match any\"</p>\n</li>\n<li><p>The <code>includes</code> operator is particularly useful for matching against multiple contact types</p>\n</li>\n<li><p>Results are sorted by relevance to the search query by default</p>\n</li>\n</ul>\n","urlObject":{"path":["{{company}}","v1","contacts","search"],"host":["{{domain}}"],"query":[],"variable":[]}},"response":[{"id":"cfb94fc1-dda9-452d-a414-60a99cba5f50","name":"Search Contacts V1","originalRequest":{"method":"POST","header":[{"key":"X-User-Id","value":"{{user_id}}","type":"text"},{"key":"X-Company","value":"{{company}}","type":"text"},{"key":"X-Api-Key","value":"{{api_key}}","type":"text"},{"key":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\n    \"query\": \"john\",\n    \"filters\": {\n        \"customer_id\": { \"eq\": \"CUST-12345\" },\n        \"contact_type\": { \"includes\": [\"primary\", \"billing\"] },\n        \"position\": { \"contains\": \"Manager\" }\n    },\n    \"count\": 10,\n    \"offset\": 0\n}\n","options":{"raw":{"language":"json"}}},"url":"{{domain}}/{{company}}/v1/contacts/search"},"_postman_previewlanguage":"","header":[],"cookie":[{"expires":"Invalid Date","domain":"","path":""}],"responseTime":null,"body":"{\n    \"status_message\": \"success\",\n    \"data\": {\n        \"message\": \"Contacts retrieved successfully\",\n        \"items\": [\n            {\n                \"contact_id\": \"CONTACT-001\",\n                \"name\": \"John\",\n                \"surname\": \"Smith\",\n                \"full_name\": \"John Smith\",\n                \"customer_id\": \"CUST-12345\",\n                \"customer_name\": \"ABC Manufacturing Corp\",\n                \"contact_type\": \"primary\",\n                \"position\": \"Operations Manager\",\n                \"email\": \"john.smith@abcmanufacturing.com\",\n                \"phone_number\": \"+1-555-0123\",\n                \"street_address\": \"789 Industrial Blvd\",\n                \"city\": \"Chicago\",\n                \"state\": \"IL\",\n                \"country\": \"US\",\n                \"zip_code\": \"60601\"\n            }\n        ],\n        \"total_count\": 15,\n        \"page_size\": 10,\n        \"page_number\": 1,\n        \"total_pages\": 2\n    }\n}\n"}],"_postman_id":"2630f917-bd95-4aed-9c66-18310a45a8de"},{"name":"Create Contact V1","id":"5a1fad9e-5204-4969-947f-12bd6607af64","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"X-User-Id","value":"{{user_id}}","type":"text"},{"key":"X-Company","value":"{{company}}","type":"text"},{"key":"X-Api-Key","value":"{{api_key}}","type":"text"}],"url":"{{domain}}/{{company}}/v1/contacts","description":"<h1 id=\"contact-create-api-v1\">Contact Create API v1</h1>\n<h2 id=\"overview\">Overview</h2>\n<p>The Contact Create API v1 endpoint allows you to create a new contact within a specific company. Contacts represent individual people associated with customers, including their roles, contact information, and relationship details. This endpoint supports comprehensive contact information including multiple email addresses, phone numbers, and custom fields.</p>\n<h2 id=\"endpoint\">Endpoint</h2>\n<p><strong>Method</strong>: <code>POST</code><br /><strong>URL</strong>: <code>{{domain}}/{{company}}/v1/contacts</code></p>\n<h2 id=\"request-format\">Request Format</h2>\n<h3 id=\"request-body-structure\">Request Body Structure</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"name\": \"string\",\n    \"customer_id\": \"string\",\n    \"contact_id\": \"string\",\n    \"surname\": \"string\",\n    \"contact_type\": \"string\",\n    \"position\": \"string\",\n    \"emails\": [\n        {\n            \"email\": \"string\"\n        }\n    ],\n    \"phone_numbers\": [\n        {\n            \"phone_number\": \"string\",\n            \"type\": \"string\"\n        }\n    ],\n    \"address\": {\n        \"street_address\": \"string\",\n        \"street_address_2\": \"string\",\n        \"street_address_3\": \"string\",\n        \"apartment\": \"string\",\n        \"city\": \"string\",\n        \"state\": \"string\",\n        \"country\": \"string\",\n        \"zip_code\": \"string\"\n    },\n    \"notes\": \"string\",\n    \"custom_fields\": [\n        {\n            \"field_id\": \"string\",\n            \"value\": \"any\"\n        }\n    ],\n    \"external_id\": \"string\",\n    \"last_edited_date\": \"string\"\n}\n\n</code></pre>\n<h3 id=\"request-parameters\">Request Parameters</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Parameter</th>\n<th>Type</th>\n<th>Required</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>name</code></td>\n<td>string</td>\n<td>Yes</td>\n<td>First name of the contact</td>\n</tr>\n<tr>\n<td><code>customer_id</code></td>\n<td>string</td>\n<td>Yes</td>\n<td>The unique identifier of the customer to associate with this contact</td>\n</tr>\n<tr>\n<td><code>contact_id</code></td>\n<td>string</td>\n<td>No</td>\n<td>Unique identifier for the contact. Can be set by the API caller to use a custom ID (e.g., from your own system). If not provided, a UUID will be auto-generated internally</td>\n</tr>\n<tr>\n<td><code>surname</code></td>\n<td>string</td>\n<td>No</td>\n<td>Last name of the contact</td>\n</tr>\n<tr>\n<td><code>contact_type</code></td>\n<td>string</td>\n<td>No</td>\n<td>The type/category of the contact (e.g., \"primary\", \"billing\", \"technical\")</td>\n</tr>\n<tr>\n<td><code>position</code></td>\n<td>string</td>\n<td>No</td>\n<td>Job title or role of the contact</td>\n</tr>\n<tr>\n<td><code>emails</code></td>\n<td>array[Email]</td>\n<td>No</td>\n<td>List of email addresses for the contact</td>\n</tr>\n<tr>\n<td><code>phone_numbers</code></td>\n<td>array[PhoneNumber]</td>\n<td>No</td>\n<td>List of phone numbers for the contact</td>\n</tr>\n<tr>\n<td><code>address</code></td>\n<td>Address</td>\n<td>No</td>\n<td>Physical address information for the contact</td>\n</tr>\n<tr>\n<td><code>notes</code></td>\n<td>string</td>\n<td>No</td>\n<td>Internal notes or comments about the contact</td>\n</tr>\n<tr>\n<td><code>custom_fields</code></td>\n<td>array[CustomFieldInstance]</td>\n<td>No</td>\n<td>Custom field values defined for your organization</td>\n</tr>\n<tr>\n<td><code>external_id</code></td>\n<td>string</td>\n<td>No</td>\n<td>Identifier from an external system (e.g., ERP, legacy CRM)</td>\n</tr>\n<tr>\n<td><code>last_edited_date</code></td>\n<td>string</td>\n<td>No</td>\n<td>ISO 8601 timestamp. Defaults to current UTC time if not provided</td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"nested-object-definitions\">Nested Object Definitions</h3>\n<h4 id=\"email-object\">Email Object</h4>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Type</th>\n<th>Required</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>email</code></td>\n<td>string</td>\n<td>Yes</td>\n<td>Email address</td>\n</tr>\n</tbody>\n</table>\n</div><h4 id=\"phonenumber-object\">PhoneNumber Object</h4>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Type</th>\n<th>Required</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>phone_number</code></td>\n<td>string</td>\n<td>Yes</td>\n<td>Phone number</td>\n</tr>\n<tr>\n<td><code>type</code></td>\n<td>string</td>\n<td>No</td>\n<td>Type of phone number (e.g., \"mobile\", \"office\", \"home\")</td>\n</tr>\n</tbody>\n</table>\n</div><h4 id=\"address-object\">Address Object</h4>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Type</th>\n<th>Required</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>street_address</code></td>\n<td>string</td>\n<td>No</td>\n<td>Primary street address</td>\n</tr>\n<tr>\n<td><code>street_address_2</code></td>\n<td>string</td>\n<td>No</td>\n<td>Additional street address line</td>\n</tr>\n<tr>\n<td><code>street_address_3</code></td>\n<td>string</td>\n<td>No</td>\n<td>Additional street address line</td>\n</tr>\n<tr>\n<td><code>apartment</code></td>\n<td>string</td>\n<td>No</td>\n<td>Apartment, suite, or unit number</td>\n</tr>\n<tr>\n<td><code>city</code></td>\n<td>string</td>\n<td>No</td>\n<td>City name</td>\n</tr>\n<tr>\n<td><code>state</code></td>\n<td>string</td>\n<td>No</td>\n<td>State or province</td>\n</tr>\n<tr>\n<td><code>country</code></td>\n<td>string</td>\n<td>No</td>\n<td>Country name or code</td>\n</tr>\n<tr>\n<td><code>zip_code</code></td>\n<td>string</td>\n<td>No</td>\n<td>Postal or ZIP code</td>\n</tr>\n</tbody>\n</table>\n</div><h4 id=\"customfieldinstance-object\">CustomFieldInstance Object</h4>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Type</th>\n<th>Required</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>field_id</code></td>\n<td>string</td>\n<td>Yes</td>\n<td>The identifier of the custom field</td>\n</tr>\n<tr>\n<td><code>value</code></td>\n<td>any</td>\n<td>Yes</td>\n<td>The value for the custom field</td>\n</tr>\n</tbody>\n</table>\n</div><h2 id=\"example-request\">Example Request</h2>\n<h3 id=\"with-custom-contact_id\">With Custom contact_id</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"name\": \"John\",\n    \"surname\": \"Smith\",\n    \"customer_id\": \"CUST-12345\",\n    \"contact_id\": \"CONTACT-78901\",\n    \"contact_type\": \"primary\",\n    \"position\": \"Operations Manager\",\n    \"emails\": [\n        { \"email\": \"john.smith@abcmanufacturing.com\" },\n        { \"email\": \"jsmith@personal.com\" }\n    ],\n    \"phone_numbers\": [\n        { \"phone_number\": \"+1-555-0123\", \"type\": \"office\" },\n        { \"phone_number\": \"+1-555-0456\", \"type\": \"mobile\" }\n    ],\n    \"address\": {\n        \"street_address\": \"789 Industrial Blvd\",\n        \"street_address_2\": \"Suite 100\",\n        \"city\": \"Chicago\",\n        \"state\": \"IL\",\n        \"country\": \"US\",\n        \"zip_code\": \"60601\"\n    },\n    \"notes\": \"Primary contact for all operational matters\",\n    \"custom_fields\": [\n        { \"field_id\": \"department\", \"value\": \"Operations\" },\n        { \"field_id\": \"preferred_contact_method\", \"value\": \"email\" }\n    ],\n    \"external_id\": \"ERP-CONTACT-78901\"\n}\n\n</code></pre>\n<p>This request creates a contact with a custom <code>contact_id</code> of \"CONTACT-78901\".</p>\n<h3 id=\"without-contact_id-auto-generated\">Without contact_id (Auto-generated)</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>{\n    \"name\": \"Jane\",\n    \"surname\": \"Doe\",\n    \"customer_id\": \"CUST-12345\",\n    \"contact_type\": \"billing\",\n    \"position\": \"Finance Director\",\n    \"emails\": [\n        { \"email\": \"jane.doe@abcmanufacturing.com\" }\n    ],\n    \"phone_numbers\": [\n        { \"phone_number\": \"+1-555-0789\", \"type\": \"office\" }\n    ]\n}\n\n</code></pre><p>This request creates a contact without specifying a <code>contact_id</code>. The system will auto-generate a UUID (e.g., \"550e8400-e29b-41d4-a716-446655440000\") as the <code>contact_id</code>.</p>\n<h2 id=\"response-format\">Response Format</h2>\n<h3 id=\"success-response-201-created\">Success Response (201 Created)</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>{\n    \"id\": \"550e8400-e29b-41d4-a716-446655440000\",\n    \"contact_id\": \"CONTACT-78901\",\n    \"name\": \"John\",\n    \"surname\": \"Smith\",\n    \"full_name\": \"John Smith\",\n    \"customer_id\": \"CUST-12345\",\n    \"customer_name\": \"ABC Manufacturing Corp\",\n    \"customer_is_active\": true,\n    \"contact_type\": \"primary\",\n    \"position\": \"Operations Manager\",\n    \"emails\": [\n        { \"email\": \"john.smith@abcmanufacturing.com\" },\n        { \"email\": \"jsmith@personal.com\" }\n    ],\n    \"phone_numbers\": [\n        { \"phone_number\": \"+1-555-0123\", \"type\": \"office\" },\n        { \"phone_number\": \"+1-555-0456\", \"type\": \"mobile\" }\n    ],\n    \"address\": {\n        \"street_address\": \"789 Industrial Blvd\",\n        \"street_address_2\": \"Suite 100\",\n        \"street_address_3\": \"\",\n        \"apartment\": \"\",\n        \"city\": \"Chicago\",\n        \"state\": \"IL\",\n        \"country\": \"US\",\n        \"zip_code\": \"60601\"\n    },\n    \"custom_fields\": [\n        { \"field_id\": \"department\", \"value\": \"Operations\" },\n        { \"field_id\": \"preferred_contact_method\", \"value\": \"email\" }\n    ],\n    \"external_id\": \"ERP-CONTACT-78901\",\n    \"representative_ids\": [],\n    \"visibility_ids\": null,\n    \"representative_ids_synced\": false,\n    \"visibility_ids_synced\": false,\n    \"bill_to_id\": null,\n    \"from_lead\": false,\n    \"lead_id\": null,\n    \"last_edited_date\": \"2025-01-19T15:30:45Z\",\n    \"last_ingested_date\": null,\n    \"to_be_deleted\": false,\n    \"other_data\": {}\n}\n\n</code></pre><h3 id=\"response-fields\">Response Fields</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Type</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>id</code></td>\n<td>string</td>\n<td>Internal system UUID for the contact</td>\n</tr>\n<tr>\n<td><code>contact_id</code></td>\n<td>string</td>\n<td>Unique identifier for the contact (caller-provided or auto-generated)</td>\n</tr>\n<tr>\n<td><code>name</code></td>\n<td>string</td>\n<td>First name of the contact</td>\n</tr>\n<tr>\n<td><code>surname</code></td>\n<td>string</td>\n<td>Last name of the contact (nullable)</td>\n</tr>\n<tr>\n<td><code>full_name</code></td>\n<td>string</td>\n<td>Computed full name of the contact (nullable)</td>\n</tr>\n<tr>\n<td><code>customer_id</code></td>\n<td>string</td>\n<td>Unique identifier of the associated customer</td>\n</tr>\n<tr>\n<td><code>customer_name</code></td>\n<td>string</td>\n<td>Name of the associated customer (nullable)</td>\n</tr>\n<tr>\n<td><code>customer_is_active</code></td>\n<td>boolean</td>\n<td>Whether the associated customer is active</td>\n</tr>\n<tr>\n<td><code>contact_type</code></td>\n<td>string</td>\n<td>Type/category of the contact (nullable)</td>\n</tr>\n<tr>\n<td><code>position</code></td>\n<td>string</td>\n<td>Job position or role of the contact (nullable)</td>\n</tr>\n<tr>\n<td><code>emails</code></td>\n<td>array[Email]</td>\n<td>List of email addresses</td>\n</tr>\n<tr>\n<td><code>phone_numbers</code></td>\n<td>array[PhoneNumber]</td>\n<td>List of phone numbers</td>\n</tr>\n<tr>\n<td><code>address</code></td>\n<td>Address</td>\n<td>Physical address information (nullable)</td>\n</tr>\n<tr>\n<td><code>custom_fields</code></td>\n<td>array[CustomFieldInstance]</td>\n<td>Custom field values</td>\n</tr>\n<tr>\n<td><code>external_id</code></td>\n<td>string</td>\n<td>External system identifier (nullable)</td>\n</tr>\n<tr>\n<td><code>representative_ids</code></td>\n<td>array[string]</td>\n<td>IDs of associated sales representatives</td>\n</tr>\n<tr>\n<td><code>visibility_ids</code></td>\n<td>array[string]</td>\n<td>IDs of users/teams who can view this contact (nullable)</td>\n</tr>\n<tr>\n<td><code>representative_ids_synced</code></td>\n<td>boolean</td>\n<td>Whether representative IDs are synchronized with customer</td>\n</tr>\n<tr>\n<td><code>visibility_ids_synced</code></td>\n<td>boolean</td>\n<td>Whether visibility IDs are synchronized with customer</td>\n</tr>\n<tr>\n<td><code>bill_to_id</code></td>\n<td>string</td>\n<td>Associated billing account ID (nullable)</td>\n</tr>\n<tr>\n<td><code>from_lead</code></td>\n<td>boolean</td>\n<td>Whether contact was created from a lead conversion</td>\n</tr>\n<tr>\n<td><code>lead_id</code></td>\n<td>string</td>\n<td>If from_lead is true, the original lead ID (nullable)</td>\n</tr>\n<tr>\n<td><code>last_edited_date</code></td>\n<td>datetime</td>\n<td>Timestamp of last modification</td>\n</tr>\n<tr>\n<td><code>last_ingested_date</code></td>\n<td>datetime</td>\n<td>Timestamp of last sync from external system (nullable)</td>\n</tr>\n<tr>\n<td><code>to_be_deleted</code></td>\n<td>boolean</td>\n<td>Soft delete flag</td>\n</tr>\n<tr>\n<td><code>other_data</code></td>\n<td>object</td>\n<td>Flexible storage for additional unstructured data</td>\n</tr>\n</tbody>\n</table>\n</div><h2 id=\"error-responses\">Error Responses</h2>\n<h3 id=\"400-bad-request\">400 Bad Request</h3>\n<p>Returned when the request is malformed, contains invalid parameters, or when a contact with the specified <code>contact_id</code> already exists.</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"status_message\": \"error\",\n    \"error\": {\n        \"code\": \"INVALID_REQUEST\",\n        \"message\": \"Missing required field 'name'\"\n    }\n}\n\n</code></pre>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"status_message\": \"error\",\n    \"error\": {\n        \"code\": \"INVALID_REQUEST\",\n        \"message\": \"Invalid email format in emails[0]\"\n    }\n}\n\n</code></pre>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"status_message\": \"error\",\n    \"error\": {\n        \"code\": \"BAD_REQUEST\",\n        \"message\": \"Contact with contact_id 'CONTACT-78901' already exists\"\n    }\n}\n\n</code></pre>\n<h3 id=\"401-unauthorized\">401 Unauthorized</h3>\n<p>Returned when authentication fails or is missing.</p>\n<h3 id=\"404-not-found\">404 Not Found</h3>\n<p>Returned when the specified company or customer_id does not exist.</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"status_message\": \"error\",\n    \"error\": {\n        \"code\": \"NOT_FOUND\",\n        \"message\": \"Customer with ID 'CUST-12345' not found\"\n    }\n}\n\n</code></pre>\n<h3 id=\"500-internal-server-error\">500 Internal Server Error</h3>\n<p>Returned when an unexpected error occurs on the server.</p>\n<h2 id=\"best-practices\">Best Practices</h2>\n<ol>\n<li><p><strong>Provide a customer_id</strong>: Every contact must be associated with a customer. Ensure the customer exists before creating the contact</p>\n</li>\n<li><p><strong>Use meaningful contact_id</strong>: When providing a custom <code>contact_id</code>, use a consistent naming convention that makes sense for your organization. This is especially useful when integrating with external systems</p>\n</li>\n<li><p><strong>Include complete contact information</strong>: Providing emails and phone_numbers enables better communication tracking and searchability</p>\n</li>\n<li><p><strong>Leverage contact_type</strong>: Use consistent contact types (e.g., \"primary\", \"billing\", \"technical\", \"executive\") to categorize contacts effectively</p>\n</li>\n<li><p><strong>Use external_id for integrations</strong>: When syncing from external systems, always populate external_id to maintain traceability</p>\n</li>\n<li><p><strong>Handle duplicates</strong>: Check if a contact already exists before creating to avoid duplicates. Use the search endpoint first if needed</p>\n</li>\n</ol>\n<h2 id=\"notes\">Notes</h2>\n<ul>\n<li><p>The <code>contact_id</code> field can be explicitly set by the caller to use a custom identifier. This is useful when integrating with external systems that have their own contact IDs. If not provided, the system generates a UUID that will be used as both the internal <code>id</code> and the <code>contact_id</code></p>\n</li>\n<li><p>The <code>last_edited_date</code> defaults to the current UTC timestamp if not provided</p>\n</li>\n<li><p>Fields <code>representative_ids</code> and <code>visibility_ids</code> are typically managed by the system based on customer associations</p>\n</li>\n<li><p>Empty nested objects (emails, phone_numbers, address) can be omitted from the request</p>\n</li>\n<li><p>The <code>other_data</code> field can be used to store additional unstructured information not covered by standard fields</p>\n</li>\n</ul>\n","urlObject":{"path":["{{company}}","v1","contacts"],"host":["{{domain}}"],"query":[],"variable":[]}},"response":[{"id":"63c7d539-88cc-42f9-a4fd-73c960027972","name":"Create Contact V1","originalRequest":{"method":"POST","header":[{"key":"X-User-Id","value":"{{user_id}}","type":"text"},{"key":"X-Company","value":"{{company}}","type":"text"},{"key":"X-Api-Key","value":"{{api_key}}","type":"text"},{"key":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\n    \"name\": \"John\",\n    \"surname\": \"Smith\",\n    \"customer_id\": \"CUST-12345\",\n    \"contact_id\": \"CONTACT-78901\",\n    \"contact_type\": \"primary\",\n    \"position\": \"Operations Manager\",\n    \"emails\": [\n        { \"email\": \"john.smith@abcmanufacturing.com\" },\n        { \"email\": \"jsmith@personal.com\" }\n    ],\n    \"phone_numbers\": [\n        { \"phone_number\": \"+1-555-0123\", \"type\": \"office\" },\n        { \"phone_number\": \"+1-555-0456\", \"type\": \"mobile\" }\n    ],\n    \"address\": {\n        \"street_address\": \"789 Industrial Blvd\",\n        \"street_address_2\": \"Suite 100\",\n        \"city\": \"Chicago\",\n        \"state\": \"IL\",\n        \"country\": \"US\",\n        \"zip_code\": \"60601\"\n    },\n    \"notes\": \"Primary contact for all operational matters\",\n    \"custom_fields\": [\n        { \"field_id\": \"department\", \"value\": \"Operations\" },\n        { \"field_id\": \"preferred_contact_method\", \"value\": \"email\" }\n    ],\n    \"external_id\": \"ERP-CONTACT-78901\"\n}","options":{"raw":{"language":"json"}}},"url":"{{domain}}/{{company}}/v1/contacts"},"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json","description":"","type":"text"}],"cookie":[{"expires":"Invalid Date","domain":"","path":""}],"responseTime":null,"body":"{\n    \"id\": \"550e8400-e29b-41d4-a716-446655440000\",\n    \"contact_id\": \"CONTACT-78901\",\n    \"name\": \"John\",\n    \"surname\": \"Smith\",\n    \"full_name\": \"John Smith\",\n    \"customer_id\": \"CUST-12345\",\n    \"customer_name\": \"ABC Manufacturing Corp\",\n    \"customer_is_active\": true,\n    \"contact_type\": \"primary\",\n    \"position\": \"Operations Manager\",\n    \"emails\": [\n        {\n            \"email\": \"john.smith@abcmanufacturing.com\"\n        },\n        {\n            \"email\": \"jsmith@personal.com\"\n        }\n    ],\n    \"phone_numbers\": [\n        {\n            \"phone_number\": \"+1-555-0123\",\n            \"type\": \"office\"\n        },\n        {\n            \"phone_number\": \"+1-555-0456\",\n            \"type\": \"mobile\"\n        }\n    ],\n    \"address\": {\n        \"street_address\": \"789 Industrial Blvd\",\n        \"street_address_2\": \"Suite 100\",\n        \"street_address_3\": \"\",\n        \"apartment\": \"\",\n        \"city\": \"Chicago\",\n        \"state\": \"IL\",\n        \"country\": \"US\",\n        \"zip_code\": \"60601\"\n    },\n    \"custom_fields\": [\n        {\n            \"field_id\": \"department\",\n            \"value\": \"Operations\"\n        },\n        {\n            \"field_id\": \"preferred_contact_method\",\n            \"value\": \"email\"\n        }\n    ],\n    \"external_id\": \"ERP-CONTACT-78901\",\n    \"representative_ids\": [],\n    \"visibility_ids\": null,\n    \"representative_ids_synced\": false,\n    \"visibility_ids_synced\": false,\n    \"bill_to_id\": null,\n    \"from_lead\": false,\n    \"lead_id\": null,\n    \"last_edited_date\": \"2025-01-19T15:30:45Z\",\n    \"last_ingested_date\": null,\n    \"to_be_deleted\": false,\n    \"other_data\": {}\n}"}],"_postman_id":"5a1fad9e-5204-4969-947f-12bd6607af64"},{"name":"Get Contact V1","id":"1280ff83-2793-4169-9cb0-8952f34db911","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"X-User-Id","value":"{{user_id}}","type":"text"},{"key":"X-Company","value":"{{company}}","type":"text"},{"key":"X-Api-Key","value":"{{api_key}}","type":"text"}],"url":"{{domain}}/{{company}}/v1/contacts/{identifier}","description":"<h1 id=\"contact-get-api-v1\">Contact Get API v1</h1>\n<h2 id=\"overview\">Overview</h2>\n<p>The Contact Get API v1 endpoint allows you to retrieve a single contact by its identifier within a specific company. The endpoint returns comprehensive contact information including basic details, contact methods, customer associations, and activity counts (calls, emails, quotes, orders). Contacts represent individual people associated with customers, including their roles, contact information, and relationship details.</p>\n<h2 id=\"endpoint\">Endpoint</h2>\n<p><strong>Method</strong>: <code>GET</code><br /><strong>URL</strong>: <code>{{domain}}/{{company}}/v1/contacts/{{identifier}}</code></p>\n<h2 id=\"request-format\">Request Format</h2>\n<h3 id=\"url-parameters\">URL Parameters</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Parameter</th>\n<th>Type</th>\n<th>Required</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>company</code></td>\n<td>string</td>\n<td>Yes</td>\n<td>The company identifier for multi-tenant data isolation</td>\n</tr>\n<tr>\n<td><code>identifier</code></td>\n<td>string</td>\n<td>Yes</td>\n<td>The contact identifier. Can be either the <code>contact_id</code> (external ID) or <code>id</code> (internal UUID)</td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"example-urls\">Example URLs</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>GET /acme-corp/v1/contacts/CONTACT-78901\nGET /acme-corp/v1/contacts/550e8400-e29b-41d4-a716-446655440000\n\n</code></pre><h2 id=\"example-request\">Example Request</h2>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>curl -X GET \"https://api.proton.ai/acme-corp/v1/contacts/550e8400-e29b-41d4-a716-446655440000\" \\\n  -H \"Authorization: Bearer &lt;token&gt;\"\n\n</code></pre><h2 id=\"response-format\">Response Format</h2>\n<h3 id=\"success-response-200-ok\">Success Response (200 OK)</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"id\": \"550e8400-e29b-41d4-a716-446655440000\",\n    \"contact_id\": \"CONTACT-78901\",\n    \"name\": \"John\",\n    \"surname\": \"Smith\",\n    \"full_name\": \"John Smith\",\n    \"customer_id\": \"CUST-12345\",\n    \"customer_name\": \"ABC Manufacturing Corp\",\n    \"customer_is_active\": true,\n    \"contact_type\": \"primary\",\n    \"position\": \"Operations Manager\",\n    \"emails\": [\n        { \"email\": \"john.smith@abcmanufacturing.com\" },\n        { \"email\": \"jsmith@personal.com\" }\n    ],\n    \"phone_numbers\": [\n        { \"phone_number\": \"+1-555-0123\", \"type\": \"office\" },\n        { \"phone_number\": \"+1-555-0456\", \"type\": \"mobile\" }\n    ],\n    \"address\": {\n        \"street_address\": \"789 Industrial Blvd\",\n        \"street_address_2\": \"Suite 100\",\n        \"street_address_3\": \"\",\n        \"apartment\": \"\",\n        \"city\": \"Chicago\",\n        \"state\": \"IL\",\n        \"country\": \"US\",\n        \"zip_code\": \"60601\"\n    },\n    \"notes\": \"Primary contact for all operational matters\",\n    \"custom_fields\": [\n        { \"field_id\": \"department\", \"value\": \"Operations\" },\n        { \"field_id\": \"preferred_contact_method\", \"value\": \"email\" }\n    ],\n    \"external_id\": \"ERP-CONTACT-78901\",\n    \"representative_ids\": [\"user-123\", \"user-456\"],\n    \"visibility_ids\": [\"team-sales\"],\n    \"representative_ids_synced\": true,\n    \"visibility_ids_synced\": true,\n    \"bill_to_id\": null,\n    \"from_lead\": false,\n    \"lead_id\": null,\n    \"last_edited_date\": \"2025-01-19T15:30:45Z\",\n    \"last_ingested_date\": \"2025-01-15T10:00:00Z\",\n    \"to_be_deleted\": false,\n    \"other_data\": {},\n    \"calls_count\": 12,\n    \"emails_count\": 47,\n    \"quotes_count\": 3,\n    \"orders_count\": 8\n}\n\n</code></pre>\n<h3 id=\"response-fields\">Response Fields</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Type</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>id</code></td>\n<td>string</td>\n<td>Internal system UUID for the contact</td>\n</tr>\n<tr>\n<td><code>contact_id</code></td>\n<td>string</td>\n<td>Unique identifier for the contact (user-provided or auto-generated)</td>\n</tr>\n<tr>\n<td><code>name</code></td>\n<td>string</td>\n<td>First name of the contact (nullable)</td>\n</tr>\n<tr>\n<td><code>surname</code></td>\n<td>string</td>\n<td>Last name of the contact (nullable)</td>\n</tr>\n<tr>\n<td><code>full_name</code></td>\n<td>string</td>\n<td>Computed full name of the contact (nullable)</td>\n</tr>\n<tr>\n<td><code>customer_id</code></td>\n<td>string</td>\n<td>Unique identifier of the associated customer (nullable)</td>\n</tr>\n<tr>\n<td><code>customer_name</code></td>\n<td>string</td>\n<td>Name of the associated customer (nullable)</td>\n</tr>\n<tr>\n<td><code>customer_is_active</code></td>\n<td>boolean</td>\n<td>Whether the associated customer is active (nullable)</td>\n</tr>\n<tr>\n<td><code>contact_type</code></td>\n<td>string</td>\n<td>Type/category of the contact (nullable)</td>\n</tr>\n<tr>\n<td><code>position</code></td>\n<td>string</td>\n<td>Job position or role of the contact (nullable)</td>\n</tr>\n<tr>\n<td><code>emails</code></td>\n<td>array[Email]</td>\n<td>List of email addresses</td>\n</tr>\n<tr>\n<td><code>phone_numbers</code></td>\n<td>array[PhoneNumber]</td>\n<td>List of phone numbers</td>\n</tr>\n<tr>\n<td><code>address</code></td>\n<td>Address</td>\n<td>Physical address information (nullable)</td>\n</tr>\n<tr>\n<td><code>notes</code></td>\n<td>string</td>\n<td>Internal notes or comments about the contact (nullable)</td>\n</tr>\n<tr>\n<td><code>custom_fields</code></td>\n<td>array[CustomFieldInstance]</td>\n<td>Custom field values</td>\n</tr>\n<tr>\n<td><code>external_id</code></td>\n<td>string</td>\n<td>External system identifier (nullable)</td>\n</tr>\n<tr>\n<td><code>representative_ids</code></td>\n<td>array[string]</td>\n<td>IDs of associated sales representatives (nullable)</td>\n</tr>\n<tr>\n<td><code>visibility_ids</code></td>\n<td>array[string]</td>\n<td>IDs of users/teams who can view this contact (nullable)</td>\n</tr>\n<tr>\n<td><code>representative_ids_synced</code></td>\n<td>boolean</td>\n<td>Whether representative IDs are synchronized with customer (nullable)</td>\n</tr>\n<tr>\n<td><code>visibility_ids_synced</code></td>\n<td>boolean</td>\n<td>Whether visibility IDs are synchronized with customer (nullable)</td>\n</tr>\n<tr>\n<td><code>bill_to_id</code></td>\n<td>string</td>\n<td>Associated billing account ID (nullable)</td>\n</tr>\n<tr>\n<td><code>from_lead</code></td>\n<td>boolean</td>\n<td>Whether contact was created from a lead conversion (nullable)</td>\n</tr>\n<tr>\n<td><code>lead_id</code></td>\n<td>string</td>\n<td>If from_lead is true, the original lead ID (nullable)</td>\n</tr>\n<tr>\n<td><code>last_edited_date</code></td>\n<td>datetime</td>\n<td>Timestamp of last modification (nullable)</td>\n</tr>\n<tr>\n<td><code>last_ingested_date</code></td>\n<td>datetime</td>\n<td>Timestamp of last sync from external system (nullable)</td>\n</tr>\n<tr>\n<td><code>to_be_deleted</code></td>\n<td>boolean</td>\n<td>Soft delete flag (nullable)</td>\n</tr>\n<tr>\n<td><code>other_data</code></td>\n<td>object</td>\n<td>Flexible storage for additional unstructured data (nullable)</td>\n</tr>\n<tr>\n<td><code>calls_count</code></td>\n<td>integer</td>\n<td>Total number of calls associated with this contact</td>\n</tr>\n<tr>\n<td><code>emails_count</code></td>\n<td>integer</td>\n<td>Total number of emails associated with this contact</td>\n</tr>\n<tr>\n<td><code>quotes_count</code></td>\n<td>integer</td>\n<td>Total number of quotes associated with this contact</td>\n</tr>\n<tr>\n<td><code>orders_count</code></td>\n<td>integer</td>\n<td>Total number of orders associated with this contact</td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"nested-object-definitions\">Nested Object Definitions</h3>\n<h4 id=\"email-object\">Email Object</h4>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Type</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>email</code></td>\n<td>string</td>\n<td>Email address</td>\n</tr>\n</tbody>\n</table>\n</div><h4 id=\"phonenumber-object\">PhoneNumber Object</h4>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Type</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>phone_number</code></td>\n<td>string</td>\n<td>Phone number</td>\n</tr>\n<tr>\n<td><code>type</code></td>\n<td>string</td>\n<td>Type of phone number (e.g., \"mobile\", \"office\", \"home\")</td>\n</tr>\n</tbody>\n</table>\n</div><h4 id=\"address-object\">Address Object</h4>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Type</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>street_address</code></td>\n<td>string</td>\n<td>Primary street address</td>\n</tr>\n<tr>\n<td><code>street_address_2</code></td>\n<td>string</td>\n<td>Additional street address line</td>\n</tr>\n<tr>\n<td><code>street_address_3</code></td>\n<td>string</td>\n<td>Additional street address line</td>\n</tr>\n<tr>\n<td><code>apartment</code></td>\n<td>string</td>\n<td>Apartment, suite, or unit number</td>\n</tr>\n<tr>\n<td><code>city</code></td>\n<td>string</td>\n<td>City name</td>\n</tr>\n<tr>\n<td><code>state</code></td>\n<td>string</td>\n<td>State or province</td>\n</tr>\n<tr>\n<td><code>country</code></td>\n<td>string</td>\n<td>Country name or code</td>\n</tr>\n<tr>\n<td><code>zip_code</code></td>\n<td>string</td>\n<td>Postal or ZIP code</td>\n</tr>\n</tbody>\n</table>\n</div><h4 id=\"customfieldinstance-object\">CustomFieldInstance Object</h4>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Type</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>field_id</code></td>\n<td>string</td>\n<td>The identifier of the custom field</td>\n</tr>\n<tr>\n<td><code>value</code></td>\n<td>any</td>\n<td>The value for the custom field</td>\n</tr>\n</tbody>\n</table>\n</div><h2 id=\"error-responses\">Error Responses</h2>\n<h3 id=\"400-bad-request\">400 Bad Request</h3>\n<p>Returned when the request is malformed or the identifier is missing.</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>{\n    \"status_message\": \"error\",\n    \"error\": {\n        \"code\": \"BAD_REQUEST\",\n        \"message\": \"Either contact_id or id must be provided\"\n    }\n}\n\n</code></pre><h3 id=\"401-unauthorized\">401 Unauthorized</h3>\n<p>Returned when authentication fails or is missing.</p>\n<h3 id=\"404-not-found\">404 Not Found</h3>\n<p>Returned when the specified contact does not exist.</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>{\n    \"status_message\": \"error\",\n    \"error\": {\n        \"code\": \"NOT_FOUND\",\n        \"message\": \"Contact with id 'CONTACT-99999' does not exist\"\n    }\n}\n\n</code></pre><h3 id=\"500-internal-server-error\">500 Internal Server Error</h3>\n<p>Returned when an unexpected error occurs on the server.</p>\n<h2 id=\"best-practices\">Best Practices</h2>\n<ol>\n<li><p><strong>Use the appropriate identifier</strong>: You can use either the <code>contact_id</code> (external/custom ID) or the internal <code>id</code> (UUID). Both will work with this endpoint</p>\n</li>\n<li><p><strong>Handle nullable fields</strong>: Many fields in the response are nullable. Always check for null values before processing</p>\n</li>\n<li><p><strong>Check customer association</strong>: Use <code>customer_id</code> and <code>customer_is_active</code> to understand the contact's relationship with their associated customer</p>\n</li>\n</ol>\n<h2 id=\"notes\">Notes</h2>\n<ul>\n<li><p>The <code>identifier</code> path parameter accepts both <code>contact_id</code> (external ID) and <code>id</code> (internal UUID). The system will attempt to find the contact using either identifier</p>\n</li>\n<li><p>Activity counts (<code>calls_count</code>, <code>emails_count</code>, <code>quotes_count</code>, <code>orders_count</code>) are calculated in real-time and reflect the current state of associated records</p>\n</li>\n<li><p>The <code>notes</code> field contains internal notes about the contact that may not be suitable for external display (used in html rich-text-editor format)</p>\n</li>\n<li><p>Representative and visibility IDs control access permissions within the organization</p>\n</li>\n</ul>\n","urlObject":{"path":["{{company}}","v1","contacts","{identifier}"],"host":["{{domain}}"],"query":[],"variable":[]}},"response":[{"id":"3cd27dff-0b19-466f-b1e4-db36792c8d39","name":"Get Contact V1","originalRequest":{"method":"GET","header":[{"key":"X-User-Id","value":"{{user_id}}","type":"text"},{"key":"X-Company","value":"{{company}}","type":"text"},{"key":"X-Api-Key","value":"{{api_key}}","type":"text"},{"key":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"","options":{"raw":{"language":"json"}}},"url":"{{domain}}/{{company}}/v1/contacts/550e8400-e29b-41d4-a716-446655440000"},"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json","description":"","type":"text"}],"cookie":[{"expires":"Invalid Date","domain":"","path":""}],"responseTime":null,"body":"{\n    \"id\": \"550e8400-e29b-41d4-a716-446655440000\",\n    \"contact_id\": \"CONTACT-78901\",\n    \"name\": \"John\",\n    \"surname\": \"Smith\",\n    \"full_name\": \"John Smith\",\n    \"customer_id\": \"CUST-12345\",\n    \"customer_name\": \"ABC Manufacturing Corp\",\n    \"customer_is_active\": true,\n    \"contact_type\": \"primary\",\n    \"position\": \"Operations Manager\",\n    \"emails\": [\n        {\n            \"email\": \"john.smith@abcmanufacturing.com\"\n        },\n        {\n            \"email\": \"jsmith@personal.com\"\n        }\n    ],\n    \"phone_numbers\": [\n        {\n            \"phone_number\": \"+1-555-0123\",\n            \"type\": \"office\"\n        },\n        {\n            \"phone_number\": \"+1-555-0456\",\n            \"type\": \"mobile\"\n        }\n    ],\n    \"address\": {\n        \"street_address\": \"789 Industrial Blvd\",\n        \"street_address_2\": \"Suite 100\",\n        \"street_address_3\": \"\",\n        \"apartment\": \"\",\n        \"city\": \"Chicago\",\n        \"state\": \"IL\",\n        \"country\": \"US\",\n        \"zip_code\": \"60601\"\n    },\n    \"notes\": \"Primary contact for all operational matters\",\n    \"custom_fields\": [\n        {\n            \"field_id\": \"department\",\n            \"value\": \"Operations\"\n        },\n        {\n            \"field_id\": \"preferred_contact_method\",\n            \"value\": \"email\"\n        }\n    ],\n    \"external_id\": \"ERP-CONTACT-78901\",\n    \"representative_ids\": [\n        \"user-123\",\n        \"user-456\"\n    ],\n    \"visibility_ids\": [\n        \"team-sales\"\n    ],\n    \"representative_ids_synced\": true,\n    \"visibility_ids_synced\": true,\n    \"bill_to_id\": null,\n    \"from_lead\": false,\n    \"lead_id\": null,\n    \"last_edited_date\": \"2025-01-19T15:30:45Z\",\n    \"last_ingested_date\": \"2025-01-15T10:00:00Z\",\n    \"to_be_deleted\": false,\n    \"other_data\": {},\n    \"calls_count\": 12,\n    \"emails_count\": 47,\n    \"quotes_count\": 3,\n    \"orders_count\": 8\n}"}],"_postman_id":"1280ff83-2793-4169-9cb0-8952f34db911"},{"name":"Edit Contact V1","id":"ad9dd5fd-7761-4c9e-832b-e9d0998d1632","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"PUT","header":[{"key":"X-User-Id","value":"{{user_id}}","type":"text"},{"key":"X-Company","value":"{{company}}","type":"text"},{"key":"X-Api-Key","value":"{{api_key}}","type":"text"},{"key":"Content-Type","value":"application/json","type":"text"}],"url":"{{domain}}/{{company}}/v1/contacts/{identifier}","description":"<h1 id=\"contact-edit-api-v1\">Contact Edit API v1</h1>\n<h2 id=\"overview\">Overview</h2>\n<p>The Contact Edit API v1 endpoint allows you to update an existing contact within a specific company. This endpoint supports partial updates, meaning you only need to provide the fields you want to change. Contacts represent individual people associated with customers, including their roles, contact information, and relationship details.</p>\n<h2 id=\"endpoint\">Endpoint</h2>\n<p><strong>Method</strong>: <code>PUT</code><br /><strong>URL</strong>: <code>{{domain}}/{{company}}/v1/contacts/{{identifier}}</code></p>\n<h2 id=\"request-format\">Request Format</h2>\n<h3 id=\"url-parameters\">URL Parameters</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Parameter</th>\n<th>Type</th>\n<th>Required</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>company</code></td>\n<td>string</td>\n<td>Yes</td>\n<td>The company identifier for multi-tenant data isolation</td>\n</tr>\n<tr>\n<td><code>identifier</code></td>\n<td>string</td>\n<td>Yes</td>\n<td>The contact identifier. Can be either the <code>contact_id</code> (external ID) or <code>id</code> (internal UUID)</td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"request-body-structure\">Request Body Structure</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"contact_id\": \"string\",\n    \"name\": \"string\",\n    \"surname\": \"string\",\n    \"contact_type\": \"string\",\n    \"position\": \"string\",\n    \"emails\": [\n        {\n            \"email\": \"string\"\n        }\n    ],\n    \"phone_numbers\": [\n        {\n            \"phone_number\": \"string\",\n            \"type\": \"string\"\n        }\n    ],\n    \"address\": {\n        \"street_address\": \"string\",\n        \"street_address_2\": \"string\",\n        \"street_address_3\": \"string\",\n        \"apartment\": \"string\",\n        \"city\": \"string\",\n        \"state\": \"string\",\n        \"country\": \"string\",\n        \"zip_code\": \"string\"\n    },\n    \"notes\": \"string\",\n    \"custom_fields\": [\n        {\n            \"field_id\": \"string\",\n            \"value\": \"any\"\n        }\n    ],\n    \"external_id\": \"string\",\n    \"last_edited_date\": \"string\"\n}\n\n</code></pre>\n<h3 id=\"request-body-parameters\">Request Body Parameters</h3>\n<p>All body parameters are optional, but <strong>at least one editable field must be provided</strong>.</p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Parameter</th>\n<th>Type</th>\n<th>Required</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>contact_id</code></td>\n<td>string</td>\n<td>No</td>\n<td>Update the external contact identifier. Useful when migrating or renaming contact IDs</td>\n</tr>\n<tr>\n<td><code>name</code></td>\n<td>string</td>\n<td>No</td>\n<td>First name of the contact</td>\n</tr>\n<tr>\n<td><code>surname</code></td>\n<td>string</td>\n<td>No</td>\n<td>Last name of the contact</td>\n</tr>\n<tr>\n<td><code>contact_type</code></td>\n<td>string</td>\n<td>No</td>\n<td>The type/category of the contact (e.g., \"primary\", \"billing\", \"technical\")</td>\n</tr>\n<tr>\n<td><code>position</code></td>\n<td>string</td>\n<td>No</td>\n<td>Job title or role of the contact</td>\n</tr>\n<tr>\n<td><code>emails</code></td>\n<td>array[Email]</td>\n<td>No</td>\n<td>List of email addresses. <strong>Replaces all existing emails</strong></td>\n</tr>\n<tr>\n<td><code>phone_numbers</code></td>\n<td>array[PhoneNumber]</td>\n<td>No</td>\n<td>List of phone numbers. <strong>Replaces all existing phone numbers</strong></td>\n</tr>\n<tr>\n<td><code>address</code></td>\n<td>Address</td>\n<td>No</td>\n<td>Physical address information. <strong>Replaces entire address</strong></td>\n</tr>\n<tr>\n<td><code>notes</code></td>\n<td>string</td>\n<td>No</td>\n<td>Internal notes or comments about the contact</td>\n</tr>\n<tr>\n<td><code>custom_fields</code></td>\n<td>array[CustomFieldInstance]</td>\n<td>No</td>\n<td>Custom field values. <strong>Replaces all existing custom fields</strong></td>\n</tr>\n<tr>\n<td><code>external_id</code></td>\n<td>string</td>\n<td>No</td>\n<td>Identifier from an external system</td>\n</tr>\n<tr>\n<td><code>last_edited_date</code></td>\n<td>string</td>\n<td>No</td>\n<td>ISO 8601 timestamp. Defaults to current UTC time if not provided</td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"nested-object-definitions\">Nested Object Definitions</h3>\n<h4 id=\"email-object\">Email Object</h4>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Type</th>\n<th>Required</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>email</code></td>\n<td>string</td>\n<td>Yes</td>\n<td>Email address</td>\n</tr>\n</tbody>\n</table>\n</div><h4 id=\"phonenumber-object\">PhoneNumber Object</h4>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Type</th>\n<th>Required</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>phone_number</code></td>\n<td>string</td>\n<td>Yes</td>\n<td>Phone number</td>\n</tr>\n<tr>\n<td><code>type</code></td>\n<td>string</td>\n<td>No</td>\n<td>Type of phone number (e.g., \"mobile\", \"office\", \"home\")</td>\n</tr>\n</tbody>\n</table>\n</div><h4 id=\"address-object\">Address Object</h4>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Type</th>\n<th>Required</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>street_address</code></td>\n<td>string</td>\n<td>No</td>\n<td>Primary street address</td>\n</tr>\n<tr>\n<td><code>street_address_2</code></td>\n<td>string</td>\n<td>No</td>\n<td>Additional street address line</td>\n</tr>\n<tr>\n<td><code>street_address_3</code></td>\n<td>string</td>\n<td>No</td>\n<td>Additional street address line</td>\n</tr>\n<tr>\n<td><code>apartment</code></td>\n<td>string</td>\n<td>No</td>\n<td>Apartment, suite, or unit number</td>\n</tr>\n<tr>\n<td><code>city</code></td>\n<td>string</td>\n<td>No</td>\n<td>City name</td>\n</tr>\n<tr>\n<td><code>state</code></td>\n<td>string</td>\n<td>No</td>\n<td>State or province</td>\n</tr>\n<tr>\n<td><code>country</code></td>\n<td>string</td>\n<td>No</td>\n<td>Country name or code</td>\n</tr>\n<tr>\n<td><code>zip_code</code></td>\n<td>string</td>\n<td>No</td>\n<td>Postal or ZIP code</td>\n</tr>\n</tbody>\n</table>\n</div><h4 id=\"customfieldinstance-object\">CustomFieldInstance Object</h4>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Type</th>\n<th>Required</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>field_id</code></td>\n<td>string</td>\n<td>Yes</td>\n<td>The identifier of the custom field</td>\n</tr>\n<tr>\n<td><code>value</code></td>\n<td>any</td>\n<td>Yes</td>\n<td>The value for the custom field</td>\n</tr>\n</tbody>\n</table>\n</div><h2 id=\"example-requests\">Example Requests</h2>\n<h3 id=\"update-basic-information\">Update Basic Information</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">PUT /acme-corp/v1/contacts/CONTACT-78901\n{\n    \"name\": \"Jonathan\",\n    \"position\": \"Senior Operations Manager\"\n}\n\n</code></pre>\n<p>This request updates only the name and position fields, leaving all other fields unchanged.</p>\n<h3 id=\"update-contact-information\">Update Contact Information</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">PUT /acme-corp/v1/contacts/CONTACT-78901\n{\n    \"emails\": [\n        { \"email\": \"jonathan.smith@abcmanufacturing.com\" },\n        { \"email\": \"j.smith@personal.com\" }\n    ],\n    \"phone_numbers\": [\n        { \"phone_number\": \"+1-555-9999\", \"type\": \"office\" },\n        { \"phone_number\": \"+1-555-8888\", \"type\": \"mobile\" }\n    ],\n    \"address\": {\n        \"street_address\": \"456 Corporate Plaza\",\n        \"city\": \"New York\",\n        \"state\": \"NY\",\n        \"country\": \"US\",\n        \"zip_code\": \"10001\"\n    }\n}\n\n</code></pre>\n<p>This request replaces all emails, phone numbers, and the address.</p>\n<h3 id=\"change-contact_id\">Change contact_id</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">PUT /acme-corp/v1/contacts/CONTACT-78901\n{\n    \"contact_id\": \"CONTACT-NEW-ID-123\"\n}\n\n</code></pre>\n<p>This request changes the external contact_id. The internal <code>id</code> (UUID) remains unchanged.</p>\n<h2 id=\"response-format\">Response Format</h2>\n<h3 id=\"success-response-200-ok\">Success Response (200 OK)</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"id\": \"550e8400-e29b-41d4-a716-446655440000\",\n    \"contact_id\": \"CONTACT-78901\",\n    \"name\": \"Jonathan\",\n    \"surname\": \"Smith\",\n    \"full_name\": \"Jonathan Smith\",\n    \"customer_id\": \"CUST-12345\",\n    \"customer_name\": \"ABC Manufacturing Corp\",\n    \"customer_is_active\": true,\n    \"contact_type\": \"primary\",\n    \"position\": \"Senior Operations Manager\",\n    \"emails\": [\n        { \"email\": \"jonathan.smith@abcmanufacturing.com\" },\n        { \"email\": \"j.smith@personal.com\" }\n    ],\n    \"phone_numbers\": [\n        { \"phone_number\": \"+1-555-9999\", \"type\": \"office\" },\n        { \"phone_number\": \"+1-555-8888\", \"type\": \"mobile\" }\n    ],\n    \"address\": {\n        \"street_address\": \"456 Corporate Plaza\",\n        \"street_address_2\": \"\",\n        \"street_address_3\": \"\",\n        \"apartment\": \"\",\n        \"city\": \"New York\",\n        \"state\": \"NY\",\n        \"country\": \"US\",\n        \"zip_code\": \"10001\"\n    },\n    \"notes\": \"Primary contact for all operational matters\",\n    \"custom_fields\": [\n        { \"field_id\": \"department\", \"value\": \"Operations\" }\n    ],\n    \"external_id\": \"ERP-CONTACT-78901\",\n    \"representative_ids\": [\"user-123\", \"user-456\"],\n    \"visibility_ids\": [\"team-sales\"],\n    \"representative_ids_synced\": true,\n    \"visibility_ids_synced\": true,\n    \"bill_to_id\": null,\n    \"from_lead\": false,\n    \"lead_id\": null,\n    \"last_edited_date\": \"2025-01-19T16:45:30Z\",\n    \"last_ingested_date\": \"2025-01-15T10:00:00Z\",\n    \"to_be_deleted\": false,\n    \"other_data\": {}\n}\n\n</code></pre>\n<h3 id=\"response-fields\">Response Fields</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Type</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>id</code></td>\n<td>string</td>\n<td>Internal system UUID for the contact</td>\n</tr>\n<tr>\n<td><code>contact_id</code></td>\n<td>string</td>\n<td>Unique identifier for the contact (user-provided or auto-generated)</td>\n</tr>\n<tr>\n<td><code>name</code></td>\n<td>string</td>\n<td>First name of the contact (nullable)</td>\n</tr>\n<tr>\n<td><code>surname</code></td>\n<td>string</td>\n<td>Last name of the contact (nullable)</td>\n</tr>\n<tr>\n<td><code>full_name</code></td>\n<td>string</td>\n<td>Computed full name of the contact (nullable)</td>\n</tr>\n<tr>\n<td><code>customer_id</code></td>\n<td>string</td>\n<td>Unique identifier of the associated customer (nullable)</td>\n</tr>\n<tr>\n<td><code>customer_name</code></td>\n<td>string</td>\n<td>Name of the associated customer (nullable)</td>\n</tr>\n<tr>\n<td><code>customer_is_active</code></td>\n<td>boolean</td>\n<td>Whether the associated customer is active (nullable)</td>\n</tr>\n<tr>\n<td><code>contact_type</code></td>\n<td>string</td>\n<td>Type/category of the contact (nullable)</td>\n</tr>\n<tr>\n<td><code>position</code></td>\n<td>string</td>\n<td>Job position or role of the contact (nullable)</td>\n</tr>\n<tr>\n<td><code>emails</code></td>\n<td>array[Email]</td>\n<td>List of email addresses</td>\n</tr>\n<tr>\n<td><code>phone_numbers</code></td>\n<td>array[PhoneNumber]</td>\n<td>List of phone numbers</td>\n</tr>\n<tr>\n<td><code>address</code></td>\n<td>Address</td>\n<td>Physical address information (nullable)</td>\n</tr>\n<tr>\n<td><code>notes</code></td>\n<td>string</td>\n<td>Internal notes or comments about the contact (nullable)</td>\n</tr>\n<tr>\n<td><code>custom_fields</code></td>\n<td>array[CustomFieldInstance]</td>\n<td>Custom field values</td>\n</tr>\n<tr>\n<td><code>external_id</code></td>\n<td>string</td>\n<td>External system identifier (nullable)</td>\n</tr>\n<tr>\n<td><code>representative_ids</code></td>\n<td>array[string]</td>\n<td>IDs of associated sales representatives (nullable)</td>\n</tr>\n<tr>\n<td><code>visibility_ids</code></td>\n<td>array[string]</td>\n<td>IDs of users/teams who can view this contact (nullable)</td>\n</tr>\n<tr>\n<td><code>representative_ids_synced</code></td>\n<td>boolean</td>\n<td>Whether representative IDs are synchronized with customer (nullable)</td>\n</tr>\n<tr>\n<td><code>visibility_ids_synced</code></td>\n<td>boolean</td>\n<td>Whether visibility IDs are synchronized with customer (nullable)</td>\n</tr>\n<tr>\n<td><code>bill_to_id</code></td>\n<td>string</td>\n<td>Associated billing account ID (nullable)</td>\n</tr>\n<tr>\n<td><code>from_lead</code></td>\n<td>boolean</td>\n<td>Whether contact was created from a lead conversion (nullable)</td>\n</tr>\n<tr>\n<td><code>lead_id</code></td>\n<td>string</td>\n<td>If from_lead is true, the original lead ID (nullable)</td>\n</tr>\n<tr>\n<td><code>last_edited_date</code></td>\n<td>datetime</td>\n<td>Timestamp of last modification</td>\n</tr>\n<tr>\n<td><code>last_ingested_date</code></td>\n<td>datetime</td>\n<td>Timestamp of last sync from external system (nullable)</td>\n</tr>\n<tr>\n<td><code>to_be_deleted</code></td>\n<td>boolean</td>\n<td>Soft delete flag (nullable)</td>\n</tr>\n<tr>\n<td><code>other_data</code></td>\n<td>object</td>\n<td>Flexible storage for additional unstructured data (nullable)</td>\n</tr>\n</tbody>\n</table>\n</div><h2 id=\"error-responses\">Error Responses</h2>\n<h3 id=\"400-bad-request\">400 Bad Request</h3>\n<p>Returned when the request is malformed or no editable fields are provided.</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"status_message\": \"error\",\n    \"error\": {\n        \"code\": \"BAD_REQUEST\",\n        \"message\": \"At least one editable field must be provided\"\n    }\n}\n\n</code></pre>\n<h3 id=\"401-unauthorized\">401 Unauthorized</h3>\n<p>Returned when authentication fails or is missing.</p>\n<h3 id=\"404-not-found\">404 Not Found</h3>\n<p>Returned when the specified contact does not exist.</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"status_message\": \"error\",\n    \"error\": {\n        \"code\": \"NOT_FOUND\",\n        \"message\": \"Contact with id 'CONTACT-99999' does not exist\"\n    }\n}\n\n</code></pre>\n<h3 id=\"500-internal-server-error\">500 Internal Server Error</h3>\n<p>Returned when an unexpected error occurs on the server.</p>\n<h2 id=\"best-practices\">Best Practices</h2>\n<ol>\n<li><p><strong>Partial updates</strong>: Only include fields you want to change. Omitted fields will retain their current values</p>\n</li>\n<li><p><strong>Array fields replace entirely</strong>: When updating <code>emails</code>, <code>phone_numbers</code>, <code>address</code>, or <code>custom_fields</code>, the entire array/object is replaced. Include all values you want to keep</p>\n</li>\n<li><p><strong>Use the appropriate identifier</strong>: You can use either <code>contact_id</code> or <code>id</code> in the URL path to identify the contact to update</p>\n</li>\n<li><p><strong>Changing contact_id</strong>: You can update the <code>contact_id</code> field in the request body. The internal <code>id</code> (UUID) will remain unchanged, ensuring referential integrity</p>\n</li>\n<li><p><strong>Audit trail</strong>: All changes are automatically recorded in the audit trail for compliance and tracking purposes</p>\n</li>\n<li><p><strong>Verify before updating</strong>: Consider fetching the contact first to ensure you have the latest data before making updates</p>\n</li>\n</ol>\n<h2 id=\"notes\">Notes</h2>\n<ul>\n<li><p>This endpoint supports <strong>partial updates</strong>. Only fields included in the request body will be updated; all other fields remain unchanged</p>\n</li>\n<li><p>The <code>identifier</code> path parameter accepts both <code>contact_id</code> (external ID) and <code>id</code> (internal UUID) for looking up the contact to update</p>\n</li>\n<li><p>When updating array fields (<code>emails</code>, <code>phone_numbers</code>, <code>custom_fields</code>) or the <code>address</code> object, the new values <strong>completely replace</strong> the existing values. To add an item, you must include all existing items plus the new one</p>\n</li>\n<li><p>The <code>last_edited_date</code> is automatically set to the current UTC timestamp if not explicitly provided</p>\n</li>\n<li><p>Changes are recorded in the audit trail, tracking the old and new values along with the user who made the change</p>\n</li>\n<li><p>Fields that cannot be updated via the request body: <code>company</code>, <code>user_id</code>, <code>identifier</code>, <code>id</code>, <code>customer_id</code>, <code>representative_ids</code>, <code>visibility_ids</code>, <code>bill_to_id</code>, <code>from_lead</code>, <code>lead_id</code>, <code>last_ingested_date</code>, <code>to_be_deleted</code>, <code>customer_is_active</code>, <code>customer_name</code></p>\n</li>\n</ul>\n","urlObject":{"path":["{{company}}","v1","contacts","{identifier}"],"host":["{{domain}}"],"query":[],"variable":[]}},"response":[{"id":"51cf7760-8c0e-4c0e-96c0-245ab3968857","name":"Edit Contact V1","originalRequest":{"method":"PUT","header":[{"key":"X-User-Id","value":"{{user_id}}","type":"text"},{"key":"X-Company","value":"{{company}}","type":"text"},{"key":"X-Api-Key","value":"{{api_key}}","type":"text"},{"key":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\n    \"name\": \"Jonathan\",\n    \"position\": \"Senior Operations Manager\",\n    \"emails\": [\n        { \"email\": \"jonathan.smith@abcmanufacturing.com\" },\n        { \"email\": \"j.smith@personal.com\" }\n    ],\n    \"phone_numbers\": [\n        { \"phone_number\": \"+1-555-9999\", \"type\": \"office\" },\n        { \"phone_number\": \"+1-555-8888\", \"type\": \"mobile\" }\n    ],\n    \"address\": {\n        \"street_address\": \"456 Corporate Plaza\",\n        \"city\": \"New York\",\n        \"state\": \"NY\",\n        \"country\": \"US\",\n        \"zip_code\": \"10001\"\n    }\n}\n","options":{"raw":{"language":"json"}}},"url":"{{domain}}/{{company}}/v1/contacts/550e8400-e29b-41d4-a716-446655440000"},"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json","description":"","type":"text"}],"cookie":[{"expires":"Invalid Date","domain":"","path":""}],"responseTime":null,"body":"{\n    \"id\": \"550e8400-e29b-41d4-a716-446655440000\",\n    \"contact_id\": \"CONTACT-78901\",\n    \"name\": \"Jonathan\",\n    \"surname\": \"Smith\",\n    \"full_name\": \"Jonathan Smith\",\n    \"customer_id\": \"CUST-12345\",\n    \"customer_name\": \"ABC Manufacturing Corp\",\n    \"customer_is_active\": true,\n    \"contact_type\": \"primary\",\n    \"position\": \"Senior Operations Manager\",\n    \"emails\": [\n        {\n            \"email\": \"jonathan.smith@abcmanufacturing.com\"\n        },\n        {\n            \"email\": \"j.smith@personal.com\"\n        }\n    ],\n    \"phone_numbers\": [\n        {\n            \"phone_number\": \"+1-555-9999\",\n            \"type\": \"office\"\n        },\n        {\n            \"phone_number\": \"+1-555-8888\",\n            \"type\": \"mobile\"\n        }\n    ],\n    \"address\": {\n        \"street_address\": \"456 Corporate Plaza\",\n        \"street_address_2\": \"\",\n        \"street_address_3\": \"\",\n        \"apartment\": \"\",\n        \"city\": \"New York\",\n        \"state\": \"NY\",\n        \"country\": \"US\",\n        \"zip_code\": \"10001\"\n    },\n    \"notes\": \"Primary contact for all operational matters\",\n    \"custom_fields\": [\n        {\n            \"field_id\": \"department\",\n            \"value\": \"Operations\"\n        }\n    ],\n    \"external_id\": \"ERP-CONTACT-78901\",\n    \"representative_ids\": [\n        \"user-123\",\n        \"user-456\"\n    ],\n    \"visibility_ids\": [\n        \"team-sales\"\n    ],\n    \"representative_ids_synced\": true,\n    \"visibility_ids_synced\": true,\n    \"bill_to_id\": null,\n    \"from_lead\": false,\n    \"lead_id\": null,\n    \"last_edited_date\": \"2025-01-19T16:45:30Z\",\n    \"last_ingested_date\": \"2025-01-15T10:00:00Z\",\n    \"to_be_deleted\": false,\n    \"other_data\": {}\n}"}],"_postman_id":"ad9dd5fd-7761-4c9e-832b-e9d0998d1632"},{"name":"Delete Contact V1","id":"c55f60fc-4443-4728-ab26-194cda1a358b","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"DELETE","header":[{"key":"X-User-Id","value":"{{user_id}}","type":"text"},{"key":"X-Company","value":"{{company}}","type":"text"},{"key":"X-Api-Key","value":"{{api_key}}","type":"text"},{"key":"Content-Type","value":"application/json","type":"text"}],"url":"{{domain}}/{{company}}/v1/contacts/{identifier}","description":"<h1 id=\"contact-delete-api-v1\">Contact Delete API v1</h1>\n<h2 id=\"overview\">Overview</h2>\n<p>The Contact Delete API v1 endpoint allows you to permanently delete a contact within a specific company. This endpoint performs a <strong>hard delete</strong>, physically removing the contact record from the database. The deletion is recorded in the audit trail for compliance and tracking purposes.</p>\n<h2 id=\"endpoint\">Endpoint</h2>\n<p><strong>Method</strong>: <code>DELETE</code><br /><strong>URL</strong>: <code>{{domain}}/{{company}}/v1/contacts/{{identifier}}</code></p>\n<h2 id=\"request-format\">Request Format</h2>\n<h3 id=\"url-parameters\">URL Parameters</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Parameter</th>\n<th>Type</th>\n<th>Required</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>company</code></td>\n<td>string</td>\n<td>Yes</td>\n<td>The company identifier for multi-tenant data isolation</td>\n</tr>\n<tr>\n<td><code>identifier</code></td>\n<td>string</td>\n<td>Yes</td>\n<td>The contact identifier. Can be either the <code>contact_id</code> (external ID) or <code>id</code> (internal UUID)</td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"request-body\">Request Body</h3>\n<p>No request body is required for this endpoint.</p>\n<h3 id=\"example-urls\">Example URLs</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">DELETE /acme-corp/v1/contacts/CONTACT-78901\nDELETE /acme-corp/v1/contacts/550e8400-e29b-41d4-a716-446655440000\n\n</code></pre>\n<h2 id=\"example-request\">Example Request</h2>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">curl -X DELETE \"https://api.proton.ai/acme-corp/v1/contacts/550e8400-e29b-41d4-a716-446655440000\" \\\n  -H \"Authorization: Bearer &lt;token&gt;\"\n\n</code></pre>\n<h2 id=\"response-format\">Response Format</h2>\n<h3 id=\"success-response-200-ok\">Success Response (200 OK)</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>{\n    \"contact_id\": \"CONTACT-78901\",\n    \"id\": \"550e8400-e29b-41d4-a716-446655440000\"\n}\n\n</code></pre><h3 id=\"response-fields\">Response Fields</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Type</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>contact_id</code></td>\n<td>string</td>\n<td>The external contact identifier of the deleted contact</td>\n</tr>\n<tr>\n<td><code>id</code></td>\n<td>string</td>\n<td>The internal UUID of the deleted contact</td>\n</tr>\n</tbody>\n</table>\n</div><h2 id=\"error-responses\">Error Responses</h2>\n<h3 id=\"400-bad-request\">400 Bad Request</h3>\n<p>Returned when the request is malformed or the identifier is missing.</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>{\n    \"status_message\": \"error\",\n    \"error\": {\n        \"code\": \"BAD_REQUEST\",\n        \"message\": \"Either contact_id, id, or identifier must be provided\"\n    }\n}\n\n</code></pre><h3 id=\"401-unauthorized\">401 Unauthorized</h3>\n<p>Returned when authentication fails or is missing.</p>\n<h3 id=\"404-not-found\">404 Not Found</h3>\n<p>Returned when the specified contact does not exist.</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>{\n    \"status_message\": \"error\",\n    \"error\": {\n        \"code\": \"NOT_FOUND\",\n        \"message\": \"Contact with id 'CONTACT-99999' does not exist\"\n    }\n}\n\n</code></pre><h3 id=\"500-internal-server-error\">500 Internal Server Error</h3>\n<p>Returned when an unexpected error occurs on the server.</p>\n<h2 id=\"best-practices\">Best Practices</h2>\n<ol>\n<li><p><strong>Confirm before deleting</strong>: This operation permanently removes the contact. Consider implementing a confirmation step in your application before calling this endpoint</p>\n</li>\n<li><p><strong>Use the appropriate identifier</strong>: You can use either the <code>contact_id</code> (external ID) or <code>id</code> (internal UUID) to identify the contact to delete</p>\n</li>\n<li><p><strong>Check for dependencies</strong>: Before deleting a contact, consider checking if there are related records (calls, emails, quotes, orders) that may be orphaned</p>\n</li>\n<li><p><strong>Store the response</strong>: The response contains both identifiers of the deleted contact, which can be useful for logging or undo functionality in your application</p>\n</li>\n</ol>\n<h2 id=\"notes\">Notes</h2>\n<ul>\n<li><p>This endpoint performs a <strong>hard delete</strong></p>\n</li>\n<li><p>The <code>identifier</code> path parameter accepts both <code>contact_id</code> (external ID) and <code>id</code> (internal UUID) for identifying the contact to delete</p>\n</li>\n<li><p>Once deleted, the contact cannot be retrieved via the Get Contact API. Any subsequent requests for the deleted contact will return a 404 Not Found error</p>\n</li>\n<li><p>Deleting a contact does not automatically delete related records such as calls, emails, quotes, or orders. These records may become orphaned</p>\n</li>\n<li><p>The same <code>contact_id</code> can be reused after deletion when creating a new contact</p>\n</li>\n</ul>\n","urlObject":{"path":["{{company}}","v1","contacts","{identifier}"],"host":["{{domain}}"],"query":[],"variable":[]}},"response":[{"id":"b583e3e9-8bbd-4e71-9e12-6406a0c4e711","name":"Delete Contact V1","originalRequest":{"method":"DELETE","header":[{"key":"X-User-Id","value":"{{user_id}}","type":"text"},{"key":"X-Company","value":"{{company}}","type":"text"},{"key":"X-Api-Key","value":"{{api_key}}","type":"text"},{"key":"Content-Type","value":"application/json","type":"text"}],"url":"{{domain}}/{{company}}/v1/contacts/550e8400-e29b-41d4-a716-446655440000"},"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json","description":"","type":"text"}],"cookie":[{"expires":"Invalid Date","domain":"","path":""}],"responseTime":null,"body":"{\n    \"contact_id\": \"CONTACT-78901\",\n    \"id\": \"550e8400-e29b-41d4-a716-446655440000\"\n}"}],"_postman_id":"c55f60fc-4443-4728-ab26-194cda1a358b"}],"id":"49b6e2fd-557b-4663-b304-54d9c85c5da3","description":"<h2 id=\"description\">Description</h2>\n<p>Manage contact records within your Proton account. Contacts represent individual people associated with customers — including their roles, communication details, and relationship information. Each contact is linked to a customer and can have multiple emails, phone numbers, and custom fields.</p>\n<p>Use these endpoints to create, retrieve, update, delete, and search contacts programmatically.</p>\n","_postman_id":"49b6e2fd-557b-4663-b304-54d9c85c5da3"},{"name":"Call Notes","item":[{"name":"Search Call Notes V1","id":"d94e1762-95ad-4d12-af75-9a86343fb4b9","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"X-User-Id","value":"{{user_id}}","type":"text"},{"key":"X-Company","value":"{{company}}","type":"text"},{"key":"X-Api-Key","value":"{{api_key}}","type":"text"}],"url":"{{domain}}/{{company}}/v1/call_notes/search","description":"<h1 id=\"call-notes-search-api-v1\">Call Notes Search API v1</h1>\n<h2 id=\"overview\">Overview</h2>\n<p>The Call Notes Search API v1 endpoint allows you to search for call notes within a specific company using a query string and advanced filtering options. This endpoint supports various search operators for flexible and precise call note searches. Call notes represent recorded interactions between sales representatives and customers, including notes, pitched products, and associated metadata.</p>\n<h2 id=\"endpoint\">Endpoint</h2>\n<p><strong>Method</strong>: <code>POST</code><br /><strong>URL</strong>: <code>{{domain}}/{{company}}/v1/call-notes/search</code></p>\n<h2 id=\"request-format\">Request Format</h2>\n<h3 id=\"request-body-structure\">Request Body Structure</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"query\": \"string\",\n    \"filters\": {\n        \"field_name\": {\n            \"operator\": value\n        }\n    },\n    \"count\": integer,\n    \"offset\": integer,\n    \"sort_field\": \"string\",\n    \"sort_order\": \"asc\" | \"desc\"\n}\n\n</code></pre>\n<h3 id=\"request-parameters\">Request Parameters</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Parameter</th>\n<th>Type</th>\n<th>Required</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>query</code></td>\n<td>string</td>\n<td>No</td>\n<td>Free-text search term for exact matching (default: empty string)</td>\n</tr>\n<tr>\n<td><code>filters</code></td>\n<td>object</td>\n<td>No</td>\n<td>An object containing field-specific filters with search operators</td>\n</tr>\n<tr>\n<td><code>count</code></td>\n<td>integer</td>\n<td>No</td>\n<td>Number of results per page (default: 10, max: 100)</td>\n</tr>\n<tr>\n<td><code>offset</code></td>\n<td>integer</td>\n<td>No</td>\n<td>Pagination offset for results (default: 0)</td>\n</tr>\n<tr>\n<td><code>sort_field</code></td>\n<td>string</td>\n<td>No</td>\n<td>Field to sort results by</td>\n</tr>\n<tr>\n<td><code>sort_order</code></td>\n<td>string</td>\n<td>No</td>\n<td>Sort direction: \"asc\" or \"desc\" (default: \"asc\")</td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"filter-fields\">Filter Fields</h3>\n<p>The following fields can be used in the <code>filters</code> object:</p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Type</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>customer_id</code></td>\n<td>string</td>\n<td>The unique identifier of the customer associated with the call note</td>\n</tr>\n<tr>\n<td><code>user_id</code></td>\n<td>string</td>\n<td>The unique identifier of the user who created the call note</td>\n</tr>\n<tr>\n<td><code>bill_to_id</code></td>\n<td>string</td>\n<td>The billing identifier associated with the call note</td>\n</tr>\n<tr>\n<td><code>call_type</code></td>\n<td>string</td>\n<td>The type of call (e.g., \"phone\", \"email\", \"visit\")</td>\n</tr>\n<tr>\n<td><code>date</code></td>\n<td>datetime</td>\n<td>The date of the call (ISO 8601 format, e.g., \"2024-01-01T00:00:00Z\")</td>\n</tr>\n<tr>\n<td><code>customer_is_active</code></td>\n<td>boolean</td>\n<td>Whether the associated customer is currently active</td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"search-operators\">Search Operators</h3>\n<p>Each filter field can use one or more of the following operators:</p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Operator</th>\n<th>Type</th>\n<th>Description</th>\n<th>Example</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>eq</code></td>\n<td>string, boolean, number, null</td>\n<td>Exact match (equals)</td>\n<td><code>{ \"call_type\": { \"eq\": \"phone\" } }</code></td>\n</tr>\n<tr>\n<td><code>neq</code></td>\n<td>string, boolean, number, null</td>\n<td>Not equal to</td>\n<td><code>{ \"call_type\": { \"neq\": \"visit\" } }</code></td>\n</tr>\n<tr>\n<td><code>gt</code></td>\n<td>number, datetime</td>\n<td>Greater than</td>\n<td><code>{ \"date\": { \"gt\": \"2023-01-01T00:00:00Z\" } }</code></td>\n</tr>\n<tr>\n<td><code>gte</code></td>\n<td>number, datetime</td>\n<td>Greater than or equal to</td>\n<td><code>{ \"date\": { \"gte\": \"2023-01-01T00:00:00Z\" } }</code></td>\n</tr>\n<tr>\n<td><code>lt</code></td>\n<td>number, datetime</td>\n<td>Less than</td>\n<td><code>{ \"date\": { \"lt\": \"2024-01-01T00:00:00Z\" } }</code></td>\n</tr>\n<tr>\n<td><code>lte</code></td>\n<td>number, datetime</td>\n<td>Less than or equal to</td>\n<td><code>{ \"date\": { \"lte\": \"2023-12-31T23:59:59Z\" } }</code></td>\n</tr>\n<tr>\n<td><code>contains</code></td>\n<td>string</td>\n<td>Contains substring (case-sensitive)</td>\n<td><code>{ \"customer_id\": { \"contains\": \"CUST\" } }</code></td>\n</tr>\n<tr>\n<td><code>not_contains</code></td>\n<td>string</td>\n<td>Does not contain substring</td>\n<td><code>{ \"customer_id\": { \"not_contains\": \"TEST\" } }</code></td>\n</tr>\n<tr>\n<td><code>exists</code></td>\n<td>boolean</td>\n<td>Field exists or not</td>\n<td><code>{ \"bill_to_id\": { \"exists\": true } }</code></td>\n</tr>\n<tr>\n<td><code>includes</code></td>\n<td>array</td>\n<td>Value is included in the provided list</td>\n<td><code>{ \"call_type\": { \"includes\": [\"phone\", \"email\"] } }</code></td>\n</tr>\n</tbody>\n</table>\n</div><p><strong>Note</strong>:</p>\n<ul>\n<li><p>Multiple operators cannot be used for the same field in a single filter</p>\n</li>\n<li><p>At least one operator must be defined for each filter field</p>\n</li>\n<li><p>Operators can accept single values or arrays (where applicable)</p>\n</li>\n</ul>\n<h2 id=\"example-request\">Example Request</h2>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"query\": \"follow-up\",\n    \"filters\": {\n        \"customer_id\": { \"eq\": \"CUST-12345\" },\n        \"call_type\": { \"includes\": [\"phone\", \"email\"] },\n        \"date\": { \"gte\": \"2024-01-01T00:00:00Z\" },\n        \"customer_is_active\": { \"eq\": true }\n    },\n    \"count\": 10,\n    \"offset\": 0,\n    \"sort_field\": \"date\",\n    \"sort_order\": \"desc\"\n}\n\n</code></pre>\n<p>This request will:</p>\n<ul>\n<li><p>Search for call notes containing \"follow-up\" in the notes</p>\n</li>\n<li><p>Filter for call notes associated with customer \"CUST-12345\"</p>\n</li>\n<li><p>Include only \"phone\" or \"email\" call types</p>\n</li>\n<li><p>Include only call notes from January 1, 2024 onwards</p>\n</li>\n<li><p>Include only call notes for active customers</p>\n</li>\n<li><p>Sort results by date in descending order (newest first)</p>\n</li>\n</ul>\n<h2 id=\"response-format\">Response Format</h2>\n<h3 id=\"success-response-200-ok\">Success Response (200 OK)</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\"> {\n \"status_message\": \"SUCCESS\",\n    \"data\": {\n        \"message\": \"\",\n        \"items\": [\n            {\n                \"call_id\": \"8678b142-1111-45ec-84ad-1148b416e7fe\",\n                \"interaction_id\": \"1ef31a20-5555-436c-9c96-5b9ddfefdb99\",\n                \"user_id\": \"testuser@test.com\",\n                \"customer_id\": \"123\",\n                \"customer_name\": \"Example name\",\n                \"bill_to_id\": \"123-1\",\n                \"call_type\": \"phone\",\n                \"date\": \"2025-07-26T01:40:41+00:00\",\n                \"notes\": \"test notes\",\n                \"tagged_users\": [],\n                \"custom_fields\": [],\n                \"attachments\": [],\n                \"associations\": [\n                    {\n                        \"type\": \"task\",\n                        \"task_id\": \"1784bb05-3333-4def-8cc3-ecdeed9988f7\"\n                    }\n                ],\n                \"additional_info\": {\n                    \"contact_id\": \"12345\",\n                    \"contact_name\": \"Jon Doe\"\n                },\n                \"customer_is_active\": true,\n                \"pitched_items\": [\n                    {\n                        \"interaction_id\": \"8f8ef5b3-2222-425e-b467-ea85bc7e73f0\",\n                        \"product_id\": \"15\",\n                        \"product_name\": \"Product Name Exaple\",\n                        \"product_category\": \"Lighting\",\n                        \"pitch_order\": 0,\n                        \"pitch_key\": \"product_id\",\n                        \"pitch_value\": \"15\",\n                        \"subject\": \"initiative_replacement\"\n                    },\n                    {\n                        \"interaction_id\": \"dbeedff2-1111-4f5e-8044-6542801007a6\",\n                        \"product_id\": \"179\",\n                        \"product_name\": \"Zip Ties Cable Wire Black\",\n                        \"product_category\": \"Wires, Cords &amp; Cables\",\n                        \"pitch_order\": 1,\n                        \"pitch_key\": \"product_id\",\n                        \"pitch_value\": \"179\",\n                        \"subject\": \"campaign\"\n                    }\n                ]\n            }\n        ],\n        \"total_count\": 5,\n        \"page_size\": 20,\n        \"page_number\": 1,\n        \"total_pages\": 1\n    }\n}\n\n</code></pre>\n<h3 id=\"response-fields\">Response Fields</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Type</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>status_message</code></td>\n<td>string</td>\n<td>Overall status of the request</td>\n</tr>\n<tr>\n<td><code>data.message</code></td>\n<td>string</td>\n<td>Descriptive message about the response</td>\n</tr>\n<tr>\n<td><code>data.items</code></td>\n<td>array</td>\n<td>Array of call note objects matching the search criteria</td>\n</tr>\n<tr>\n<td><code>data.total_count</code></td>\n<td>integer</td>\n<td>Total number of call notes matching the search criteria</td>\n</tr>\n<tr>\n<td><code>data.page_size</code></td>\n<td>integer</td>\n<td>Number of items returned in this page</td>\n</tr>\n<tr>\n<td><code>data.page_number</code></td>\n<td>integer</td>\n<td>Current page number (calculated from offset)</td>\n</tr>\n<tr>\n<td><code>data.total_pages</code></td>\n<td>integer</td>\n<td>Total number of pages available</td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"call-note-object-fields\">Call Note Object Fields</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Type</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>call_id</code></td>\n<td>string</td>\n<td>Unique identifier for the call</td>\n</tr>\n<tr>\n<td><code>interaction_id</code></td>\n<td>string</td>\n<td>Unique identifier for the interaction</td>\n</tr>\n<tr>\n<td><code>user_id</code></td>\n<td>string</td>\n<td>Unique identifier of the user who created the call note</td>\n</tr>\n<tr>\n<td><code>customer_id</code></td>\n<td>string</td>\n<td>Unique identifier of the associated customer</td>\n</tr>\n<tr>\n<td><code>customer_name</code></td>\n<td>string</td>\n<td>Name of the associated customer (nullable)</td>\n</tr>\n<tr>\n<td><code>bill_to_id</code></td>\n<td>string</td>\n<td>Billing identifier (nullable)</td>\n</tr>\n<tr>\n<td><code>call_type</code></td>\n<td>string</td>\n<td>Type of call (e.g., \"phone\", \"email\", \"visit\")</td>\n</tr>\n<tr>\n<td><code>date</code></td>\n<td>datetime</td>\n<td>Date and time of the call (ISO 8601 format, nullable)</td>\n</tr>\n<tr>\n<td><code>notes</code></td>\n<td>string</td>\n<td>Call notes content (nullable)</td>\n</tr>\n<tr>\n<td><code>tagged_users</code></td>\n<td>array</td>\n<td>List of user IDs tagged in this call note</td>\n</tr>\n<tr>\n<td><code>custom_fields</code></td>\n<td>array</td>\n<td>List of custom field objects</td>\n</tr>\n<tr>\n<td><code>attachments</code></td>\n<td>array</td>\n<td>List of attachment objects</td>\n</tr>\n<tr>\n<td><code>associations</code></td>\n<td>array</td>\n<td>List of association objects (linked records)</td>\n</tr>\n<tr>\n<td><code>additional_info</code></td>\n<td>object</td>\n<td>Additional metadata as key-value pairs</td>\n</tr>\n<tr>\n<td><code>customer_is_active</code></td>\n<td>boolean</td>\n<td>Whether the associated customer is active</td>\n</tr>\n<tr>\n<td><code>pitched_items</code></td>\n<td>array</td>\n<td>List of products pitched during the call</td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"pitched-item-object-fields\">Pitched Item Object Fields</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Type</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>interaction_id</code></td>\n<td>string</td>\n<td>Interaction ID this pitched item belongs to</td>\n</tr>\n<tr>\n<td><code>product_id</code></td>\n<td>string</td>\n<td>Unique identifier of the pitched product (nullable)</td>\n</tr>\n<tr>\n<td><code>product_name</code></td>\n<td>string</td>\n<td>Name of the pitched product (nullable)</td>\n</tr>\n<tr>\n<td><code>product_category</code></td>\n<td>string</td>\n<td>Category of the pitched product (nullable)</td>\n</tr>\n<tr>\n<td><code>pitch_order</code></td>\n<td>integer</td>\n<td>Order in which the product was pitched (nullable)</td>\n</tr>\n<tr>\n<td><code>pitch_key</code></td>\n<td>string</td>\n<td>Key identifier for the pitch (nullable)</td>\n</tr>\n<tr>\n<td><code>pitch_value</code></td>\n<td>string</td>\n<td>Value associated with the pitch (nullable)</td>\n</tr>\n<tr>\n<td><code>subject</code></td>\n<td>string</td>\n<td>Subject or topic of the pitch (nullable)</td>\n</tr>\n</tbody>\n</table>\n</div><h2 id=\"error-responses\">Error Responses</h2>\n<h3 id=\"400-bad-request\">400 Bad Request</h3>\n<p>Returned when the request is malformed or contains invalid parameters.</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"status_message\": \"error\",\n    \"error\": {\n        \"code\": \"INVALID_REQUEST\",\n        \"message\": \"Invalid filter operator 'contains' for field 'customer_is_active'. Field 'customer_is_active' only supports operators: eq, neq, exists\"\n    }\n}\n\n</code></pre>\n<h3 id=\"401-unauthorized\">401 Unauthorized</h3>\n<p>Returned when authentication fails or is missing.</p>\n<h3 id=\"404-not-found\">404 Not Found</h3>\n<p>Returned when the specified company does not exist.</p>\n<h3 id=\"500-internal-server-error\">500 Internal Server Error</h3>\n<p>Returned when an unexpected error occurs on the server.</p>\n<h2 id=\"pagination\">Pagination</h2>\n<p>Use the <code>count</code> and <code>offset</code> parameters to paginate through results:</p>\n<ul>\n<li><p>First page: <code>offset: 0, count: 20</code></p>\n</li>\n<li><p>Second page: <code>offset: 20, count: 20</code></p>\n</li>\n<li><p>Third page: <code>offset: 40, count: 20</code></p>\n</li>\n</ul>\n<p>The response includes <code>total_count</code>, <code>page_number</code>, and <code>total_pages</code> to help with pagination navigation.</p>\n<p><strong>Note</strong>: Maximum page size is 100 items to avoid overwhelming the system.</p>\n<h2 id=\"sorting\">Sorting</h2>\n<p>Use the <code>sort_field</code> and <code>sort_order</code> parameters to sort results:</p>\n<ul>\n<li><p><code>sort_field</code>: The field name to sort by (e.g., \"date\", \"customer_name\")</p>\n</li>\n<li><p><code>sort_order</code>: Either \"asc\" (ascending) or \"desc\" (descending), defaults to \"asc\"</p>\n</li>\n</ul>\n<h2 id=\"best-practices\">Best Practices</h2>\n<ol>\n<li><p><strong>Use specific filters</strong>: Combine multiple filters to narrow down results effectively</p>\n</li>\n<li><p><strong>Date range queries</strong>: Use <code>gte</code> and <code>lte</code> operators together to query date ranges</p>\n</li>\n<li><p><strong>Handle pagination</strong>: For large result sets, implement proper pagination using <code>count</code> and <code>offset</code></p>\n</li>\n<li><p><strong>Error handling</strong>: Always check the <code>status_message</code> and handle errors appropriately</p>\n</li>\n<li><p><strong>Customer association</strong>: Use <code>customer_id</code> filter to find all call notes for a specific customer</p>\n</li>\n<li><p><strong>User filtering</strong>: Use <code>user_id</code> filter to find call notes created by a specific sales representative</p>\n</li>\n</ol>\n<h2 id=\"notes\">Notes</h2>\n<ul>\n<li><p>The search query matches against call note content</p>\n</li>\n<li><p>Filter operators are case-sensitive for string comparisons</p>\n</li>\n<li><p>Empty filter values are treated as \"match any\"</p>\n</li>\n<li><p>The <code>includes</code> operator is useful for matching against multiple call types</p>\n</li>\n<li><p>Pitched items are automatically included for each call note returned</p>\n</li>\n<li><p>Date filters expect ISO 8601 format (e.g., \"2024-01-01T00:00:00Z\")</p>\n</li>\n</ul>\n","urlObject":{"path":["{{company}}","v1","call_notes","search"],"host":["{{domain}}"],"query":[],"variable":[]}},"response":[{"id":"efa0d159-c5fb-471c-b80f-f7c80a826e1f","name":"Search Call Notes V1","originalRequest":{"method":"POST","header":[{"key":"X-User-Id","value":"{{user_id}}","type":"text"},{"key":"X-Company","value":"{{company}}","type":"text"},{"key":"X-Api-Key","value":"{{api_key}}","type":"text"}],"body":{"mode":"raw","raw":"    {\n        \"query\": \"test\",\n        \"filters\": {\n            \"customer_id\": {\"contains\": \"949\"},\n            \"bill_to_id\": {\"eq\": \"949\"},\n            \"user_id\": {\"eq\": \"testuser.001@proton.ai\"},\n            \"call_type\": {\"eq\": \"phone\"},\n            \"date\": {\n                \"gte\": \"2021-11-21T00:00:00Z\",\n                \"lte\": \"2028-12-31T23:59:59Z\"\n            },\n            \"customer_is_active\": {\"eq\": true}\n        },\n        \"count\": 20,\n        \"offset\": 0,\n        \"sort_field\": \"date\",\n        \"sort_order\": \"desc\"\n    }\n","options":{"raw":{"language":"json"}}},"url":"{{domain}}/{{company}}/v1/call_notes/search"},"_postman_previewlanguage":"","header":[],"cookie":[{"expires":"Invalid Date","domain":"","path":""}],"responseTime":null,"body":"{\n    \"status_message\": \"SUCCESS\",\n    \"data\": {\n        \"message\": \"\",\n        \"items\": [\n            {\n                \"call_id\": \"8678b142-1111-45ec-84ad-1148b416e7fe\",\n                \"interaction_id\": \"1ef31a20-2222-436c-9c96-5b9ddfefdb99\",\n                \"user_id\": \"testuser.001@proton.ai\",\n                \"customer_id\": \"111\",\n                \"customer_name\": \"Test Customer\",\n                \"bill_to_id\": \"111\",\n                \"call_type\": \"phone\",\n                \"date\": \"2025-07-26T01:40:41+00:00\",\n                \"notes\": \"test note\",\n                \"tagged_users\": [],\n                \"custom_fields\": [],\n                \"attachments\": [],\n                \"associations\": [\n                    {\n                        \"type\": \"task\",\n                        \"task_id\": \"1784bb05-3333-4def-8cc3-ecdeed9988f7\"\n                    }\n                ],\n                \"additional_info\": {\n                    \"contact_id\": \"18036\",\n                    \"contact_name\": \"Test Contact Name\"\n                },\n                \"customer_is_active\": true,\n                \"pitched_items\": [\n                    {\n                        \"interaction_id\": \"8f8ef5b3-3333-425e-b467-ea85bc7e73f0\",\n                        \"product_id\": \"15\",\n                        \"product_name\": \"Adjustable Tripod Stand & Phone Holder for Live Stream Makeup\",\n                        \"product_category\": \"Lighting\",\n                        \"pitch_order\": 0,\n                        \"pitch_key\": \"product_id\",\n                        \"pitch_value\": \"15\",\n                        \"subject\": \"initiative_replacement\"\n                    },\n                    {\n                        \"interaction_id\": \"dbeedff2-4444-4f5e-8044-6542801007a6\",\n                        \"product_id\": \"179\",\n                        \"product_name\": \"Zip Ties Cable Wire Black - 200 PCS 8 Inch Heavy Duty Plastic Tie Wire Cord Straps Management for Outdoor - puphutu\",\n                        \"product_category\": \"Wires, Cords & Cables\",\n                        \"pitch_order\": 1,\n                        \"pitch_key\": \"product_id\",\n                        \"pitch_value\": \"179\",\n                        \"subject\": \"campaign\"\n                    }\n                ]\n            }\n        ],\n        \"total_count\": 1,\n        \"page_size\": 20,\n        \"page_number\": 1,\n        \"total_pages\": 1\n    }\n}"}],"_postman_id":"d94e1762-95ad-4d12-af75-9a86343fb4b9"},{"name":"Create Call Note V1","id":"d55fa789-81b4-42f4-ae0d-c7ccb0144755","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"X-User-Id","value":"{{user_id}}","type":"text"},{"key":"X-Company","value":"{{company}}","type":"text"},{"key":"X-Api-Key","value":"{{api_key}}","type":"text"}],"url":"{{domain}}/{{company}}/v1/call_notes","description":"<h1 id=\"call-note-create-api-v1\">Call Note Create API v1</h1>\n<h2 id=\"overview\">Overview</h2>\n<p>The Call Note Create API v1 endpoint allows you to create a new call note for one or more customers within a specific company. The endpoint accepts call details, optional pitched items (products presented during the call), custom fields, associations (linked entities such as opportunities, quotes, orders, and campaigns), and file attachments. When multiple customers are specified, a separate call note is created for each customer, linked together via a shared call ID. Call notes represent logged interactions between sales representatives and customers, capturing the details and outcomes of calls.</p>\n<h2 id=\"endpoint\">Endpoint</h2>\n<p><strong>Method:</strong> POST\n<strong>URL:</strong> <code>{{domain}}/{{company}}/v1/call_notes</code></p>\n<h2 id=\"request-format\">Request Format</h2>\n<h3 id=\"url-parameters\">URL Parameters</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Parameter</th>\n<th>Type</th>\n<th>Required</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>company</td>\n<td>string</td>\n<td>Yes</td>\n<td>The company identifier for multi-tenant data isolation</td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"request-body-parameters\">Request Body Parameters</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Parameter</th>\n<th>Type</th>\n<th>Required</th>\n<th>Default</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>user_id</td>\n<td>string</td>\n<td>Yes</td>\n<td>—</td>\n<td>ID of the user creating the call note (automatically lowercased)</td>\n</tr>\n<tr>\n<td>customer_ids</td>\n<td>array[string]</td>\n<td>Yes</td>\n<td>—</td>\n<td>List of customer IDs to create call notes for. One call note is created per customer</td>\n</tr>\n<tr>\n<td>call_type</td>\n<td>string</td>\n<td>No</td>\n<td>\"phone\"</td>\n<td>Type of call (e.g., \"phone\")</td>\n</tr>\n<tr>\n<td>notes</td>\n<td>string</td>\n<td>No</td>\n<td>null</td>\n<td>Text content of the call note (supports HTML rich-text format)</td>\n</tr>\n<tr>\n<td>date</td>\n<td>datetime</td>\n<td>No</td>\n<td>Current time</td>\n<td>Date and time of the call (ISO 8601 format)</td>\n</tr>\n<tr>\n<td>tagged_users</td>\n<td>array[TaggedUser]</td>\n<td>No</td>\n<td>[]</td>\n<td>Users tagged/mentioned in the call note</td>\n</tr>\n<tr>\n<td>custom_fields</td>\n<td>array[CustomFieldInstance]</td>\n<td>No</td>\n<td>[]</td>\n<td>Custom field values</td>\n</tr>\n<tr>\n<td>additional_info</td>\n<td>object</td>\n<td>No</td>\n<td>{}</td>\n<td>Extra metadata (e.g., contact_id)</td>\n</tr>\n<tr>\n<td>associations</td>\n<td>array[Association]</td>\n<td>No</td>\n<td>[]</td>\n<td>Linked entities such as opportunities, quotes, orders, campaigns, and files</td>\n</tr>\n<tr>\n<td>attachments</td>\n<td>array[file]</td>\n<td>No</td>\n<td>[]</td>\n<td>File attachments (sent as multipart form data)</td>\n</tr>\n<tr>\n<td>pitched_items</td>\n<td>array[PitchedItem]</td>\n<td>No</td>\n<td>[]</td>\n<td>Products pitched/presented during the call</td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"headers\">Headers</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Header</th>\n<th>Type</th>\n<th>Required</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>X-Company</td>\n<td>string</td>\n<td>Yes</td>\n<td>The company identifier for multi-tenant data isolation. Must match the <code>company</code> in the URL path</td>\n</tr>\n<tr>\n<td>X-User-ID</td>\n<td>string</td>\n<td>Yes</td>\n<td>The user identifier (email or user ID) making the request</td>\n</tr>\n<tr>\n<td>X-Api-Key</td>\n<td>string</td>\n<td>Yes</td>\n<td>RS256-signed JWT API key for authentication. The token's <code>company</code> and <code>user_id</code> claims must match the corresponding headers</td>\n</tr>\n<tr>\n<td>Content-Type</td>\n<td>string</td>\n<td>Yes</td>\n<td><code>application/json</code> (or <code>multipart/form-data</code> when sending file attachments)</td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"example-url\">Example URL</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>POST /acme-corp/v1/call_notes\n</code></pre><h3 id=\"example-request\">Example Request</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>curl -X POST \"https://api.proton.ai/acme-corp/v1/call_notes\" \\\n  -H \"X-Company: acme-corp\" \\\n  -H \"X-User-ID: user-456\" \\\n  -H \"X-Api-Key: &lt;api_key&gt;\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n    \"user_id\": \"user-456\",\n    \"customer_ids\": [\"CUST-12345\"],\n    \"call_type\": \"phone\",\n    \"notes\": \"Discussed Q1 order forecasts and new product line availability.\",\n    \"date\": \"2025-01-20T14:30:00Z\",\n    \"tagged_users\": [\n        { \"user_id\": \"user-789\", \"name\": \"Jane Doe\" }\n    ],\n    \"custom_fields\": [\n        { \"custom_field_id\": \"call_outcome\", \"value\": \"follow_up_needed\" }\n    ],\n    \"additional_info\": {\n        \"contact_id\": \"CONTACT-001\"\n    },\n    \"associations\": [\n        { \"type\": \"opportunity\", \"opportunity_id\": \"OPP-5678\" },\n        { \"type\": \"quote\", \"quote_id\": \"QUO-9012\" }\n    ],\n    \"pitched_items\": [\n        {\n            \"pitch_key\": \"product_id\",\n            \"pitch_value\": \"PROD-001\",\n            \"product_id\": \"PROD-001\",\n            \"subject\": \"Industrial Widget A\",\n            \"pitch_order\": 1\n        }\n    ]\n}'\n</code></pre><h3 id=\"example-request-multiple-customers\">Example Request (Multiple Customers)</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>curl -X POST \"https://api.proton.ai/acme-corp/v1/call_notes\" \\\n  -H \"X-Company: acme-corp\" \\\n  -H \"X-User-ID: user-456\" \\\n  -H \"X-Api-Key: &lt;api_key&gt;\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n    \"user_id\": \"user-456\",\n    \"customer_ids\": [\"CUST-12345\", \"CUST-67890\"],\n    \"call_type\": \"phone\",\n    \"notes\": \"Group call to discuss upcoming bulk order.\"\n}'\n</code></pre><h3 id=\"nested-object-definitions-request\">Nested Object Definitions (Request)</h3>\n<h4 id=\"taggeduser-object\">TaggedUser Object</h4>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Type</th>\n<th>Required</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>user_id</td>\n<td>string</td>\n<td>Yes</td>\n<td>ID of the tagged user</td>\n</tr>\n<tr>\n<td>name</td>\n<td>string</td>\n<td>No</td>\n<td>Display name of the tagged user</td>\n</tr>\n</tbody>\n</table>\n</div><h4 id=\"customfieldinstance-object\">CustomFieldInstance Object</h4>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Type</th>\n<th>Required</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>custom_field_id</td>\n<td>string</td>\n<td>Yes</td>\n<td>The identifier of the custom field</td>\n</tr>\n<tr>\n<td>value</td>\n<td>any</td>\n<td>Yes</td>\n<td>The value for the custom field</td>\n</tr>\n<tr>\n<td>display_value</td>\n<td>object</td>\n<td>No</td>\n<td>Optional display value mapping</td>\n</tr>\n</tbody>\n</table>\n</div><h4 id=\"association-object\">Association Object</h4>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Type</th>\n<th>Required</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>type</td>\n<td>string</td>\n<td>Yes</td>\n<td>Entity type (e.g., \"opportunity\", \"quote\", \"order\", \"campaign\", \"file\")</td>\n</tr>\n<tr>\n<td>opportunity_id</td>\n<td>string</td>\n<td>No</td>\n<td>Opportunity ID (when type is \"opportunity\")</td>\n</tr>\n<tr>\n<td>quote_id</td>\n<td>string</td>\n<td>No</td>\n<td>Quote ID (when type is \"quote\")</td>\n</tr>\n<tr>\n<td>order_id</td>\n<td>string</td>\n<td>No</td>\n<td>Order ID (when type is \"order\")</td>\n</tr>\n<tr>\n<td>campaign_id</td>\n<td>string</td>\n<td>No</td>\n<td>Campaign ID (when type is \"campaign\")</td>\n</tr>\n<tr>\n<td>file_id</td>\n<td>string</td>\n<td>No</td>\n<td>File ID (when type is \"file\")</td>\n</tr>\n<tr>\n<td>customer_id</td>\n<td>string</td>\n<td>No</td>\n<td>Customer ID for the association</td>\n</tr>\n<tr>\n<td>contact_id</td>\n<td>string</td>\n<td>No</td>\n<td>Contact ID for the association</td>\n</tr>\n<tr>\n<td>document_id</td>\n<td>string</td>\n<td>No</td>\n<td>Document ID for the association</td>\n</tr>\n<tr>\n<td>product_id</td>\n<td>string</td>\n<td>No</td>\n<td>Product ID for the association</td>\n</tr>\n<tr>\n<td>user_id</td>\n<td>string</td>\n<td>No</td>\n<td>User ID for the association</td>\n</tr>\n<tr>\n<td>task_id</td>\n<td>string</td>\n<td>No</td>\n<td>Task ID for the association</td>\n</tr>\n<tr>\n<td>call_id</td>\n<td>string</td>\n<td>No</td>\n<td>Call ID for the association</td>\n</tr>\n</tbody>\n</table>\n</div><h4 id=\"pitcheditem-object-request\">PitchedItem Object (Request)</h4>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Type</th>\n<th>Required</th>\n<th>Default</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>pitch_key</td>\n<td>string</td>\n<td>Yes</td>\n<td>—</td>\n<td>Key identifier for the pitch (e.g., \"product_id\")</td>\n</tr>\n<tr>\n<td>pitch_value</td>\n<td>string</td>\n<td>Yes</td>\n<td>—</td>\n<td>Value corresponding to the pitch key</td>\n</tr>\n<tr>\n<td>subject</td>\n<td>string</td>\n<td>Yes</td>\n<td>—</td>\n<td>Subject or name of the pitched item</td>\n</tr>\n<tr>\n<td>pitch_order</td>\n<td>integer</td>\n<td>No</td>\n<td>null</td>\n<td>Display order of the pitched item</td>\n</tr>\n<tr>\n<td>product_id</td>\n<td>string</td>\n<td>No</td>\n<td>null</td>\n<td>Product ID — must match <code>pitch_value</code> when <code>pitch_key</code> is \"product_id\"</td>\n</tr>\n<tr>\n<td>product_category</td>\n<td>string</td>\n<td>No</td>\n<td>null</td>\n<td>Product category</td>\n</tr>\n<tr>\n<td>source_type</td>\n<td>string</td>\n<td>No</td>\n<td>null</td>\n<td>Source of the pitch</td>\n</tr>\n<tr>\n<td>source_id</td>\n<td>string</td>\n<td>No</td>\n<td>null</td>\n<td>ID of the source</td>\n</tr>\n<tr>\n<td>action</td>\n<td>string</td>\n<td>No</td>\n<td>\"checked\"</td>\n<td>Action status</td>\n</tr>\n</tbody>\n</table>\n</div><h2 id=\"response-format\">Response Format</h2>\n<h3 id=\"success-response-200-ok\">Success Response (200 OK)</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"call_notes\": [\n        {\n            \"id\": \"550e8400-e29b-41d4-a716-446655440000\",\n            \"call_id\": \"a1b2c3d4-e5f6-7890-abcd-ef1234567890\",\n            \"interaction_id\": \"d4e5f6a7-b8c9-0123-def0-456789abcdef\",\n            \"user_id\": \"user-456\",\n            \"customer_id\": \"CUST-12345\",\n            \"date\": \"2025-01-20T14:30:00Z\",\n            \"activity_id\": \"phone_a1b2c3d4-e5f6-7890-abcd-ef1234567890\",\n            \"call_type\": \"phone\",\n            \"notes\": \"Discussed Q1 order forecasts and new product line availability.\",\n            \"tagged_users\": [\n                { \"user_id\": \"user-789\", \"name\": \"Jane Doe\" }\n            ],\n            \"additional_info\": {\n                \"contact_id\": \"CONTACT-001\"\n            },\n            \"associations\": [\n                { \"type\": \"opportunity\", \"opportunity_id\": \"OPP-5678\" },\n                { \"type\": \"quote\", \"quote_id\": \"QUO-9012\" }\n            ],\n            \"custom_fields\": [\n                { \"custom_field_id\": \"call_outcome\", \"value\": \"follow_up_needed\" }\n            ],\n            \"customer_name\": \"ABC Manufacturing Corp\",\n            \"bill_to_id\": \"BILL-001\",\n            \"customer_is_active\": true,\n            \"visibility_ids\": [\"team-sales\"],\n            \"representative_ids\": [\"user-456\"],\n            \"mode\": \"phone\",\n            \"action\": \"general_call_notes\"\n        }\n    ]\n}\n</code></pre>\n<h3 id=\"response-fields\">Response Fields</h3>\n<p>The response contains a <code>call_notes</code> array with one entry per customer specified in the request. Each call note object contains the following fields (null fields are omitted from the response):</p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Type</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>id</td>\n<td>string</td>\n<td>Internal system UUID for the call note</td>\n</tr>\n<tr>\n<td>call_id</td>\n<td>string</td>\n<td>Grouping key shared across the call note and its pitched items</td>\n</tr>\n<tr>\n<td>interaction_id</td>\n<td>string</td>\n<td>Primary key for this individual record</td>\n</tr>\n<tr>\n<td>user_id</td>\n<td>string</td>\n<td>ID of the user who created the call note</td>\n</tr>\n<tr>\n<td>customer_id</td>\n<td>string</td>\n<td>ID of the associated customer</td>\n</tr>\n<tr>\n<td>date</td>\n<td>datetime</td>\n<td>Date and time of the call</td>\n</tr>\n<tr>\n<td>activity_id</td>\n<td>string</td>\n<td>Activity identifier (formatted as <code>phone_{call_id}</code>)</td>\n</tr>\n<tr>\n<td>call_type</td>\n<td>string</td>\n<td>Type of call (e.g., \"phone\")</td>\n</tr>\n<tr>\n<td>notes</td>\n<td>string</td>\n<td>Call note text content (nullable)</td>\n</tr>\n<tr>\n<td>shared_call_id</td>\n<td>string</td>\n<td>Shared ID linking call notes when multiple customers were specified (nullable, only present when more than one customer)</td>\n</tr>\n<tr>\n<td>tagged_users</td>\n<td>array[object]</td>\n<td>List of users tagged/mentioned in the call note</td>\n</tr>\n<tr>\n<td>additional_info</td>\n<td>object</td>\n<td>Extra metadata</td>\n</tr>\n<tr>\n<td>associations</td>\n<td>array[object]</td>\n<td>Linked entities</td>\n</tr>\n<tr>\n<td>custom_fields</td>\n<td>array[object]</td>\n<td>Custom field values</td>\n</tr>\n<tr>\n<td>customer_name</td>\n<td>string</td>\n<td>Name of the associated customer (nullable)</td>\n</tr>\n<tr>\n<td>bill_to_id</td>\n<td>string</td>\n<td>Associated billing account ID (nullable)</td>\n</tr>\n<tr>\n<td>customer_is_active</td>\n<td>boolean</td>\n<td>Whether the associated customer is active (nullable)</td>\n</tr>\n<tr>\n<td>visibility_ids</td>\n<td>array[string]</td>\n<td>IDs of users/teams who can view this call note</td>\n</tr>\n<tr>\n<td>representative_ids</td>\n<td>array[string]</td>\n<td>IDs of associated sales representatives</td>\n</tr>\n<tr>\n<td>mode</td>\n<td>string</td>\n<td>Communication mode (always \"phone\")</td>\n</tr>\n<tr>\n<td>action</td>\n<td>string</td>\n<td>Action type (always \"general_call_notes\" for call notes)</td>\n</tr>\n</tbody>\n</table>\n</div><p><strong>Note:</strong> The <code>pitched_items</code> field is excluded from the response, even though pitched items are created and stored. Use the Get Call Note endpoint to retrieve the full call note with pitched items.</p>\n<h3 id=\"error-responses\">Error Responses</h3>\n<h4 id=\"400-bad-request\">400 Bad Request</h4>\n<p>Returned when the request is malformed, required fields are missing, or referenced entities do not exist.</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"status_message\": \"error\",\n    \"error\": {\n        \"code\": \"BAD_REQUEST\",\n        \"message\": \"The following customer_ids do not exist: ['CUST-99999']\"\n    }\n}\n</code></pre>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"status_message\": \"error\",\n    \"error\": {\n        \"code\": \"BAD_REQUEST\",\n        \"message\": \"The following product_ids do not exist: ['PROD-99999']\"\n    }\n}\n</code></pre>\n<h4 id=\"401-unauthorized\">401 Unauthorized</h4>\n<p>Returned when authentication fails or is missing.</p>\n<h4 id=\"500-internal-server-error\">500 Internal Server Error</h4>\n<p>Returned when an unexpected error occurs on the server.</p>\n<h2 id=\"best-practices\">Best Practices</h2>\n<ul>\n<li><strong>Validate customer and product IDs:</strong> All <code>customer_ids</code> and product IDs referenced in <code>pitched_items</code> must exist in the system. The endpoint returns 400 if any are invalid</li>\n<li><strong>Use pitched_items for product tracking:</strong> When logging a call where specific products were discussed, include them as <code>pitched_items</code> with <code>pitch_key</code> set to \"product_id\" and both <code>pitch_value</code> and <code>product_id</code> set to the product identifier</li>\n<li><strong>Multi-customer calls:</strong> When a call involves multiple customers, pass all customer IDs in <code>customer_ids</code>. The system creates separate but linked call notes (via <code>shared_call_id</code>) for each customer</li>\n<li><strong>Associations for context:</strong> Use the <code>associations</code> array to link the call note to related entities like opportunities, quotes, orders, and campaigns. Quote associations are validated to ensure the quote's customer matches the call note's customer</li>\n<li><strong>Custom fields validation:</strong> Custom fields are validated against the company's configured custom field definitions, including any conditionally-required fields based on call type</li>\n</ul>\n<h2 id=\"notes\">Notes</h2>\n<ul>\n<li>One call note record is created per customer in <code>customer_ids</code>. If three customers are specified, three call note records are created, each with its own unique <code>id</code>, <code>call_id</code>, and <code>interaction_id</code></li>\n<li>When multiple customers are specified, all resulting call notes are linked via a <code>shared_call_id</code> field</li>\n<li>Duplicate <code>customer_ids</code> are automatically deduplicated</li>\n<li>The <code>user_id</code> field is automatically lowercased</li>\n<li>The <code>date</code> field defaults to the current time if not provided</li>\n<li>File attachments are handled via multipart form data and are associated with all created call notes</li>\n<li>The <code>notes</code> field supports HTML rich-text content</li>\n<li>Pitched items are stored in the database but are excluded from the create response. Use the Get Call Note endpoint to retrieve them</li>\n<li>The <code>activity_id</code> is auto-generated in the format <code>phone_{call_id}</code></li>\n<li>Side effects triggered on creation include: updating last contact dates on associated entities (customers, opportunities, quotes, orders, campaigns, contacts), sending notifications to tagged users, caching interaction data, and publishing a <code>call_note.created</code> webhook event</li>\n</ul>\n","urlObject":{"path":["{{company}}","v1","call_notes"],"host":["{{domain}}"],"query":[],"variable":[]}},"response":[{"id":"d429aba3-8b52-4073-9a0a-5fa7b1685faa","name":"Create Call Note V1","originalRequest":{"method":"POST","header":[{"key":"X-User-Id","value":"{{user_id}}","type":"text"},{"key":"X-Company","value":"{{company}}","type":"text"},{"key":"X-Api-Key","value":"{{api_key}}","type":"text"}],"body":{"mode":"raw","raw":"{\n    \"user_id\": \"user-456\",\n    \"customer_ids\": [\"CUST-12345\"],\n    \"call_type\": \"phone\",\n    \"notes\": \"Discussed Q1 order forecasts and new product line availability.\",\n    \"date\": \"2025-01-20T14:30:00Z\",\n    \"tagged_users\": [\n        { \"user_id\": \"user-789\", \"name\": \"Jane Doe\" }\n    ],\n    \"custom_fields\": [\n        { \"custom_field_id\": \"call_outcome\", \"value\": \"follow_up_needed\" }\n    ],\n    \"additional_info\": {\n        \"contact_id\": \"CONTACT-001\"\n    },\n    \"associations\": [\n        { \"type\": \"opportunity\", \"opportunity_id\": \"OPP-5678\" },\n        { \"type\": \"quote\", \"quote_id\": \"QUO-9012\" }\n    ],\n    \"pitched_items\": [\n        {\n            \"pitch_key\": \"product_id\",\n            \"pitch_value\": \"PROD-001\",\n            \"product_id\": \"PROD-001\",\n            \"subject\": \"Industrial Widget A\",\n            \"pitch_order\": 1\n        }\n    ]\n}","options":{"raw":{"language":"json"}}},"url":"{{domain}}/{{company}}/v1/call_notes"},"_postman_previewlanguage":"","header":[],"cookie":[{"expires":"Invalid Date","domain":"","path":""}],"responseTime":null,"body":"{\n    \"call_notes\": [\n        {\n            \"id\": \"550e8400-e29b-41d4-a716-446655440000\",\n            \"call_id\": \"a1b2c3d4-e5f6-7890-abcd-ef1234567890\",\n            \"interaction_id\": \"d4e5f6a7-b8c9-0123-def0-456789abcdef\",\n            \"user_id\": \"user-456\",\n            \"customer_id\": \"CUST-12345\",\n            \"date\": \"2025-01-20T14:30:00Z\",\n            \"activity_id\": \"phone_a1b2c3d4-e5f6-7890-abcd-ef1234567890\",\n            \"call_type\": \"phone\",\n            \"notes\": \"Discussed Q1 order forecasts and new product line availability.\",\n            \"tagged_users\": [\n                { \"user_id\": \"user-789\", \"name\": \"Jane Doe\" }\n            ],\n            \"additional_info\": {\n                \"contact_id\": \"CONTACT-001\"\n            },\n            \"associations\": [\n                { \"type\": \"opportunity\", \"opportunity_id\": \"OPP-5678\" },\n                { \"type\": \"quote\", \"quote_id\": \"QUO-9012\" }\n            ],\n            \"custom_fields\": [\n                { \"custom_field_id\": \"call_outcome\", \"value\": \"follow_up_needed\" }\n            ],\n            \"customer_name\": \"ABC Manufacturing Corp\",\n            \"bill_to_id\": \"BILL-001\",\n            \"customer_is_active\": true,\n            \"visibility_ids\": [\"team-sales\"],\n            \"representative_ids\": [\"user-456\"],\n            \"mode\": \"phone\",\n            \"action\": \"general_call_notes\"\n        }\n    ]\n}"}],"_postman_id":"d55fa789-81b4-42f4-ae0d-c7ccb0144755"},{"name":"Edit Call Note V1","id":"f0687ac5-4979-402d-b86d-030cb8d61fb3","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"PUT","header":[{"key":"X-User-Id","value":"{{user_id}}","type":"text"},{"key":"X-Company","value":"{{company}}","type":"text"},{"key":"X-Api-Key","value":"{{api_key}}","type":"text"}],"url":"{{domain}}/{{company}}/v1/call_notes/{identifier}","description":"<h1 id=\"call-note-edit-api-v1\">Call Note Edit API v1</h1>\n<h2 id=\"overview\">Overview</h2>\n<p>The Call Note Edit API v1 endpoint allows you to update an existing call note by its identifier within a specific company. The endpoint accepts updated call details including notes text, call type, tagged users, custom fields, associations, and file attachments. Only the original creator of the call note can edit it. The response returns the updated call note with all current field values.</p>\n<h2 id=\"endpoint\">Endpoint</h2>\n<p><strong>Method:</strong> PUT\n<strong>URL:</strong> <code>{{domain}}/{{company}}/v1/call_notes/{{identifier}}</code></p>\n<h2 id=\"request-format\">Request Format</h2>\n<h3 id=\"url-parameters\">URL Parameters</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Parameter</th>\n<th>Type</th>\n<th>Required</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>company</td>\n<td>string</td>\n<td>Yes</td>\n<td>The company identifier for multi-tenant data isolation</td>\n</tr>\n<tr>\n<td>identifier</td>\n<td>string</td>\n<td>Yes</td>\n<td>The call note identifier. Can be either the <code>interaction_id</code> (primary key) or <code>id</code> (internal UUID). <strong>Note:</strong> this is not the same as <code>call_id</code> — see Notes section</td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"headers\">Headers</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Header</th>\n<th>Type</th>\n<th>Required</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>X-Company</td>\n<td>string</td>\n<td>Yes</td>\n<td>The company identifier for multi-tenant data isolation. Must match the <code>company</code> in the URL path</td>\n</tr>\n<tr>\n<td>X-User-ID</td>\n<td>string</td>\n<td>Yes</td>\n<td>The user identifier (email or user ID) making the request. Must match the original call note creator</td>\n</tr>\n<tr>\n<td>X-Api-Key</td>\n<td>string</td>\n<td>Yes</td>\n<td>RS256-signed JWT API key for authentication. The token's <code>company</code> and <code>user_id</code> claims must match the corresponding headers</td>\n</tr>\n<tr>\n<td>Content-Type</td>\n<td>string</td>\n<td>Yes</td>\n<td><code>application/json</code> (or <code>multipart/form-data</code> when sending file attachments)</td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"request-body-parameters\">Request Body Parameters</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Parameter</th>\n<th>Type</th>\n<th>Required</th>\n<th>Default</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>notes</td>\n<td>string</td>\n<td>No</td>\n<td>\"\"</td>\n<td>Updated text content of the call note (supports HTML rich-text format). Defaults to empty string if omitted</td>\n</tr>\n<tr>\n<td>call_type</td>\n<td>string</td>\n<td>No</td>\n<td>\"phone\"</td>\n<td>Updated type of call (e.g., \"phone\"). Defaults to \"phone\" if omitted</td>\n</tr>\n<tr>\n<td>tagged_users</td>\n<td>array[TaggedUser]</td>\n<td>No</td>\n<td>null</td>\n<td>Updated list of tagged users. If provided, replaces the existing list. If omitted (<code>null</code>), existing tagged users are preserved</td>\n</tr>\n<tr>\n<td>custom_fields</td>\n<td>array[CustomFieldInstance]</td>\n<td>No</td>\n<td>null</td>\n<td>Updated custom field values. If provided, replaces existing values. If empty array <code>[]</code>, clears all custom fields. If omitted (<code>null</code>), existing values are preserved</td>\n</tr>\n<tr>\n<td>additional_info</td>\n<td>object or array</td>\n<td>No</td>\n<td>null</td>\n<td>Updated extra metadata. If omitted (<code>null</code>), existing value is preserved. Supports both dict and array formats (legacy)</td>\n</tr>\n<tr>\n<td>associations</td>\n<td>array[object]</td>\n<td>No</td>\n<td>null</td>\n<td>Updated linked entities. If provided, replaces the existing list (removed file associations are deleted). If omitted (<code>null</code>), existing associations are preserved</td>\n</tr>\n<tr>\n<td>attachments</td>\n<td>array[file]</td>\n<td>No</td>\n<td>[]</td>\n<td>New file attachments to add (sent as multipart form data). These are appended to the associations list</td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"example-url\">Example URL</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>PUT /acme-corp/v1/call_notes/550e8400-e29b-41d4-a716-446655440000\n</code></pre><h3 id=\"example-request\">Example Request</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>curl -X PUT \"https://api.proton.ai/acme-corp/v1/call_notes/550e8400-e29b-41d4-a716-446655440000\" \\\n  -H \"X-Company: acme-corp\" \\\n  -H \"X-User-ID: user-456\" \\\n  -H \"X-Api-Key: &lt;api_key&gt;\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n    \"notes\": \"Updated: Discussed Q1 order forecasts. Customer confirmed bulk order for widget series.\",\n    \"call_type\": \"phone\",\n    \"tagged_users\": [\n        { \"user_id\": \"user-789\", \"name\": \"Jane Doe\" },\n        { \"user_id\": \"user-101\", \"name\": \"Bob Johnson\" }\n    ],\n    \"custom_fields\": [\n        { \"custom_field_id\": \"call_outcome\", \"value\": \"order_confirmed\" }\n    ],\n    \"associations\": [\n        { \"type\": \"opportunity\", \"opportunity_id\": \"OPP-5678\" },\n        { \"type\": \"quote\", \"quote_id\": \"QUO-9012\" },\n        { \"type\": \"order\", \"order_id\": \"ORD-3456\" }\n    ]\n}'\n</code></pre><h3 id=\"nested-object-definitions-request\">Nested Object Definitions (Request)</h3>\n<h4 id=\"taggeduser-object\">TaggedUser Object</h4>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Type</th>\n<th>Required</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>user_id</td>\n<td>string</td>\n<td>Yes</td>\n<td>ID of the tagged user</td>\n</tr>\n<tr>\n<td>name</td>\n<td>string</td>\n<td>No</td>\n<td>Display name of the tagged user</td>\n</tr>\n</tbody>\n</table>\n</div><h4 id=\"customfieldinstance-object\">CustomFieldInstance Object</h4>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Type</th>\n<th>Required</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>custom_field_id</td>\n<td>string</td>\n<td>Yes</td>\n<td>The identifier of the custom field</td>\n</tr>\n<tr>\n<td>value</td>\n<td>any</td>\n<td>Yes</td>\n<td>The value for the custom field</td>\n</tr>\n<tr>\n<td>display_value</td>\n<td>object</td>\n<td>No</td>\n<td>Optional display value mapping</td>\n</tr>\n</tbody>\n</table>\n</div><h4 id=\"association-object\">Association Object</h4>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Type</th>\n<th>Required</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>type</td>\n<td>string</td>\n<td>Yes</td>\n<td>Entity type (e.g., \"opportunity\", \"quote\", \"order\", \"campaign\", \"file\")</td>\n</tr>\n<tr>\n<td>opportunity_id</td>\n<td>string</td>\n<td>No</td>\n<td>Opportunity ID (when type is \"opportunity\")</td>\n</tr>\n<tr>\n<td>quote_id</td>\n<td>string</td>\n<td>No</td>\n<td>Quote ID (when type is \"quote\")</td>\n</tr>\n<tr>\n<td>order_id</td>\n<td>string</td>\n<td>No</td>\n<td>Order ID (when type is \"order\")</td>\n</tr>\n<tr>\n<td>campaign_id</td>\n<td>string</td>\n<td>No</td>\n<td>Campaign ID (when type is \"campaign\")</td>\n</tr>\n<tr>\n<td>file_id</td>\n<td>string</td>\n<td>No</td>\n<td>File ID (when type is \"file\")</td>\n</tr>\n<tr>\n<td>customer_id</td>\n<td>string</td>\n<td>No</td>\n<td>Customer ID for the association</td>\n</tr>\n<tr>\n<td>contact_id</td>\n<td>string</td>\n<td>No</td>\n<td>Contact ID for the association</td>\n</tr>\n<tr>\n<td>document_id</td>\n<td>string</td>\n<td>No</td>\n<td>Document ID for the association</td>\n</tr>\n<tr>\n<td>product_id</td>\n<td>string</td>\n<td>No</td>\n<td>Product ID for the association</td>\n</tr>\n<tr>\n<td>user_id</td>\n<td>string</td>\n<td>No</td>\n<td>User ID for the association</td>\n</tr>\n<tr>\n<td>task_id</td>\n<td>string</td>\n<td>No</td>\n<td>Task ID for the association</td>\n</tr>\n<tr>\n<td>call_id</td>\n<td>string</td>\n<td>No</td>\n<td>Call ID for the association</td>\n</tr>\n</tbody>\n</table>\n</div><h2 id=\"response-format\">Response Format</h2>\n<h3 id=\"success-response-200-ok\">Success Response (200 OK)</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"id\": \"550e8400-e29b-41d4-a716-446655440000\",\n    \"call_id\": \"CALL-12345\",\n    \"interaction_id\": \"INT-78901\",\n    \"user_id\": \"user-456\",\n    \"customer_id\": \"CUST-12345\",\n    \"call_type\": \"phone\",\n    \"date\": \"2025-01-20T14:30:00Z\",\n    \"notes\": \"Updated: Discussed Q1 order forecasts. Customer confirmed bulk order for widget series.\",\n    \"action\": \"general_call_notes\",\n    \"mode\": \"phone\",\n    \"tagged_users\": [\n        { \"user_id\": \"user-789\", \"name\": \"Jane Doe\" },\n        { \"user_id\": \"user-101\", \"name\": \"Bob Johnson\" }\n    ],\n    \"custom_fields\": [\n        { \"custom_field_id\": \"call_outcome\", \"value\": \"order_confirmed\" }\n    ],\n    \"associations\": [\n        { \"type\": \"opportunity\", \"opportunity_id\": \"OPP-5678\" },\n        { \"type\": \"quote\", \"quote_id\": \"QUO-9012\" },\n        { \"type\": \"order\", \"order_id\": \"ORD-3456\" }\n    ],\n    \"additional_info\": {\n        \"contact_id\": \"CONTACT-001\"\n    },\n    \"last_edited_date\": \"2025-01-21T09:15:30.123456\"\n}\n</code></pre>\n<h3 id=\"response-fields\">Response Fields</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Type</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>id</td>\n<td>string</td>\n<td>Internal system UUID for the call note (nullable)</td>\n</tr>\n<tr>\n<td>call_id</td>\n<td>string</td>\n<td>Grouping key shared across the call note and its pitched items</td>\n</tr>\n<tr>\n<td>interaction_id</td>\n<td>string</td>\n<td>Primary key for this individual record</td>\n</tr>\n<tr>\n<td>user_id</td>\n<td>string</td>\n<td>ID of the user who created the call note</td>\n</tr>\n<tr>\n<td>customer_id</td>\n<td>string</td>\n<td>ID of the associated customer</td>\n</tr>\n<tr>\n<td>call_type</td>\n<td>string</td>\n<td>Type of call (e.g., \"phone\")</td>\n</tr>\n<tr>\n<td>date</td>\n<td>datetime</td>\n<td>Original date and time of the call (nullable)</td>\n</tr>\n<tr>\n<td>notes</td>\n<td>string</td>\n<td>Updated call note text content (nullable)</td>\n</tr>\n<tr>\n<td>action</td>\n<td>string</td>\n<td>Action type — always \"general_call_notes\" for the main call note record</td>\n</tr>\n<tr>\n<td>mode</td>\n<td>string</td>\n<td>Communication mode (e.g., \"phone\")</td>\n</tr>\n<tr>\n<td>tagged_users</td>\n<td>array[object]</td>\n<td>Current list of tagged/mentioned users</td>\n</tr>\n<tr>\n<td>custom_fields</td>\n<td>array[CustomFieldInstance]</td>\n<td>Current custom field values</td>\n</tr>\n<tr>\n<td>associations</td>\n<td>array[object]</td>\n<td>Current linked entities</td>\n</tr>\n<tr>\n<td>additional_info</td>\n<td>object or array</td>\n<td>Current extra metadata (legacy: can be dict or array)</td>\n</tr>\n<tr>\n<td>last_edited_date</td>\n<td>string</td>\n<td>ISO 8601 timestamp of this edit</td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"error-responses\">Error Responses</h3>\n<h4 id=\"400-bad-request\">400 Bad Request</h4>\n<p>Returned when the request is malformed or the identifier is missing.</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"status_message\": \"error\",\n    \"error\": {\n        \"code\": \"BAD_REQUEST\",\n        \"message\": \"Either call_id or identifier must be provided\"\n    }\n}\n</code></pre>\n<h4 id=\"401-unauthorized\">401 Unauthorized</h4>\n<p>Returned when authentication fails, is missing, or the requesting user is not the call note owner.</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"status_message\": \"error\",\n    \"error\": {\n        \"code\": \"UNAUTHORIZED\",\n        \"message\": \"Requesting user user-999 does not have permission to edit this interaction created by user-456\"\n    }\n}\n</code></pre>\n<h4 id=\"404-not-found\">404 Not Found</h4>\n<p>Returned when the specified call note does not exist.</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"status_message\": \"error\",\n    \"error\": {\n        \"code\": \"NOT_FOUND\",\n        \"message\": \"No call note found with identifier 'INT-99999'\"\n    }\n}\n</code></pre>\n<h4 id=\"500-internal-server-error\">500 Internal Server Error</h4>\n<p>Returned when an unexpected error occurs on the server (e.g., file attachment upload failure).</p>\n<h2 id=\"best-practices\">Best Practices</h2>\n<ul>\n<li><strong>Ownership required:</strong> Only the original creator of the call note (matched via <code>X-User-ID</code> header) can edit it. Attempting to edit another user's call note returns 401</li>\n<li><strong>Understand null vs empty vs omitted:</strong> Fields set to <code>null</code> (or omitted) preserve existing values. Fields set to an empty array <code>[]</code> clear existing values. Fields set to a new value replace existing values entirely</li>\n<li><strong>Managing associations:</strong> When updating <code>associations</code>, provide the complete desired list. Any file associations present in the old list but absent in the new list will be deleted. New file <code>attachments</code> are automatically appended to the associations list</li>\n<li><strong>Tagged user notifications:</strong> Only newly tagged users (those not in the previous tagged users list) receive notifications. Re-sending the same tagged users list does not trigger duplicate notifications</li>\n</ul>\n<h2 id=\"notes\">Notes</h2>\n<ul>\n<li>The <code>identifier</code> path parameter is <strong>not</strong> the same as <code>call_id</code>. The <code>call_id</code> is a grouping key shared by the call note and all its pitched items. The <code>identifier</code> resolves to the individual record's <code>interaction_id</code> or <code>id</code>, and the system then uses the resolved record's <code>call_id</code> internally</li>\n<li>Only the call note owner can edit — the <code>X-User-ID</code> header must match the <code>user_id</code> stored on the call note</li>\n<li>The <code>last_edited_date</code> field is automatically set to the current UTC time on every edit</li>\n<li>The <code>date</code> field (original call date) cannot be changed via this endpoint</li>\n<li>The <code>notes</code> field defaults to an empty string if omitted from the request body — to preserve existing notes, include the current value</li>\n<li>The <code>call_type</code> field defaults to \"phone\" if omitted — to preserve the existing call type, include the current value</li>\n<li>File attachments removed from the <code>associations</code> list are soft-deleted asynchronously. Deletion failures are logged but do not cause the request to fail</li>\n<li>Notifications are sent to newly tagged users only, including push notifications and emails with call note details, product information, and a direct link to the call note</li>\n<li>A <code>call_note.updated</code> webhook event is published after a successful edit, including the full call note details and any pitched items</li>\n</ul>\n","urlObject":{"path":["{{company}}","v1","call_notes","{identifier}"],"host":["{{domain}}"],"query":[],"variable":[]}},"response":[{"id":"666768f2-d4fd-452a-b486-66d9b04f65a9","name":"Edit Call Note V1","originalRequest":{"method":"PUT","header":[{"key":"X-User-Id","value":"{{user_id}}","type":"text"},{"key":"X-Company","value":"{{company}}","type":"text"},{"key":"X-Api-Key","value":"{{api_key}}","type":"text"}],"body":{"mode":"raw","raw":"{\n    \"notes\": \"Updated: Discussed Q1 order forecasts. Customer confirmed bulk order for widget series.\",\n    \"call_type\": \"phone\",\n    \"tagged_users\": [\n        { \"user_id\": \"user-789\", \"name\": \"Jane Doe\" },\n        { \"user_id\": \"user-101\", \"name\": \"Bob Johnson\" }\n    ],\n    \"custom_fields\": [\n        { \"custom_field_id\": \"call_outcome\", \"value\": \"order_confirmed\" }\n    ],\n    \"associations\": [\n        { \"type\": \"opportunity\", \"opportunity_id\": \"OPP-5678\" },\n        { \"type\": \"quote\", \"quote_id\": \"QUO-9012\" },\n        { \"type\": \"order\", \"order_id\": \"ORD-3456\" }\n    ]\n}","options":{"raw":{"language":"json"}}},"url":"{{domain}}/{{company}}/v1/call_notes/550e8400-e29b-41d4-a716-446655440000"},"_postman_previewlanguage":"","header":[],"cookie":[{"expires":"Invalid Date","domain":"","path":""}],"responseTime":null,"body":"{\n    \"id\": \"550e8400-e29b-41d4-a716-446655440000\",\n    \"call_id\": \"CALL-12345\",\n    \"interaction_id\": \"INT-78901\",\n    \"user_id\": \"user-456\",\n    \"customer_id\": \"CUST-12345\",\n    \"call_type\": \"phone\",\n    \"date\": \"2025-01-20T14:30:00Z\",\n    \"notes\": \"Updated: Discussed Q1 order forecasts. Customer confirmed bulk order for widget series.\",\n    \"action\": \"general_call_notes\",\n    \"mode\": \"phone\",\n    \"tagged_users\": [\n        { \"user_id\": \"user-789\", \"name\": \"Jane Doe\" },\n        { \"user_id\": \"user-101\", \"name\": \"Bob Johnson\" }\n    ],\n    \"custom_fields\": [\n        { \"custom_field_id\": \"call_outcome\", \"value\": \"order_confirmed\" }\n    ],\n    \"associations\": [\n        { \"type\": \"opportunity\", \"opportunity_id\": \"OPP-5678\" },\n        { \"type\": \"quote\", \"quote_id\": \"QUO-9012\" },\n        { \"type\": \"order\", \"order_id\": \"ORD-3456\" }\n    ],\n    \"additional_info\": {\n        \"contact_id\": \"CONTACT-001\"\n    },\n    \"last_edited_date\": \"2025-01-21T09:15:30.123456\"\n}"}],"_postman_id":"f0687ac5-4979-402d-b86d-030cb8d61fb3"},{"name":"Delete Call Note V1","id":"9ec55157-8a00-4bdd-980f-6da4c5e9e1d4","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"DELETE","header":[{"key":"X-User-Id","value":"{{user_id}}","type":"text"},{"key":"X-Company","value":"{{company}}","type":"text"},{"key":"X-Api-Key","value":"{{api_key}}","type":"text"}],"url":"{{domain}}/{{company}}/v1/call_notes/{identifier}","description":"<h1 id=\"call-note-delete-api-v1\">Call Note Delete API v1</h1>\n<h2 id=\"overview\">Overview</h2>\n<p>The Call Note Delete API v1 endpoint allows you to delete an existing call note by its identifier within a specific company. Deleting a call note permanently removes the call note record and all associated pitched items from the database. Associated files are soft-deleted, comments are soft-deleted, and interaction snapshots are created as an audit trail before deletion. Related entities (customers, contacts, opportunities, quotes, orders) have their last contact dates recalculated. Only the original creator of the call note can delete it.</p>\n<h2 id=\"endpoint\">Endpoint</h2>\n<p><strong>Method:</strong> DELETE<br /><strong>URL:</strong> <code>{{domain}}/{{company}}/v1/call_notes/{{identifier}}</code></p>\n<h2 id=\"request-format\">Request Format</h2>\n<h3 id=\"url-parameters\">URL Parameters</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Parameter</th>\n<th>Type</th>\n<th>Required</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>company</td>\n<td>string</td>\n<td>Yes</td>\n<td>The company identifier for multi-tenant data isolation</td>\n</tr>\n<tr>\n<td>identifier</td>\n<td>string</td>\n<td>Yes</td>\n<td>The call note identifier. Can be either the <code>interaction_id</code> (primary key) or <code>id</code> (internal UUID). <strong>Note:</strong> this is not the same as <code>call_id</code> — see Notes section</td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"headers\">Headers</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Header</th>\n<th>Type</th>\n<th>Required</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>X-Company</td>\n<td>string</td>\n<td>Yes</td>\n<td>The company identifier for multi-tenant data isolation. Must match the <code>company</code> in the URL path</td>\n</tr>\n<tr>\n<td>X-User-ID</td>\n<td>string</td>\n<td>Yes</td>\n<td>The user identifier (email or user ID) making the request. Must match the original call note creator</td>\n</tr>\n<tr>\n<td>X-Api-Key</td>\n<td>string</td>\n<td>Yes</td>\n<td>RS256-signed JWT API key for authentication. The token's <code>company</code> and <code>user_id</code> claims must match the corresponding headers</td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"example-url\">Example URL</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>DELETE /acme-corp/v1/call_notes/550e8400-e29b-41d4-a716-446655440000\n\n</code></pre><h3 id=\"example-request\">Example Request</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>curl -X DELETE \"https://api.proton.ai/acme-corp/v1/call_notes/550e8400-e29b-41d4-a716-446655440000\" \\\n  -H \"X-Company: acme-corp\" \\\n  -H \"X-User-ID: user-456\" \\\n  -H \"X-Api-Key: &lt;api_key&gt;\"\n\n</code></pre><h2 id=\"response-format\">Response Format</h2>\n<h3 id=\"success-response-200-ok\">Success Response (200 OK)</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"message\": \"Successfully deleted call note\"\n}\n\n</code></pre>\n<h3 id=\"response-fields\">Response Fields</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Type</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>message</td>\n<td>string</td>\n<td>Confirmation message indicating successful deletion</td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"error-responses\">Error Responses</h3>\n<h4 id=\"400-bad-request\">400 Bad Request</h4>\n<p>Returned when the call note has pitched products and is older than 24 hours.</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"status_message\": \"error\",\n    \"error\": {\n        \"code\": \"BAD_REQUEST\",\n        \"message\": \"Call notes with pitched products cannot be deleted after 24 hours\"\n    }\n}\n\n</code></pre>\n<p>Returned when the call note has pitched products that are attributed.</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"status_message\": \"error\",\n    \"error\": {\n        \"code\": \"BAD_REQUEST\",\n        \"message\": \"Call note with pitched products cannot be deleted when it's attributed\"\n    }\n}\n\n</code></pre>\n<h4 id=\"401-unauthorized\">401 Unauthorized</h4>\n<p>Returned when authentication fails, is missing, or the requesting user is not the call note owner.</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"status_message\": \"error\",\n    \"error\": {\n        \"code\": \"UNAUTHORIZED\",\n        \"message\": \"Requesting user user-999 does not have permission to delete this interaction created by user-456\"\n    }\n}\n\n</code></pre>\n<h4 id=\"404-not-found\">404 Not Found</h4>\n<p>Returned when the specified call note does not exist.</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"status_message\": \"error\",\n    \"error\": {\n        \"code\": \"NOT_FOUND\",\n        \"message\": \"No call note found with identifier 'INT-99999'\"\n    }\n}\n\n</code></pre>\n<h4 id=\"500-internal-server-error\">500 Internal Server Error</h4>\n<p>Returned when an unexpected error occurs on the server.</p>\n<h2 id=\"deletion-restrictions\">Deletion Restrictions</h2>\n<p>Call notes with pitched products have additional restrictions:</p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Condition</th>\n<th>Can Delete?</th>\n<th>Details</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>No pitched products</td>\n<td>Yes</td>\n<td>No restrictions — can be deleted at any time</td>\n</tr>\n<tr>\n<td>Has pitched products, within 24 hours</td>\n<td>Yes</td>\n<td>Allowed if no attributed products</td>\n</tr>\n<tr>\n<td>Has pitched products, after 24 hours</td>\n<td>No</td>\n<td>Returns 400 — \"cannot be deleted after 24 hours\"</td>\n</tr>\n<tr>\n<td>Has attributed pitched products</td>\n<td>No</td>\n<td>Returns 400 — \"cannot be deleted when it's attributed\" (regardless of age)</td>\n</tr>\n</tbody>\n</table>\n</div><h2 id=\"what-gets-deleted\">What Gets Deleted</h2>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Resource</th>\n<th>Deletion Type</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>Call note record</td>\n<td>Hard delete</td>\n<td>Permanently removed from the database</td>\n</tr>\n<tr>\n<td>Pitched items</td>\n<td>Hard delete</td>\n<td>All pitched product records for this call are permanently removed</td>\n</tr>\n<tr>\n<td>Associations</td>\n<td>Hard delete</td>\n<td>All entity associations (opportunities, quotes, orders, etc.) are removed</td>\n</tr>\n<tr>\n<td>File attachments</td>\n<td>Soft delete</td>\n<td>Associated files are soft-deleted from the file system</td>\n</tr>\n<tr>\n<td>Comments</td>\n<td>Soft delete</td>\n<td>All comments on the call note are soft-deleted</td>\n</tr>\n<tr>\n<td>Redis cache</td>\n<td>Cleared</td>\n<td>Pitched product cache entries are removed (when pitched products exist)</td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"data-preserved\">Data Preserved</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Resource</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>Interaction snapshots</td>\n<td>Created as an audit trail before deletion for all interactions (call note + pitched items)</td>\n</tr>\n<tr>\n<td>Related entity dates</td>\n<td>Last contact dates on customers, contacts, opportunities, quotes, and orders are recalculated based on remaining interactions</td>\n</tr>\n</tbody>\n</table>\n</div><h2 id=\"best-practices\">Best Practices</h2>\n<ul>\n<li><p><strong>Ownership required:</strong> Only the original creator of the call note (matched via <code>X-User-ID</code> header) can delete it. Attempting to delete another user's call note returns 401</p>\n</li>\n<li><p><strong>Check for pitched products:</strong> Call notes with pitched products have a 24-hour deletion window. Plan deletions accordingly</p>\n</li>\n<li><p><strong>Attribution blocks deletion:</strong> If any pitched product has been attributed (linked to revenue), the call note cannot be deleted at all</p>\n</li>\n<li><p><strong>Deletion is permanent:</strong> The call note and pitched items are hard-deleted from the database. Interaction snapshots provide an audit trail, but the records cannot be restored via the API</p>\n</li>\n</ul>\n<h2 id=\"notes\">Notes</h2>\n<ul>\n<li><p>The <code>identifier</code> path parameter is <strong>not</strong> the same as <code>call_id</code>. The <code>call_id</code> is a grouping key shared by the call note and all its pitched items. The <code>identifier</code> resolves to the individual record's <code>interaction_id</code> or <code>id</code>, and the system then uses the resolved record's <code>call_id</code> internally</p>\n</li>\n<li><p>Only the call note owner can delete — the <code>X-User-ID</code> header must match the <code>user_id</code> stored on the call note</p>\n</li>\n<li><p>Deleting a call note also deletes all associated pitched items in the same database operation</p>\n</li>\n<li><p>Interaction snapshots are created for both the call note and all pitched items before deletion, preserving an audit trail</p>\n</li>\n<li><p>After deletion, <code>last_contact_date</code> is recalculated on all related entities: the associated customer (handling both bill-to and ship-to relationships), contacts (from both associations and <code>additional_info.contact_id</code>), opportunities, quotes, and orders</p>\n</li>\n<li><p>Quote and order associations referencing the deleted call note are cleaned up on those entities</p>\n</li>\n<li><p>A <code>call_note.deleted</code> webhook event is published after successful deletion, including the full call note details and pitched items in the payload</p>\n</li>\n<li><p>Redis cache entries for pitched products are cleared when the call note had pitched items</p>\n</li>\n</ul>\n","urlObject":{"path":["{{company}}","v1","call_notes","{identifier}"],"host":["{{domain}}"],"query":[],"variable":[]}},"response":[{"id":"59ad5634-1113-457d-b55f-b059552febb5","name":"Delete Call Note V1","originalRequest":{"method":"DELETE","header":[{"key":"X-User-Id","value":"{{user_id}}","type":"text"},{"key":"X-Company","value":"{{company}}","type":"text"},{"key":"X-Api-Key","value":"{{api_key}}","type":"text"}],"url":"{{domain}}/{{company}}/v1/call_notes/550e8400-e29b-41d4-a716-446655440000"},"_postman_previewlanguage":"","header":[],"cookie":[{"expires":"Invalid Date","domain":"","path":""}],"responseTime":null,"body":"{\n    \"message\": \"Successfully deleted call note\"\n}"}],"_postman_id":"9ec55157-8a00-4bdd-980f-6da4c5e9e1d4"},{"name":"Get Call Note V1","id":"cfd3a2b4-2820-4f65-bf8a-fedf7ca9dc0d","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"X-User-Id","value":"{{user_id}}","type":"text"},{"key":"X-Company","value":"{{company}}","type":"text"},{"key":"X-Api-Key","value":"{{api_key}}","type":"text"}],"url":"{{domain}}/{{company}}/v1/call_notes/{identifier}","description":"<h1 id=\"call-note-get-api-v1\">Call Note Get API v1</h1>\n<h2 id=\"overview\">Overview</h2>\n<p>The Call Note Get API v1 endpoint allows you to retrieve a single call note by its identifier within a specific company. The endpoint returns comprehensive call note information including core call details, tagged users, custom fields, associations (linked entities such as opportunities, quotes, and files), customer information, and pitched items (products presented during the call). Call notes represent logged interactions between sales representatives and customers, capturing the details and outcomes of calls.</p>\n<h2 id=\"endpoint\">Endpoint</h2>\n<p><strong>Method:</strong> GET\n<strong>URL:</strong> <code>{{domain}}/{{company}}/v1/call_notes/{{identifier}}</code></p>\n<h2 id=\"request-format\">Request Format</h2>\n<h3 id=\"url-parameters\">URL Parameters</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Parameter</th>\n<th>Type</th>\n<th>Required</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>company</td>\n<td>string</td>\n<td>Yes</td>\n<td>The company identifier for multi-tenant data isolation</td>\n</tr>\n<tr>\n<td>identifier</td>\n<td>string</td>\n<td>Yes</td>\n<td>The call note identifier. Can be either the <code>interaction_id</code> (primary key) or <code>id</code> (internal UUID). <strong>Note:</strong> this is not the same as <code>call_id</code> — see Notes section</td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"headers\">Headers</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Header</th>\n<th>Type</th>\n<th>Required</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>X-Company</td>\n<td>string</td>\n<td>Yes</td>\n<td>The company identifier for multi-tenant data isolation. Must match the <code>company</code> in the URL path</td>\n</tr>\n<tr>\n<td>X-User-ID</td>\n<td>string</td>\n<td>Yes</td>\n<td>The user identifier (email or user ID) making the request</td>\n</tr>\n<tr>\n<td>X-Api-Key</td>\n<td>string</td>\n<td>Yes</td>\n<td>RS256-signed JWT API key for authentication. The token's <code>company</code> and <code>user_id</code> claims must match the corresponding headers</td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"example-urls\">Example URLs</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>GET /acme-corp/v1/call_notes/INT-78901\nGET /acme-corp/v1/call_notes/550e8400-e29b-41d4-a716-446655440000\n</code></pre><h3 id=\"example-request\">Example Request</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>curl -X GET \"https://api.proton.ai/acme-corp/v1/call_notes/550e8400-e29b-41d4-a716-446655440000\" \\\n  -H \"X-Company: acme-corp\" \\\n  -H \"X-User-ID: user-456\" \\\n  -H \"X-Api-Key: &lt;api_key&gt;\"\n</code></pre><h2 id=\"response-format\">Response Format</h2>\n<h3 id=\"success-response-200-ok\">Success Response (200 OK)</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"id\": \"550e8400-e29b-41d4-a716-446655440000\",\n    \"call_id\": \"CALL-12345\",\n    \"interaction_id\": \"INT-78901\",\n    \"user_id\": \"user-456\",\n    \"customer_id\": \"CUST-12345\",\n    \"call_type\": \"phone\",\n    \"date\": \"2025-01-20T14:30:00Z\",\n    \"notes\": \"Discussed Q1 order forecasts and new product line availability. Customer interested in bulk pricing for widget series.\",\n    \"action\": \"general_call_notes\",\n    \"mode\": \"phone\",\n    \"shared_call_id\": null,\n    \"tagged_users\": [\n        { \"id\": \"user-789\", \"name\": \"Jane Doe\" }\n    ],\n    \"custom_fields\": [\n        { \"field_id\": \"call_outcome\", \"value\": \"follow_up_needed\" },\n        { \"field_id\": \"next_steps\", \"value\": \"Send updated pricing sheet\" }\n    ],\n    \"attachments\": [\n        { \"file_name\": \"pricing_sheet_q1.pdf\", \"url\": \"https://storage.example.com/files/pricing_sheet_q1.pdf\" }\n    ],\n    \"associations\": [\n        { \"type\": \"opportunity\", \"id\": \"OPP-5678\", \"name\": \"Q1 Bulk Order\" },\n        { \"type\": \"quote\", \"id\": \"QUO-9012\", \"name\": \"Widget Series Quote\" }\n    ],\n    \"additional_info\": {},\n    \"customer_info\": {\n        \"customer_id\": \"CUST-12345\",\n        \"customer_name\": \"ABC Manufacturing Corp\",\n        \"is_active\": true\n    },\n    \"pitched_items\": [\n        {\n            \"id\": \"a1b2c3d4-e5f6-7890-abcd-ef1234567890\",\n            \"interaction_id\": \"INT-78902\",\n            \"call_id\": \"CALL-12345\",\n            \"customer_id\": \"CUST-12345\",\n            \"product_id\": \"PROD-001\",\n            \"pitch_key\": \"product_id\",\n            \"pitch_value\": \"PROD-001\",\n            \"pitch_order\": 1,\n            \"subject\": \"Industrial Widget A\",\n            \"action\": \"checked\",\n            \"product_blob\": {\n                \"product_id\": \"PROD-001\",\n                \"product_name\": \"Industrial Widget A\",\n                \"product_category\": \"Widgets\",\n                \"product_super_category\": \"Industrial Components\",\n                \"manufacturer\": \"WidgetCo\"\n            }\n        }\n    ]\n}\n</code></pre>\n<h3 id=\"response-fields\">Response Fields</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Type</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>id</td>\n<td>string</td>\n<td>Internal system UUID for the call note (nullable)</td>\n</tr>\n<tr>\n<td>call_id</td>\n<td>string</td>\n<td>Grouping key shared across the call note and its pitched items</td>\n</tr>\n<tr>\n<td>interaction_id</td>\n<td>string</td>\n<td>Primary key for this individual record</td>\n</tr>\n<tr>\n<td>user_id</td>\n<td>string</td>\n<td>ID of the user who created/logged the call</td>\n</tr>\n<tr>\n<td>customer_id</td>\n<td>string</td>\n<td>ID of the associated customer</td>\n</tr>\n<tr>\n<td>call_type</td>\n<td>string</td>\n<td>Type of call (e.g., \"phone\")</td>\n</tr>\n<tr>\n<td>date</td>\n<td>datetime</td>\n<td>Date and time of the call (nullable)</td>\n</tr>\n<tr>\n<td>notes</td>\n<td>string</td>\n<td>Call notes text content (nullable, may contain HTML from rich-text editor)</td>\n</tr>\n<tr>\n<td>action</td>\n<td>string</td>\n<td>Action type — always \"general_call_notes\" for the main call note record</td>\n</tr>\n<tr>\n<td>mode</td>\n<td>string</td>\n<td>Communication mode (e.g., \"phone\")</td>\n</tr>\n<tr>\n<td>shared_call_id</td>\n<td>string</td>\n<td>Shared call ID if part of a shared/group call (nullable)</td>\n</tr>\n<tr>\n<td>tagged_users</td>\n<td>array[object]</td>\n<td>List of users tagged/mentioned in the call note</td>\n</tr>\n<tr>\n<td>custom_fields</td>\n<td>array[CustomFieldInstance]</td>\n<td>Custom field values in unpacked format</td>\n</tr>\n<tr>\n<td>attachments</td>\n<td>array[object]</td>\n<td>File attachments associated with the call note</td>\n</tr>\n<tr>\n<td>associations</td>\n<td>array[object]</td>\n<td>Linked entities such as opportunities, quotes, and files</td>\n</tr>\n<tr>\n<td>additional_info</td>\n<td>object</td>\n<td>Flexible storage for additional metadata</td>\n</tr>\n<tr>\n<td>customer_info</td>\n<td>object</td>\n<td>Full details of the associated customer</td>\n</tr>\n<tr>\n<td>pitched_items</td>\n<td>array[PitchedItem]</td>\n<td>Products pitched/presented during the call</td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"nested-object-definitions\">Nested Object Definitions</h3>\n<h4 id=\"customfieldinstance-object\">CustomFieldInstance Object</h4>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Type</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>field_id</td>\n<td>string</td>\n<td>The identifier of the custom field</td>\n</tr>\n<tr>\n<td>value</td>\n<td>any</td>\n<td>The value for the custom field</td>\n</tr>\n</tbody>\n</table>\n</div><h4 id=\"pitcheditem-object\">PitchedItem Object</h4>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Type</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>id</td>\n<td>string</td>\n<td>Internal UUID of the pitched item record (nullable)</td>\n</tr>\n<tr>\n<td>interaction_id</td>\n<td>string</td>\n<td>Primary key for the pitched item record</td>\n</tr>\n<tr>\n<td>call_id</td>\n<td>string</td>\n<td>Grouping key — matches the parent call note's call_id</td>\n</tr>\n<tr>\n<td>customer_id</td>\n<td>string</td>\n<td>ID of the associated customer</td>\n</tr>\n<tr>\n<td>product_id</td>\n<td>string</td>\n<td>ID of the pitched product (nullable)</td>\n</tr>\n<tr>\n<td>pitch_key</td>\n<td>string</td>\n<td>Key indicating the pitch reference type (e.g., \"product_id\") (nullable)</td>\n</tr>\n<tr>\n<td>pitch_value</td>\n<td>string</td>\n<td>Value corresponding to the pitch key (nullable)</td>\n</tr>\n<tr>\n<td>pitch_order</td>\n<td>integer</td>\n<td>Display order of the pitched item (nullable)</td>\n</tr>\n<tr>\n<td>subject</td>\n<td>string</td>\n<td>Subject or name of the pitched item (nullable)</td>\n</tr>\n<tr>\n<td>action</td>\n<td>string</td>\n<td>Action type — always \"checked\" for pitched items (nullable)</td>\n</tr>\n<tr>\n<td>product_blob</td>\n<td>object</td>\n<td>Full product details when pitch_key is \"product_id\" and the product exists (nullable)</td>\n</tr>\n</tbody>\n</table>\n</div><h4 id=\"product-blob-object\">Product Blob Object</h4>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Type</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>product_id</td>\n<td>string</td>\n<td>Product identifier</td>\n</tr>\n<tr>\n<td>product_name</td>\n<td>string</td>\n<td>Name of the product</td>\n</tr>\n<tr>\n<td>product_category</td>\n<td>string</td>\n<td>Product category</td>\n</tr>\n<tr>\n<td>product_super_category</td>\n<td>string</td>\n<td>Product super-category</td>\n</tr>\n<tr>\n<td>manufacturer</td>\n<td>string</td>\n<td>Product manufacturer</td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"error-responses\">Error Responses</h3>\n<h4 id=\"400-bad-request\">400 Bad Request</h4>\n<p>Returned when the request is malformed or the identifier is missing.</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"status_message\": \"error\",\n    \"error\": {\n        \"code\": \"BAD_REQUEST\",\n        \"message\": \"Either call_id or identifier must be provided\"\n    }\n}\n</code></pre>\n<h4 id=\"401-unauthorized\">401 Unauthorized</h4>\n<p>Returned when authentication fails or is missing.</p>\n<h4 id=\"404-not-found\">404 Not Found</h4>\n<p>Returned when the specified call note does not exist.</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"status_message\": \"error\",\n    \"error\": {\n        \"code\": \"NOT_FOUND\",\n        \"message\": \"No call note found with identifier 'INT-99999'\"\n    }\n}\n</code></pre>\n<h4 id=\"500-internal-server-error\">500 Internal Server Error</h4>\n<p>Returned when an unexpected error occurs on the server (e.g., associated customer record not found).</p>\n<h2 id=\"best-practices\">Best Practices</h2>\n<ul>\n<li><strong>Understand the identifier types:</strong> The <code>identifier</code> path parameter accepts either the <code>interaction_id</code> (primary key) or the internal <code>id</code> (UUID). It does <strong>not</strong> accept <code>call_id</code> directly — see Notes for details</li>\n<li><strong>Handle nullable fields:</strong> Many fields in the response are nullable. Always check for null values before processing</li>\n<li><strong>Process pitched items:</strong> The <code>pitched_items</code> array contains products presented during the call. Use the <code>product_blob</code> field for full product details when available</li>\n<li><strong>Check associations:</strong> The <code>associations</code> array links the call note to related entities like opportunities, quotes, and files — use these to navigate the full context of the call</li>\n</ul>\n<h2 id=\"notes\">Notes</h2>\n<ul>\n<li>The <code>identifier</code> path parameter is <strong>not</strong> the same as <code>call_id</code>. The <code>call_id</code> is a grouping key shared by the call note and all its pitched items. The <code>identifier</code> resolves to the individual record's <code>interaction_id</code> or <code>id</code>, and the system then uses the resolved record's <code>call_id</code> internally to fetch the complete call note with all pitched items</li>\n<li>The <code>notes</code> field contains call note text that may be in HTML rich-text-editor format and may not be suitable for direct plain-text display</li>\n<li>The <code>action</code> field distinguishes between the main call note record (\"general_call_notes\") and pitched item records (\"checked\"). The API response separates these into the top-level fields and the <code>pitched_items</code> array respectively</li>\n<li>Product details in <code>product_blob</code> are populated only when <code>pitch_key</code> is \"product_id\" and the referenced product exists in the system</li>\n<li>Custom fields are returned in unpacked format with human-readable field identifiers</li>\n<li>Associations are returned in unpacked format with resolved entity details</li>\n</ul>\n","urlObject":{"path":["{{company}}","v1","call_notes","{identifier}"],"host":["{{domain}}"],"query":[],"variable":[]}},"response":[{"id":"7e87ff90-e0d6-4cda-8668-133b89883b7e","name":"Get Call Note V1","originalRequest":{"method":"GET","header":[{"key":"X-User-Id","value":"{{user_id}}","type":"text"},{"key":"X-Company","value":"{{company}}","type":"text"},{"key":"X-Api-Key","value":"{{api_key}}","type":"text"}],"url":"{{domain}}/{{company}}/v1/call_notes/550e8400-e29b-41d4-a716-446655440000"},"_postman_previewlanguage":"","header":[],"cookie":[{"expires":"Invalid Date","domain":"","path":""}],"responseTime":null,"body":"{\n    \"id\": \"550e8400-e29b-41d4-a716-446655440000\",\n    \"call_id\": \"CALL-12345\",\n    \"interaction_id\": \"INT-78901\",\n    \"user_id\": \"user-456\",\n    \"customer_id\": \"CUST-12345\",\n    \"call_type\": \"phone\",\n    \"date\": \"2025-01-20T14:30:00Z\",\n    \"notes\": \"Discussed Q1 order forecasts and new product line availability. Customer interested in bulk pricing for widget series.\",\n    \"action\": \"general_call_notes\",\n    \"mode\": \"phone\",\n    \"shared_call_id\": null,\n    \"tagged_users\": [\n        { \"id\": \"user-789\", \"name\": \"Jane Doe\" }\n    ],\n    \"custom_fields\": [\n        { \"field_id\": \"call_outcome\", \"value\": \"follow_up_needed\" },\n        { \"field_id\": \"next_steps\", \"value\": \"Send updated pricing sheet\" }\n    ],\n    \"attachments\": [\n        { \"file_name\": \"pricing_sheet_q1.pdf\", \"url\": \"https://storage.example.com/files/pricing_sheet_q1.pdf\" }\n    ],\n    \"associations\": [\n        { \"type\": \"opportunity\", \"id\": \"OPP-5678\", \"name\": \"Q1 Bulk Order\" },\n        { \"type\": \"quote\", \"id\": \"QUO-9012\", \"name\": \"Widget Series Quote\" }\n    ],\n    \"additional_info\": {},\n    \"customer_info\": {\n        \"customer_id\": \"CUST-12345\",\n        \"customer_name\": \"ABC Manufacturing Corp\",\n        \"is_active\": true\n    },\n    \"pitched_items\": [\n        {\n            \"id\": \"a1b2c3d4-e5f6-7890-abcd-ef1234567890\",\n            \"interaction_id\": \"INT-78902\",\n            \"call_id\": \"CALL-12345\",\n            \"customer_id\": \"CUST-12345\",\n            \"product_id\": \"PROD-001\",\n            \"pitch_key\": \"product_id\",\n            \"pitch_value\": \"PROD-001\",\n            \"pitch_order\": 1,\n            \"subject\": \"Industrial Widget A\",\n            \"action\": \"checked\",\n            \"product_blob\": {\n                \"product_id\": \"PROD-001\",\n                \"product_name\": \"Industrial Widget A\",\n                \"product_category\": \"Widgets\",\n                \"product_super_category\": \"Industrial Components\",\n                \"manufacturer\": \"WidgetCo\"\n            }\n        }\n    ]\n}"}],"_postman_id":"cfd3a2b4-2820-4f65-bf8a-fedf7ca9dc0d"},{"name":"Create Call Note (LEGACY)","id":"25a1a340-b122-411d-84e7-d2e11615555e","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"X-User-Id","value":"{{user_id}}","type":"text"},{"key":"X-Company","value":"{{company}}","type":"text"},{"key":"X-Api-Key","value":"{{api_key}}","type":"text"}],"body":{"mode":"formdata","formdata":[{"key":"interactions","value":"[{\"user_id\":\"joe.doe@acme.com\",\"customer_id\":\"153012-01\",\"action\":\"general_call_notes\",\"call_type\":\"phone\",\"notes\":\"Discussed new purchase\",\"tagged_users\":[],\"custom_fields\":{},\"additional_info\":{\"contact_id\":\"421241\",\"contact_name\":\"JOHN SMITH\"},\"associations\":[{\"type\":\"opportunity\",\"opportunity_id\":\"8N3mi3p6GYVVLFpzjJLjfV\"},{\"type\":\"customer\",\"customer_id\":\"153012-01\"}]}]","type":"text"}]},"url":"{{domain}}/{{company}}/create/interaction/call_note","urlObject":{"path":["{{company}}","create","interaction","call_note"],"host":["{{domain}}"],"query":[],"variable":[]}},"response":[{"id":"6a2b2a53-8a15-4ac0-ae91-11d50c9dcf11","name":"Create Call Note","originalRequest":{"method":"POST","header":[{"key":"X-User-Id","value":"{{user_id}}","type":"text"},{"key":"X-Company","value":"{{company}}","type":"text"},{"key":"X-Api-Key","value":"{{api_key}}","type":"text"}],"body":{"mode":"formdata","formdata":[{"key":"interactions","value":"[{\"user_id\":\"joe.doe@acme.com\",\"customer_id\":\"153012-01\",\"action\":\"general_call_notes\",\"call_type\":\"phone\",\"notes\":\"Discussed new purchase\",\"tagged_users\":[],\"custom_fields\":{},\"additional_info\":{\"contact_id\":\"421241\",\"contact_name\":\"JOHN SMITH\"},\"associations\":[{\"type\":\"opportunity\",\"opportunity_id\":\"8N3mi3p6GYVVLFpzjJLjfV\"},{\"type\":\"customer\",\"customer_id\":\"153012-01\"}]}]","type":"text"},{"key":"user_id","value":"joe.doe@acme.com","type":"text"}]},"url":"{{domain}}/{{company}}/create/interaction/call_note"},"_postman_previewlanguage":null,"header":null,"cookie":[],"responseTime":null,"body":"{\n  \"data\": [\n    {\n      \"action\": \"general_call_notes\",\n      \"activity_id\": \"phone_46fa0951-94ce-4e3f-95f1-160824ad14d6\",\n      \"additional_info\": {\n        \"contact_id\": \"421241\",\n        \"contact_name\": \"JOHN SMITH \"\n      },\n      \"associations\": [\n        {\n          \"opportunity_id\": \"8N3mi3p6GYVVLFpzjJLjfV\",\n          \"type\": \"opportunity\"\n        },\n        {\n          \"customer_id\": \"153012-01\",\n          \"type\": \"customer\"\n        }\n      ],\n      \"call_id\": \"46fa0951-94ce-4e3f-95f1-160824ad14d6\",\n      \"call_type\": \"phone\",\n      \"custom_fields\": {},\n      \"customer_id\": \"153012-01\",\n      \"date\": \"2023-10-13 11:37:25.251457\",\n      \"interaction_id\": \"distirbutorX-1okfaoskf120o3d\",\n      \"manufacturer\": \"\",\n      \"mode\": \"phone\",\n      \"notes\": \"Discussed new purchase\",\n      \"subject\": \"no_subject\",\n      \"tagged_users\": [],\n      \"user_id\": \"joe.doe@acme.com\",\n    }\n  ],\n  \"status_message\": \"SUCCESS\"\n}"}],"_postman_id":"25a1a340-b122-411d-84e7-d2e11615555e"}],"id":"3026387d-83d3-41ba-829b-bd4990df00e4","_postman_id":"3026387d-83d3-41ba-829b-bd4990df00e4","description":""},{"name":"Get Product Initiatives","id":"9c3c4570-f23e-47ae-9518-8ff4e49ec641","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"X-User-Id","value":"{{user_id}}","type":"text"},{"key":"X-Company","value":"{{company}}","type":"text"},{"key":"X-Api-Key","value":"{{api_key}}","type":"text"}],"url":"{{domain}}/{{company}}/product_initiatives/all?customer_id=231539-01&count=10&page=1","urlObject":{"path":["{{company}}","product_initiatives","all"],"host":["{{domain}}"],"query":[{"description":{"content":"<p>Customer/Account ID</p>\n","type":"text/plain"},"key":"customer_id","value":"231539-01"},{"description":{"content":"<p>The count of Product Initiatives to retrieve</p>\n","type":"text/plain"},"key":"count","value":"10"},{"description":{"content":"<p>pagination</p>\n","type":"text/plain"},"key":"page","value":"1"}],"variable":[]}},"response":[{"id":"9153f573-39c7-461b-9400-0eb0d0a1b72d","name":"Product Initiatves example","originalRequest":{"method":"GET","header":[{"key":"X-User-Id","value":"{{user_id}}","type":"text"},{"key":"X-Company","value":"{{company}}","type":"text"},{"key":"X-Api-Key","value":"{{api_key}}","type":"text"}],"url":{"raw":"{{domain}}/{{company}}/product_initiatives/all?customer_id=163853-0,84553-0","host":["{{domain}}"],"path":["{{company}}","product_initiatives","all"],"query":[{"key":"customer_id","value":"163853-0,84553-0"}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Content-Length","value":"24789"},{"key":"Content-Type","value":"application/json"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"5"}],"cookie":[],"responseTime":null,"body":"{\n    \"status_message\": \"SUCCESS\",\n    \"data\": [\n        {\n            \"id\": \"f0a178d0-7e01-41bd-bb7f-16b0247bfb51\",\n            \"type\": \"replacement\",\n            \"last_updated\": \"2022-09-12T04:10:18.534871\",\n            \"is_new\": true,\n            \"date_created\": \"2022-09-12T04:10:18.534876\",\n            \"customer_id\": \"163853-0\",\n            \"category\": \"order\",\n            \"content\": {\n                \"trigger_product\": {\n                    \"product_id\": \"079340-26392\",\n                    \"name\": \"Loctite 573 Gasket Sealant Green Paste 250 ml Tube - 26392, IDH: 232000\",\n                    \"price\": 89.05,\n                    \"product_category\": \"Sealants & Fillers\",\n                    \"date_ingested\": \"2022-09-10 08:27:58.073000+00:00\",\n                    \"available_qty\": 4,\n                    \"group_id\": \"079340-26392\",\n                    \"available\": true,\n                    \"literature\": [],\n                    \"last_ingested_date\": \"2022-09-10T10:10:33.375417\",\n                    \"manufacturer\": \"HENKEL\",\n                    \"specifications\": \"Brand Loctite Loctite Number 573 Chemical Base Acrylic Maximum Operating Temperature +300 °F Cure Time 48 hr Material Compatibility Metal Product Form Paste Package Type Tube Package Size 250 ml Shear Strength 217 psi Tensile Strength 725 psi Minimum Operating Temperature -65 °F Color Green Viscosity Measurement 19000 cPs Storage Condition Store Between 46°F to 82°F Store in a Dry Area Package Quantity 250 ml per inner, 10 per case IDH Number 232000\",\n                    \"product_super_category\": \"Adhesives & Sealants\",\n                    \"last_purchase\": {\n                        \"date\": \"2022-07-22T23:59:00-04:56\",\n                        \"quantity\": 2,\n                        \"product_id\": \"079340-26392\",\n                        \"net_price\": 163.38774,\n                        \"order_id\": \"79839121-00\"\n                    },\n                    \"description\": \"Loctite 573 green gasket sealant is compatible with metal materials with a 48 hr cure time. Delivers great performance with a shear strength of 217 psi and tensile strength of 725 psi. Minimum to maximum operating temperatures are -65 F to +300 F. Comes in a 250 ml Tube. This gasket sealant is packaged 250 ml per inner,  10 per case. The IDH number for this item is 232000.\",\n                    \"cost\": 60.56\n                },\n                \"recommended_products\": [\n                    {\n                        \"product_id\": \"MC-8694K41\",\n                        \"name\": \"NEOPRENE .125''THK C/C 4; '' X 50FT NEOPRENE/EPDM/\",\n                        \"price\": 38.21,\n                        \"product_category\": \"\",\n                        \"date_ingested\": \"2022-09-10 08:27:58.073000+00:00\",\n                        \"image_url\": \"\",\n                        \"available_qty\": 0,\n                        \"group_id\": \"MC-8694K41\",\n                        \"available\": false,\n                        \"literature\": [],\n                        \"last_ingested_date\": \"2022-09-10T10:10:33.351385\",\n                        \"manufacturer\": \"Unknown\",\n                        \"specifications\": \"\",\n                        \"product_super_category\": \"\",\n                        \"last_purchase\": null,\n                        \"description\": \"\",\n                        \"cost\":  26.75\n                    },\n                    {\n                        \"product_id\": \"RTV88 RED 001\",\n                        \"name\": \"Momentive RTV88 Two-Part Potting & Encapsulating Compound Red Paste 1 pt Kit - RTV88 RED 001\",\n                        \"price\": 90.12,\n                        \"product_category\": \"Sealants & Fillers\",\n                        \"date_ingested\": \"2022-09-10 08:27:58.073000+00:00\",\n                        \"available_qty\": 27,\n                        \"group_id\": \"RTV88 RED 001\",\n                        \"available\": true,\n                        \"literature\": [],\n                        \"last_ingested_date\": \"2022-09-10T10:21:06.964752\",\n                        \"manufacturer\": \"MOMENTIVE\",\n                        \"specifications\": \"Brand Momentive Series RTV88 Chemical Base Silicone Multi-Part Adhesive Two-Part Thermal Conductivity 0.31 W/mK Dielectric Strength 430 V/mil Cure Time 24 hr Working Life 45 min Color Red Product Form Paste Package Type Kit Package Size 1 pt\",\n                        \"product_super_category\": \"Adhesives & Sealants\",\n                        \"last_purchase\": {\n                            \"date\": \"2017-12-29T00:00:00-05:00\",\n                            \"quantity\": 2,\n                            \"product_id\": \"RTV88 RED 001\",\n                            \"net_price\": 211.36,\n                            \"order_id\": \"77075474-00\"\n                        },\n                        \"description\": \"Momentive red two-part RTV88 potting & encapsulating compound with a 24 hr cure time. Provides a 45 min working time. Comes in a 1 pt Kit.\",\n                        \"cost\":  58.58\n                    },\n                    {\n                        \"product_id\": \"686226-80011\",\n                        \"name\": \"Permatex Form-A-Gasket 2C Gasket Sealant Black Paste 11 oz Tube - 80011\",\n                        \"price\": 18.42,\n                        \"product_category\": \"Sealants & Fillers\",\n                        \"date_ingested\": \"2022-09-10 08:27:58.073000+00:00\",\n                        \"available_qty\": 11,\n                        \"group_id\": \"686226-80011\",\n                        \"available\": true,\n                        \"literature\": [\n                            {\n                            }\n                        ],\n                        \"last_ingested_date\": \"2022-09-10T10:22:58.329209\",\n                        \"manufacturer\": \"ITW PERFORMANCE POLYMERS\",\n                        \"specifications\": \"Brand Permatex Trade Name Form-A-Gasket Series 2C Chemical Base Resin Maximum Operating Temperature +400 °F Cure Time 24 hr Material Compatibility Metal Product Form Paste Package Type Tube Package Size 11 oz Minimum Operating Temperature -65 °F Color Black Storage Condition Store Between 46°F to 82°F Package Quantity 11 oz per inner, 12 per case\",\n                        \"product_super_category\": \"Adhesives & Sealants\",\n                        \"last_purchase\": {\n                            \"date\": \"2021-06-23T23:59:00-04:00\",\n                            \"quantity\": 40,\n                            \"product_id\": \"686226-80011\",\n                            \"net_price\": 375.2,\n                            \"order_id\": \"79174325-01\"\n                        },\n                        \"description\": \"Permatex Form-A-Gasket black 2C gasket sealant is compatible with metal materials with a 24 hr cure time. Minimum to maximum operating temperatures are -65 F to +400 F. Comes in a 11 oz Tube. This gasket sealant is packaged 11 oz per inner,  12 per case.\",\n                        \"cost\":  11.98\n                    }\n                ],\n                \"title\": \"Test title\",\n                \"description\": \"Test description\"\n            }\n        },\n        {\n            \"id\": \"9cfb0a6e-88e4-401b-82c0-010af9d10918\",\n            \"type\": \"replacement\",\n            \"last_updated\": \"2022-09-12T04:10:18.535204\",\n            \"is_new\": true,\n            \"date_created\": \"2022-09-12T04:10:18.535206\",\n            \"customer_id\": \"84553-0\",\n            \"category\": \"order\",\n            \"content\": {\n                \"trigger_product\": {\n                    \"product_id\": \"079340-26392\",\n                    \"name\": \"Loctite 573 Gasket Sealant Green Paste 250 ml Tube - 26392, IDH: 232000\",\n                    \"price\": 89.05,\n                    \"product_category\": \"Sealants & Fillers\",\n                    \"date_ingested\": \"2022-09-10 08:27:58.073000+00:00\",\n                    \"available_qty\": 4,\n                    \"group_id\": \"079340-26392\",\n                    \"available\": true,\n                    \"literature\": [],\n                    \"last_ingested_date\": \"2022-09-10T10:10:33.375417\",\n                    \"manufacturer\": \"HENKEL\",\n                    \"specifications\": \"Brand Loctite Loctite Number 573 Chemical Base Acrylic Maximum Operating Temperature +300 °F Cure Time 48 hr Material Compatibility Metal Product Form Paste Package Type Tube Package Size 250 ml Shear Strength 217 psi Tensile Strength 725 psi Minimum Operating Temperature -65 °F Color Green Viscosity Measurement 19000 cPs Storage Condition Store Between 46°F to 82°F Store in a Dry Area Package Quantity 250 ml per inner, 10 per case IDH Number 232000\",\n                    \"product_super_category\": \"Adhesives & Sealants\",\n                    \"last_purchase\": {\n                        \"date\": \"2022-07-22T23:59:00-04:56\",\n                        \"quantity\": 2,\n                        \"product_id\": \"079340-26392\",\n                        \"net_price\": 163.38774,\n                        \"order_id\": \"79839121-00\"\n                    },\n                    \"description\": \"Loctite 573 green gasket sealant is compatible with metal materials with a 48 hr cure time. Delivers great performance with a shear strength of 217 psi and tensile strength of 725 psi. Minimum to maximum operating temperatures are -65 F to +300 F. Comes in a 250 ml Tube. This gasket sealant is packaged 250 ml per inner,  10 per case. The IDH number for this item is 232000.\",\n                    \"cost\":  60.56\n                },\n                \"recommended_products\": [\n                    {\n                        \"product_id\": \"MC-8694K41\",\n                        \"name\": \"NEOPRENE .125''THK C/C 4; '' X 50FT NEOPRENE/EPDM/\",\n                        \"price\": 38.21,\n                        \"product_category\": \"\",\n                        \"date_ingested\": \"2022-09-10 08:27:58.073000+00:00\",\n                        \"image_url\": \"\",\n                        \"available_qty\": 0,\n                        \"group_id\": \"MC-8694K41\",\n                        \"available\": false,\n                        \"literature\": [],\n                        \"last_ingested_date\": \"2022-09-10T10:10:33.351385\",\n                        \"manufacturer\": \"Unknown\",\n                        \"specifications\": \"\",\n                        \"product_super_category\": \"\",\n                        \"last_purchase\": null,\n                        \"description\": \"\",\n                        \"cost\":  26.75\n                    },\n                    {\n                        \"product_id\": \"RTV88 RED 001\",\n                        \"name\": \"Momentive RTV88 Two-Part Potting & Encapsulating Compound Red Paste 1 pt Kit - RTV88 RED 001\",\n                        \"price\": 90.12,\n                        \"product_category\": \"Sealants & Fillers\",\n                        \"date_ingested\": \"2022-09-10 08:27:58.073000+00:00\",\n                        \"available_qty\": 27,\n                        \"group_id\": \"RTV88 RED 001\",\n                        \"available\": true,\n                        \"literature\": [],\n                        \"last_ingested_date\": \"2022-09-10T10:21:06.964752\",\n                        \"manufacturer\": \"MOMENTIVE\",\n                        \"specifications\": \"Brand Momentive Series RTV88 Chemical Base Silicone Multi-Part Adhesive Two-Part Thermal Conductivity 0.31 W/mK Dielectric Strength 430 V/mil Cure Time 24 hr Working Life 45 min Color Red Product Form Paste Package Type Kit Package Size 1 pt\",\n                        \"product_super_category\": \"Adhesives & Sealants\",\n                        \"last_purchase\": {\n                            \"date\": \"2017-12-29T00:00:00-05:00\",\n                            \"quantity\": 2,\n                            \"product_id\": \"RTV88 RED 001\",\n                            \"net_price\": 211.36,\n                            \"order_id\": \"77075474-00\"\n                        },\n                        \"description\": \"Momentive red two-part RTV88 potting & encapsulating compound with a 24 hr cure time. Provides a 45 min working time. Comes in a 1 pt Kit.\",\n                        \"cost\":  58.58\n                    },\n                    {\n                        \"product_id\": \"686226-80011\",\n                        \"name\": \"Permatex Form-A-Gasket 2C Gasket Sealant Black Paste 11 oz Tube - 80011\",\n                        \"price\": 18.42,\n                        \"product_category\": \"Sealants & Fillers\",\n                        \"date_ingested\": \"2022-09-10 08:27:58.073000+00:00\",\n                        \"available_qty\": 11,\n                        \"group_id\": \"686226-80011\",\n                        \"available\": true,\n                        \"literature\": [\n                            {\n                            }\n                        ],\n                        \"last_ingested_date\": \"2022-09-10T10:22:58.329209\",\n                        \"manufacturer\": \"ITW PERFORMANCE POLYMERS\",\n                        \"specifications\": \"Brand Permatex Trade Name Form-A-Gasket Series 2C Chemical Base Resin Maximum Operating Temperature +400 °F Cure Time 24 hr Material Compatibility Metal Product Form Paste Package Type Tube Package Size 11 oz Minimum Operating Temperature -65 °F Color Black Storage Condition Store Between 46°F to 82°F Package Quantity 11 oz per inner, 12 per case\",\n                        \"product_super_category\": \"Adhesives & Sealants\",\n                        \"last_purchase\": {\n                            \"date\": \"2021-06-23T23:59:00-04:00\",\n                            \"quantity\": 40,\n                            \"product_id\": \"686226-80011\",\n                            \"net_price\": 375.2,\n                            \"order_id\": \"79174325-01\"\n                        },\n                        \"description\": \"Permatex Form-A-Gasket black 2C gasket sealant is compatible with metal materials with a 24 hr cure time. Minimum to maximum operating temperatures are -65 F to +400 F. Comes in a 11 oz Tube. This gasket sealant is packaged 11 oz per inner,  12 per case.\",\n                        \"cost\":  11.98\n                    }\n                ],\n                \"title\": \"Test title\",\n                \"description\": \"Test description\"\n            }\n        }\n    ],\n    \"customer_id\": [\n        \"163853-0,84553-0\"\n    ]\n}"}],"_postman_id":"9c3c4570-f23e-47ae-9518-8ff4e49ec641"},{"name":"Create Task","id":"e4a8cf08-c1c2-4c64-b31e-ca92e4997200","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"X-User-Id","type":"text","value":"{{user_id}}"},{"key":"X-Company","type":"text","value":"{{company}}"},{"key":"X-Api-Key","type":"text","value":"{{api_key}}"}],"body":{"mode":"formdata","formdata":[{"key":"user_id","value":"joe.doe@acme.com","type":"text"},{"key":"title","value":"Follow up on new product","type":"text"},{"key":"due_date","value":"2023-10-15T22:00:00.000Z","type":"text"},{"key":"note","value":"Customer visit planned next month","type":"text"},{"key":"associations","value":"[{\"type\":\"customer\",\"customer_id\":\"105301\"},{\"type\":\"product\",\"product_id\":\"DEF-456\"},{\"type\":\"product\",\"product_id\":\"ABC-123\"},{\"type\":\"opportunity\",\"opportunity_id\":\"GaveiKsASvcmnatYoaj468\"}]","type":"text"}]},"url":"{{domain}}/{{company}}/create/task","urlObject":{"path":["{{company}}","create","task"],"host":["{{domain}}"],"query":[],"variable":[]}},"response":[{"id":"eeac76f8-3a9a-492c-b7d3-80d8cfa6f5fa","name":"Create Task","originalRequest":{"method":"POST","header":[{"key":"X-User-Id","type":"text","value":"{{user_id}}"},{"key":"X-Company","type":"text","value":"{{company}}"},{"key":"X-Api-Key","type":"text","value":"{{api_key}}"}],"body":{"mode":"formdata","formdata":[{"key":"user_id","value":"joe.doe@acme.com","type":"text"},{"key":"title","value":"Follow up on new product","type":"text"},{"key":"due_date","value":"2023-10-15T22:00:00.000Z","type":"text"},{"key":"note","value":"Customer visit planned next month","type":"text"},{"key":"associations","value":"[{\"type\":\"customer\",\"customer_id\":\"105301\"},{\"type\":\"product\",\"product_id\":\"DEF-456\"},{\"type\":\"product\",\"product_id\":\"ABC-123\"},{\"type\":\"opportunity\",\"opportunity_id\":\"GaveiKsASvcmnatYoaj468\"}]","type":"text"}]},"url":"{{domain}}/{{company}}/create/task"},"_postman_previewlanguage":"json","header":[{"key":"Content-Type","name":"Content-Type","value":"application/json","description":"","type":"text"}],"cookie":[],"responseTime":null,"body":"{\n    \"status_message\": \"SUCCESS\",\n    \"data\": {\n        \"task_id\": \"473987eb-6c09-436b-b9d7-714082760eab\"\n    }\n}"}],"_postman_id":"e4a8cf08-c1c2-4c64-b31e-ca92e4997200"},{"name":"Update Task","id":"39dac172-475b-47a3-b9fa-98d496093bd6","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"X-User-Id","value":"{{user_id}}","type":"text"},{"key":"X-Company","value":"{{company}}","type":"text"},{"key":"X-Api-Key","value":"{{api_key}}","type":"text"}],"body":{"mode":"raw","raw":"{\n  \"task_id\": \"8e05aaaa-b955-4958-850d-f1b12c2496c9\",\n  \"completed\": true,\n  \"user_id\": [\n    \"joe.doe@acme.com\"\n  ],\n  \"requesting_user_id\": \"protontestaccount@acme.com\",\n  \"title\": \"Test task\",\n  \"due_date\": \"2023-10-15T22:00:00.000Z\",\n  \"note\": \"test\",\n  \"associations\": [\n    {\n      \"type\": \"customer\",\n      \"customer_id\": \"00531-01\"\n    },\n    {\n      \"type\": \"product\",\n      \"product_id\": \"ABC-123\"\n    }\n  ]\n}","options":{"raw":{"language":"json"}}},"url":"{{domain}}/{{company}}/edit/task","urlObject":{"path":["{{company}}","edit","task"],"host":["{{domain}}"],"query":[],"variable":[]}},"response":[{"id":"e60c6481-7511-4370-8958-71cbfaedf196","name":"Update Task","originalRequest":{"method":"POST","header":[{"key":"X-User-Id","value":"{{user_id}}","type":"text"},{"key":"X-Company","value":"{{company}}","type":"text"},{"key":"X-Api-Key","value":"{{api_key}}","type":"text"}],"body":{"mode":"raw","raw":"{\n  \"task_id\": \"8e05aabd-b955-4958-850d-f6b12c2496c9\",\n  \"completed\": true,\n  \"user_id\": [\n    \"joe.doe@acme.com\"\n  ],\n  \"requesting_user_id\": \"protontestaccount@aquiferdist.com\",\n  \"title\": \"Test task\",\n  \"due_date\": \"2023-10-15T22:00:00.000Z\",\n  \"note\": \"test\",\n  \"associations\": [\n    {\n      \"type\": \"customer\",\n      \"customer_id\": \"20531-11\"\n    },\n    {\n      \"type\": \"product\",\n      \"product_id\": \"ABC-123\"\n    }\n  ]\n}","options":{"raw":{"language":"json"}}},"url":"{{domain}}/{{company}}/edit/task"},"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json","description":"","type":"text"}],"cookie":[],"responseTime":null,"body":"{\n    \"status_message\": \"SUCCESS\",\n    \"data\": {\n        \"task_id\": \"08951cea-6185-4d58-aeb5-aa5de75ffff0\"\n    }\n}"}],"_postman_id":"39dac172-475b-47a3-b9fa-98d496093bd6"}],"event":[{"listen":"prerequest","script":{"id":"60efd321-62bd-43ec-b5cf-36e363ff53bb","type":"text/javascript","exec":[""]}},{"listen":"test","script":{"id":"eefefe39-83bf-4276-9c63-2a8841875bde","type":"text/javascript","exec":[""]}}]}