Product API
API Endpoints
| Operation | Method | Endpoint |
|---|---|---|
| Create Product | POST | https://crm.twozo.io/rest/api/v1/product |
| Get Product | GET | https://crm.twozo.io/rest/api/v1/product/{id} |
| Update Product | PUT/PATCH | https://crm.twozo.io/rest/api/v1/product/{id} |
| Delete Product | DELETE | https://crm.twozo.io/rest/api/v1/product/{id} |
| List Products | GET | https://crm.twozo.io/rest/api/v1/product/view/list?filter=firstName:like(w)&sort=firstName:asc |
| Dropdown Values | GET | https://crm.twozo.io/rest/api/v1/field/dropdown?name={INTERNAL_NAME} |
| Field List | GET | https://crm.twozo.io/rest/api/v1/field/list?source=product |
List API (GET)
GET https://crm.twozo.io/rest/api/v1/product/view/list?filter={internalname}:like(w)&sort={internalname}:asc
Example
GET https://crm.twozo.io/rest/api/v1/product/view/list?filter=name:like(w)&sort=name:asc
Pagination Parameters
| Parameter | Description | Example |
|---|---|---|
page | Page number | page=1 |
pageSize | Number of records per page | size=25 |
Filter Parameters
Format
filter=<field>:<operator>(<value>)
Supported Filter Operators
| Operator | Meaning | Example Request | Equivalent Condition |
|---|---|---|---|
eq | Equals | filter=status:eq(active) | status = 'active' |
neq | Not Equals | filter=status:neq(archived) | status != 'archived' |
in | In List | filter=status:in(active,pending) | status IN ('active','pending') |
nin | Not In List | filter=status:nin(deleted,archived) | status NOT IN ('deleted','archived') |
lt | Less Than | filter=amount:lt(500) | amount < 500 |
lte | Less Than or Equal | filter=amount:lte(1000) | amount <= 1000 |
gt | Greater Than | filter=amount:gt(100) | amount > 100 |
gte | Greater Than or Equal | filter=amount:gte(250) | amount >= 250 |
between | Range | filter=createdAt:between(1771936945416,1771936947532) | createdAt BETWEEN value1 AND value2 |
like | Contains Text | filter=name:like(john) | name LIKE '%john%' |
Filter Examples
&filter=status:eq(active)
&filter=status:neq(archived)
&filter=status:in(active,pending)
&filter=status:nin(deleted,archived)
&filter=amount:lt(500)
&filter=amount:lte(1000)
&filter=amount:gt(100)
&filter=amount:gte(250)
&filter=createdAt:between(1771936945416,1771936947532)
&filter=name:like(john)
&filter=deletedAt:isnull(true)
&filter=deletedAt:notnull(true)
&filter=metadata.notes:exists(true)
Sort Parameters
Format
sort=<field>:<direction>
Multiple sort fields can be separated by commas.
Supported Sort Directions
| Direction | Meaning |
|---|---|
asc | Ascending Order |
desc | Descending Order |
Sort Examples
| Request | Description |
|---|---|
sort=createdAt:desc | Sort by created date descending |
sort=name:asc | Sort by name ascending |
sort=createdAt:desc,name:asc | Sort by created date descending, then name ascending |
Example
&sort=createdAt:desc,name:asc
FieldList
GET: https://crm.twozo.io/rest/api/v1/field/list?source=product
FieldList Response
{
"code": 0,
"data": {
"source": {
"is_enabled": true,
"name": "Product",
"id": 104,
"config": {
"isPriceVariationsEnabled": true,
"isProductDurationsEnabled": false
}
},
"fields": [
[
{
"internal_name": "name",
"is_active": true,
"source_id": 104,
"id": 228,
"type": "SINGLE_STRING",
"config": {
"min_length": 1,
"max_length": 255
},
"field_name": "Name"
}
],
[
{
"internal_name": "sales_owner",
"is_active": true,
"source_id": 104,
"id": 229,
"type": "OWNER",
"config": {},
"field_name": "Sales Owner"
}
],
[
{
"internal_name": "product_code",
"is_active": true,
"source_id": 104,
"id": 230,
"type": "SINGLE_STRING",
"config": {
"min_length": 1,
"max_length": 20
},
"field_name": "Product Code"
}
],
[
{
"internal_name": "category",
"is_active": true,
"options": [
{
"name": "Hardware",
"id": 9218940
},
{
"name": "Software",
"id": 9218941
}
],
"source_id": 104,
"id": 231,
"type": "DROPDOWN",
"config": {},
"field_name": "Category"
}
],
[
{
"internal_name": "unit_price",
"is_active": true,
"sub_fields": [
{
"name": "CURRENCY",
"input_type": "DROPDOWN",
"id": 22,
"type": "PRICE_TAGS",
"display_name": "Currency",
"config": {
"dropdown": "currencyList"
}
},
{
"name": "UNIT_PRICE",
"input_type": "SINGLE_NUMBER",
"id": 23,
"type": "PRICE_TAGS",
"display_name": "Unit Price",
"config": {
"isWholeNumber": false
}
},
{
"name": "TAX",
"input_type": "SINGLE_NUMBER",
"id": 24,
"type": "PRICE_TAGS",
"display_name": "Tax",
"config": {
"isWholeNumber": false
}
},
{
"name": "DISCOUNT",
"input_type": "SINGLE_NUMBER",
"id": 25,
"type": "PRICE_TAGS",
"display_name": "Discount",
"config": {
"isWholeNumber": false
}
}
],
"source_id": 104,
"id": 232,
"type": "PRICE_TAGS",
"config": {
"min": 0,
"max": 9999999999999
},
"field_name": "Unit Price"
}
],
[
{
"internal_name": "active",
"is_active": true,
"options": [
{
"name": "Yes",
"id": 9218946
},
{
"name": "No",
"id": 9218947
}
],
"source_id": 104,
"id": 233,
"type": "DROPDOWN",
"config": {},
"field_name": "Active"
}
],
[
{
"internal_name": "taxable",
"is_active": true,
"options": [
{
"name": "Yes",
"id": 9218942
},
{
"name": "No",
"id": 9218943
}
],
"source_id": 104,
"id": 234,
"type": "DROPDOWN",
"config": {},
"field_name": "Taxable"
}
],
[
{
"internal_name": "base_currency_amount",
"is_active": true,
"sub_fields": [
{
"name": "CURRENCY",
"input_type": "DROPDOWN",
"id": 6,
"type": "MONETARY",
"display_name": "Currency",
"config": {
"dropdown": "currencyList"
}
},
{
"name": "VALUE",
"input_type": "SINGLE_NUMBER",
"id": 7,
"type": "MONETARY",
"display_name": "Price",
"config": {
"isWholeNumber": false,
"default": 0.0
}
}
],
"source_id": 104,
"id": 247,
"type": "MONETARY",
"config": {},
"field_name": "Base Currency Amount"
}
],
[
{
"internal_name": "quantity_ordered",
"is_active": true,
"source_id": 104,
"id": 235,
"type": "SINGLE_NUMBER",
"config": {
"min": 0,
"max": 9999999999999999
},
"field_name": "Quantity Ordered"
}
],
[
{
"internal_name": "quantity_in_stock",
"is_active": true,
"source_id": 104,
"id": 236,
"type": "SINGLE_NUMBER",
"config": {
"min": 0,
"max": 9999999999999999
},
"field_name": "Quantity In Stock"
}
],
[
{
"internal_name": "description",
"is_active": true,
"source_id": 104,
"id": 237,
"type": "SINGLE_STRING",
"config": {
"min_length": 1,
"max_length": 255
},
"field_name": "Description"
}
],
[
{
"internal_name": "type",
"is_active": true,
"options": [
{
"name": "Unit",
"id": 9218944
},
{
"name": "Subscription",
"id": 9218945
}
],
"source_id": 104,
"id": 238,
"type": "DROPDOWN",
"config": {
"min": 1
},
"field_name": "Type"
}
],
[
{
"internal_name": "sku_number",
"is_active": true,
"source_id": 104,
"id": 239,
"type": "SINGLE_STRING",
"config": {
"min_length": 1,
"max_length": 16
},
"field_name": "SKU Number"
}
],
[
{
"internal_name": "valid_till",
"is_active": true,
"source_id": 104,
"id": 240,
"type": "DATE",
"config": {},
"field_name": "Valid Till"
}
],
[
{
"internal_name": "created_by",
"is_active": true,
"source_id": 104,
"id": 245,
"type": "OWNER",
"config": {},
"field_name": "Created By"
}
],
[
{
"internal_name": "created_at",
"is_active": true,
"source_id": 104,
"id": 243,
"type": "DATE_TIME",
"config": {},
"field_name": "Created At"
}
],
[
{
"internal_name": "updated_by",
"is_active": true,
"source_id": 104,
"id": 246,
"type": "OWNER",
"config": {},
"field_name": "Updated By"
}
],
[
{
"internal_name": "updated_at",
"is_active": true,
"source_id": 104,
"id": 241,
"type": "DATE_TIME",
"config": {},
"field_name": "Updated At"
}
],
[
{
"internal_name": "last_assigned_at",
"is_active": true,
"source_id": 104,
"id": 242,
"type": "DATE_TIME",
"config": {},
"field_name": "Last Assigned At"
}
],
[
{
"internal_name": "id",
"is_active": true,
"source_id": 104,
"id": 244,
"type": "SINGLE_NUMBER",
"config": {},
"field_name": "ID"
}
]
]
}
}Product Fields
| Field | Type | Required | Description |
|---|---|---|---|
name | string | Required | Name of the product. Example: "Unit Price" |
product_code | string | Optional | Internal code identifying the product. Returned as a string in the response. Example: "772892" |
category | number or string | Optional | ID or name of the category the product belongs to. Example: 10064067, Hardware |
unit_price | array<object> | Optional | List of price entries for the product, one per currency. See Unit Price Object below. |
active | number or string | Optional | ID or name representing whether the product is active. Example: 10064070, Yes |
taxable | number or string | Optional | ID or name representing whether the product is taxable. Example: 10064065, Yes |
quantity_ordered | number | Optional | Quantity of the product currently on order. Example: 61 |
quantity_in_stock | number | Optional | Quantity of the product currently in stock. Example: 10 |
description | string | Optional | Free-text description of the product. Example: "This is an Updated Product" |
sku_number | number | Optional | Stock Keeping Unit number for the product. Example: 36288 |
valid_till | datetime | Optional | Expiry date for the product/pricing in ISO 8601 format. Example: "2026-07-01T12:55:00Z" |
Nested Object — unit_price
| Field | Type | Required | Description |
|---|---|---|---|
currency | number / code / name | Required | ID, code, or name of the currency this price is denominated in. Example: 3, US, United States.Dropdown Option List - Overview |
unit_price | string | Required | Price per unit. Returned as price (number) in the Get response.Example: "22345" |
tax | string | Optional | Tax percentage applied to the unit price. Example: "12" |
discount | string | Optional | Discount percentage applied to the unit price. Example: "21" |
Dropdown Field Types
| Field | Type | Required | Options |
|---|---|---|---|
| Active | Static | Optional | 1 - Yes2 - No |
| Type | Static | Optional | 1 - Unit2 - Subscription |
| Taxable | Static | Optional | 1 - Yes2 - No |
For dynamic options fetch from API call.