Create Product
Create a new product in Last Mile Intelligence.
Operation
Section titled “Operation”createProduct
Resource
Section titled “Resource”product
Parameters
Section titled “Parameters”| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| Product Data | JSON | Yes | - | Product object with required fields |
Product Data Fields
Section titled “Product Data Fields”| Field | Type | Required | Description |
|---|---|---|---|
| name | string | Yes | Product name |
| code | string | Yes | Short code identifier |
| category | string | No | Product category |
| unitOfMeasure | string | No | Unit (gallon, liter, etc.) |
| defaultPrice | number | No | Default price per unit |
| taxable | boolean | No | Whether product is taxable |
Response
Section titled “Response”Success
Section titled “Success”{ "id": "prod_new123", "name": "Biodiesel B20", "code": "B20", "category": "fuel", "unitOfMeasure": "gallon", "isActive": true, "createdAt": "2024-06-21T09:00:00Z"}{ "success": false, "error": "Validation failed", "details": { "code": "Code already exists" }}Error Handling
Section titled “Error Handling”- Missing API Token: LMI credential is missing API token
- Duplicate Code: Product code already exists
- Validation Error: Required fields missing or invalid
- Permission Denied: API token lacks permission for this operation