Vendors API

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.

AttributeDescriptionTypeRequired
nameVendor's namestringrequired
logoVendor's logostringoptional
websiteVendor's websitestringrequired
addressVendor's addressSBAddressoptional

Response

Response Body

SBVendor

HTTP Status Codes

CodeDescription
201The supplier was successfully created
400The 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

AttributeDescriptionTypeRequired
idUnique identifier of the supplierlongrequired

Response

SBVendor

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

SBListRequest

AttributeDescriptionTypeRequired
pagePage numberlongrequired
pageSizeNumber of records to returnlongrequired

Response

SBVendor

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

AttributeDescriptionTypeRequired
idUnique identifier of the supplierlongrequired

Request Body

You need to provide a request body of type VendorCreateRequest.

AttributeDescriptionTypeRequired
nameVendor's namestringrequired
logoVendor's logostringoptional
websiteVendor's websitestringrequired
addressVendor's addressSBAddressoptional

Response

HTTP Status Codes

CodeDescription
200The supplier was successfully updated
400The request sent is not valid
404No supplier was found

SBVendor

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

AttributeDescriptionTypeRequired
idUnique identifier of the supplierlongrequired

Response

HTTP Status Codes

CodeDescription
200The supplier was successfully deleted
404No supplier was found