Products & services
Base URL https://api.leadx.in/api/key/protected. Every request needs an apikey header — see Authentication.
5 endpoints.
GET /product-service
Get all product service.
Auth apikey
:::note Used by the web app
components/CustomField.jsx, components/TableWrapper.jsx, pages/AIGeniePage.jsx and 3 more
:::
Response — data is an array of ProductService objects, alongside the pagination fields described in Response format. (Resource deduced from the collections this handler reads, not read off an explicit return.)
POST /product-service
Create product service.
Auth apikey · Success 201
:::note Used by the web app
components/CustomField.jsx, components/TableWrapper.jsx, pages/AIGeniePage.jsx and 3 more
:::
Request body
| Field | Default | Notes |
|---|---|---|
formData | {} | System and custom fields together — see Custom fields. |
Response — data is one ProductService object. (Resource deduced from the collections this handler reads, not read off an explicit return.)
Errors InvalidCustomFieldValue_400 · InvalidCustomField_400 · InvalidSystemField_400 · ProductServiceDataRequired_400 · ProductServiceNameAlreadyExists_400
PUT /product-service
Bulk update product service.
Auth apikey · Success 200
:::note Used by the web app
components/CustomField.jsx, components/TableWrapper.jsx, pages/AIGeniePage.jsx and 3 more
:::
Request body — the standard bulk selection (ids, nids, selectAll) plus formData and updateType.
GET /product-service/:id
Get product service.
Auth apikey
Path parameters
| Name | |
|---|---|
id | Required |
Response — data is one ProductService object. company createdBy updatedBy is populated, so it arrives as nested objects rather than ids.
Errors ProductServiceNotFound_404
PUT /product-service/:id
Update product service.
Auth apikey · Success 200
Path parameters
| Name | |
|---|---|
id | Required |
Request body
| Field | Default | Notes |
|---|---|---|
formData | {} | System and custom fields together — see Custom fields. |
tags | — | Tag ids. |
category | — | Contact category id. |
Response — data is one ProductService object. (Resource deduced from the collections this handler reads, not read off an explicit return.)
Errors InvalidCustomFieldValue_400 · InvalidCustomField_400 · InvalidSystemField_400 · ProductServiceNameAlreadyExists_400 · ProductServiceNotFound_400