Create Vendor
Create a new vendor in Last Mile Intelligence.
Operation
Section titled “Operation”createVendor
Resource
Section titled “Resource”vendor
Parameters
Section titled “Parameters”| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| Vendor Data | JSON | Yes | - | Vendor object with required fields |
Vendor Data Fields
Section titled “Vendor Data Fields”| Field | Type | Required | Description |
|---|---|---|---|
| name | string | Yes | Vendor name |
| code | string | Yes | Short vendor code |
| contactName | string | No | Primary contact name |
| string | No | Contact email | |
| phone | string | No | Contact phone number |
| address | object | No | Vendor address |
Response
Section titled “Response”Success
Section titled “Success”{ "id": "vend_new123", "name": "Southern Energy Co", "code": "SEC", "contactName": "Sarah Smith", "email": "info@southernenergy.com", "createdAt": "2024-06-21T09:00:00Z"}{ "success": false, "error": "Validation failed", "details": { "code": "Vendor code already exists" }}Error Handling
Section titled “Error Handling”- Missing API Token: LMI credential is missing API token
- Duplicate Code: Vendor code already exists
- Validation Error: Required fields missing or invalid
- Permission Denied: API token lacks permission for this operation