Skip to content

Create Pricing

Create a new pricing record in Last Mile Intelligence.

createPricing

pricing

ParameterTypeRequiredDefaultDescription
Pricing DataJSONYes-Pricing object with required fields
FieldTypeRequiredDescription
productIdstringYesProduct ID
customerIdstringNoCustomer ID (null for standard pricing)
pricePerUnitnumberYesPrice per unit
effectiveDatestringNoStart date (YYYY-MM-DD)
expirationDatestringNoEnd date (YYYY-MM-DD)
pricingTypestringNoType (standard, contract, spot)
{
"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"
}
}
  • 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