Vendors
Retrieve all vendors for a company
limit of records per page
10
page number
2
This field is used to filter by vendor name. (LIKE)
Hay
This parameter is used to sort the records by a specific field (created_at,name)
name
Order type(asc or desc)
asc
Successful operation
Bad Request
Unauthenticated
Not Found
Internal Server
GET /api/vendors HTTP/1.1
Host: app.greenplaces.com
Accept: */*
{
"status": "Ok",
"message": "Success",
"data": [
{
"id": "996501df-0bfc-4f95-954d-3a5d5dc48469",
"name": "test name",
"description": "description...",
"website": "https://www.example.com/",
"notes": "notes...",
"services_provided": "example",
"products_purchased": "example",
"account_manager_name": "name manager",
"account_manager_email": "[email protected]",
"currency": "USD",
"score": "2",
"updated_at": "2023-06-12T17:30:21.000000Z",
"created_at": "2023-06-12T17:30:21.000000Z"
}
],
"meta": {
"pagination": {
"current": "1",
"last_page": "1",
"per_page": "10",
"total": "6"
}
}
}
Store a vendor for a company
create vendor request body data
name of the Vendor
test name
website of the Vendor
https://www.example.com/
description of the Vendor
description...
notes of the Vendor
notes...
services_provided of the Vendor
example
products_purchased of the Vendor
example
account_manager_name of the Vendor
name manager
currency of the Vendor
USD
score of the Vendor
22
Successful operation
Bad Request
Unauthenticated
Not Found
Internal Server
POST /api/vendors HTTP/1.1
Host: app.greenplaces.com
Content-Type: application/json
Accept: */*
Content-Length: 280
{
"name": "test name",
"website": "https://www.example.com/",
"description": "description...",
"notes": "notes...",
"services_provided": "example",
"products_purchased": "example",
"account_manager_name": "name manager",
"account_manager_email": "[email protected]",
"currency": "USD",
"score": "22"
}
{
"status": "Ok",
"message": "Success",
"data": {
"id": "996501df-0bfc-4f95-954d-3a5d5dc48469",
"name": "test name",
"description": "description...",
"website": "https://www.example.com/",
"notes": "notes...",
"services_provided": "example",
"products_purchased": "example",
"account_manager_name": "name manager",
"account_manager_email": "[email protected]",
"currency": "USD",
"score": "2",
"updated_at": "2023-06-12T17:30:21.000000Z",
"created_at": "2023-06-12T17:30:21.000000Z"
},
"meta": {}
}
Retrieve a vendor for a company
Id of the vendor
996501df-0bfc-4f95-954d-3a5d5dc48469
Successful operation
Bad Request
Unauthenticated
Not Found
Internal Server
GET /api/vendors/{id} HTTP/1.1
Host: app.greenplaces.com
Accept: */*
{
"status": "Ok",
"message": "Success",
"data": {
"id": "996501df-0bfc-4f95-954d-3a5d5dc48469",
"name": "test name",
"description": "description...",
"website": "https://www.example.com/",
"notes": "notes...",
"services_provided": "example",
"products_purchased": "example",
"account_manager_name": "name manager",
"account_manager_email": "[email protected]",
"currency": "USD",
"score": "2",
"updated_at": "2023-06-12T17:30:21.000000Z",
"created_at": "2023-06-12T17:30:21.000000Z"
},
"meta": {}
}
Update a vendor for a company
Id of the vendor
996501df-0bfc-4f95-954d-3a5d5dc48469
create vendor request body data
name of the Vendor
test name
website of the Vendor
https://www.example.com/
description of the Vendor
description...
notes of the Vendor
notes...
services_provided of the Vendor
example
products_purchased of the Vendor
example
account_manager_name of the Vendor
name manager
currency of the Vendor
USD
score of the Vendor
22
Successful operation
Bad Request
Unauthenticated
Not Found
Internal Server
PUT /api/vendors/{id} HTTP/1.1
Host: app.greenplaces.com
Content-Type: application/json
Accept: */*
Content-Length: 280
{
"name": "test name",
"website": "https://www.example.com/",
"description": "description...",
"notes": "notes...",
"services_provided": "example",
"products_purchased": "example",
"account_manager_name": "name manager",
"account_manager_email": "[email protected]",
"currency": "USD",
"score": "22"
}
{
"status": "Ok",
"message": "Success",
"data": {
"id": "996501df-0bfc-4f95-954d-3a5d5dc48469",
"name": "test name",
"description": "description...",
"website": "https://www.example.com/",
"notes": "notes...",
"services_provided": "example",
"products_purchased": "example",
"account_manager_name": "name manager",
"account_manager_email": "[email protected]",
"currency": "USD",
"score": "2",
"updated_at": "2023-06-12T17:30:21.000000Z",
"created_at": "2023-06-12T17:30:21.000000Z"
},
"meta": {}
}
remove vendor
Id of the vendor
996501df-0bfc-4f95-954d-3a5d5dc48469
Successful operation
Bad Request
Unauthenticated
Not Found
Internal Server
DELETE /api/vendors/{id} HTTP/1.1
Host: app.greenplaces.com
Accept: */*
{
"status": "Ok",
"message": "Success",
"data": null,
"meta": {}
}