Base URL
https://{tenant}.logzi.com/api/product_same/
Every request returns a JSON response. On success result.code == 1, on failure result.code == 0. The related products API manages relationships between a product group and similar/equivalent products — product_group_id identifies the parent product group, product_id identifies the related product.
/api/product_same/get
Retrieve a single related product record by ID.
Query parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
id | int | Related product record ID |
Example request
GET /api/product_same/get?id=1
X-API-KEY: {your_api_key}
/api/product_same/list
Paginated list of related product relationships.
Query parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
list_count | int | Maximum number of records to return | |
list_offset | int | Pagination offset (default: 0) | |
list_condition | object | Filter conditions object — e.g. {"product_group_id": 5} or {"product_id": 12} |
Available list_condition filters
| Filter | Type | Description |
|---|---|---|
product_group_id | int | Filter by parent product group ID |
product_id | int | Retrieve all relationships for a given product |
Example request
GET /api/product_same/list?list_offset=0&list_count=100&list_condition={"product_group_id":5}
X-API-KEY: {your_api_key}
/api/product_same/save
Create or update a related product relationship. If data.id is 0 or missing, a new record is created.
POST fields — data object
| Field | Type | Required | Description |
|---|---|---|---|
id | int | Record ID (0 = create new) | |
product_id | int | Related product ID | |
product_group_id | int | Parent product group ID |
Example request
POST /api/product_same/save
X-API-KEY: {your_api_key}
Content-Type: application/json
{ "data": { "id": 0, "product_id": 42, "product_group_id": 5 } }
/api/product_same/delete
Delete a related product relationship by ID (soft delete).
POST fields
| Field | Type | Required | Description |
|---|---|---|---|
id | int | ID of the relationship to delete |
Example request
POST /api/product_same/delete
X-API-KEY: {your_api_key}
Content-Type: application/json
{ "id": 1 }
Create your account now,
pay later!