Vendors
Service providers that tasks can be assigned to.
6 endpoints. Every request needs an Authorization: Bearer mtro_... header, and responses follow the envelope described in Errors and conventions.
POST /vendors/create
Create a new vendor (service provider). Required: name, role, mobile, email.
Required scope: vendors.write
MCP tool: vendors_create
Request body
| Field | Type | Required | Description |
|---|---|---|---|
name | string | yes | Vendor name |
role | string | yes | Vendor role (e.g. Plumber, Electrician, Cleaner) |
mobile | string | yes | Vendor mobile number |
email | string | yes | Vendor email address |
Example
curl -X POST 'https://core.mtro.app/vendors/create' \
-H 'Authorization: Bearer mtro_your_api_key' \
-H 'Content-Type: application/json' \
-d '{"name":"<name>","role":"<role>","mobile":"<mobile>","email":"<email>"}'
POST /vendors/delete
Delete a vendor. This action cannot be undone.
Required scope: vendors.write
MCP tool: vendors_delete
Request body
| Field | Type | Required | Description |
|---|---|---|---|
vendorId | string | yes | The vendor ID to delete |
Example
curl -X POST 'https://core.mtro.app/vendors/delete' \
-H 'Authorization: Bearer mtro_your_api_key' \
-H 'Content-Type: application/json' \
-d '{"vendorId":"<vendorId>"}'
GET /vendors/get/{vendorId}
Get detailed information about a specific vendor.
Required scope: vendors.read
MCP tool: vendors_get
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
vendorId | string | yes | The vendor ID |
Example
curl -X GET 'https://core.mtro.app/vendors/get/<vendorId>' \
-H 'Authorization: Bearer mtro_your_api_key'
Response
| Field | Type |
|---|---|
vendor | object |
error | boolean |
Fields of vendor
| Field | Type |
|---|---|
_id | string |
name | string |
role | string |
staffRole | string |
ownerName | string |
mobile | string |
phone | string |
email | string |
services | string |
address | string |
city | string |
markets | any[] |
groups | string |
referredBy | string |
shareVendor | boolean |
internalNotes | string |
entityOwner | string |
images | any[] |
lastUpdated | integer |
__v | integer |
GET /vendors/get/all
List all vendors (service providers like plumbers, electricians, cleaners, etc.).
Required scope: vendors.read
MCP tool: vendors_list
Example
curl -X GET 'https://core.mtro.app/vendors/get/all' \
-H 'Authorization: Bearer mtro_your_api_key'
Response
| Field | Type |
|---|---|
vendors | object[] |
error | boolean |
Fields of vendors[]
| Field | Type |
|---|---|
id | string |
name | string |
role | string |
staffRole | string |
ownerName | string |
mobile | string |
phone | string |
email | string |
services | string |
address | string |
city | string |
markets | any[] |
groups | string |
referredBy | string |
shareVendor | boolean |
internalNotes | string |
entityOwner | string |
images | any[] |
lastUpdated | integer |
GET /vendors/get/entity/{entityId}
Get all vendors belonging to a specific entity.
Required scope: vendors.read
MCP tool: vendors_get_by_entity
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
entityId | string | yes | The entity ID |
Example
curl -X GET 'https://core.mtro.app/vendors/get/entity/<entityId>' \
-H 'Authorization: Bearer mtro_your_api_key'
Response
| Field | Type |
|---|---|
vendors | object[] |
error | boolean |
Fields of vendors[]
| Field | Type |
|---|---|
id | string |
name | string |
role | string |
staffRole | string |
ownerName | string |
mobile | string |
phone | string |
email | string |
services | string |
address | string |
city | string |
markets | any[] |
groups | string |
referredBy | string |
shareVendor | boolean |
internalNotes | string |
entityOwner | string |
images | any[] |
lastUpdated | integer |
POST /vendors/update
Update a vendor's information.
Required scope: vendors.write
MCP tool: vendors_update
Request body
| Field | Type | Required | Description |
|---|---|---|---|
vendorId | string | yes | The vendor ID to update |
name | string | no | Updated name |
role | string | no | Updated role |
mobile | string | no | Updated mobile number |
email | string | no | Updated email |
Example
curl -X POST 'https://core.mtro.app/vendors/update' \
-H 'Authorization: Bearer mtro_your_api_key' \
-H 'Content-Type: application/json' \
-d '{"vendorId":"<vendorId>"}'