Vendors API
Basic Principles
This object represents a supplier for your company. Use it to track the vendors you collaborate with and manage their information.
Scopes
vendors:read
vendors:write
Create a Vendor
Allows you to create a supplier for your company. Requires the vendors:write
scope.
POST
https://api.smartbills.io/v1/vendors
Request
Request Body
You need to provide a request body of type VendorCreateRequest
.
Attribute | Description | Type | Required |
---|---|---|---|
name | Vendor's name | string | required |
logo | Vendor's logo | string | optional |
website | Vendor's website | string | required |
address | Vendor's address | SBAddress | optional |
Response
Response Body
HTTP Status Codes
Code | Description |
---|---|
201 | The supplier was successfully created |
400 | The request sent is not valid. |
Retrieve a Vendor
Fetches a supplier from your company. Requires the vendors:read
scope.
GET
https://api.smartbills.io/v1/vendors/:id
Route Parameter
Attribute | Description | Type | Required |
---|---|---|---|
id | Unique identifier of the supplier | long | required |
Response
Retrieve a List of Vendors
Fetches a list of vendors from your company. Requires the vendors:read
scope.
GET
https://api.smartbills.io/v1/vendors
Query Parameters
Attribute | Description | Type | Required |
---|---|---|---|
page | Page number | long | required |
pageSize | Number of records to return | long | required |
Response
Update a Vendor
Allows you to update the information of a supplier for your company. Requires the vendors:write
scope.
PUT
https://api.smartbills.io/v1/vendors/:id
Route Parameter
Attribute | Description | Type | Required |
---|---|---|---|
id | Unique identifier of the supplier | long | required |
Request Body
You need to provide a request body of type VendorCreateRequest
.
Attribute | Description | Type | Required |
---|---|---|---|
name | Vendor's name | string | required |
logo | Vendor's logo | string | optional |
website | Vendor's website | string | required |
address | Vendor's address | SBAddress | optional |
Response
HTTP Status Codes
Code | Description |
---|---|
200 | The supplier was successfully updated |
400 | The request sent is not valid |
404 | No supplier was found |
Delete a Vendor
Allows you to delete a supplier for your company.
Requires the vendors:write
scope.
DELETE
https://api.smartbills.io/v1/vendors/:id
Route Parameter
Attribute | Description | Type | Required |
---|---|---|---|
id | Unique identifier of the supplier | long | required |
Response
HTTP Status Codes
Code | Description |
---|---|
200 | The supplier was successfully deleted |
404 | No supplier was found |