Create Pricing
Create a new pricing record in Last Mile Intelligence.
Operation
Section titled “Operation”createPricing
Resource
Section titled “Resource”pricing
Parameters
Section titled “Parameters”| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| Pricing Data | JSON | Yes | - | Pricing object with required fields |
Pricing Data Fields
Section titled “Pricing Data Fields”| Field | Type | Required | Description |
|---|---|---|---|
| productId | string | Yes | Product ID |
| customerId | string | No | Customer ID (null for standard pricing) |
| pricePerUnit | number | Yes | Price per unit |
| effectiveDate | string | No | Start date (YYYY-MM-DD) |
| expirationDate | string | No | End date (YYYY-MM-DD) |
| pricingType | string | No | Type (standard, contract, spot) |
Response
Section titled “Response”Success
Section titled “Success”{ "id": "price_new123", "customerId": "cust_xyz789", "productId": "prod_fuel001", "pricePerUnit": 3.299, "pricingType": "contract", "createdAt": "2024-06-21T09:00:00Z"}{ "success": false, "error": "Validation failed", "details": { "pricePerUnit": "Price must be positive" }}Error Handling
Section titled “Error Handling”- Missing API Token: LMI credential is missing API token
- Product Not Found: Product ID does not exist
- Customer Not Found: Customer ID does not exist
- Validation Error: Required fields missing or invalid
- Permission Denied: API token lacks permission for this operation