ASDinCloudDocs
API ReferenceSuppliers

The supplier object

View as Markdown

Suppliers are payees for outgoing expenses and purchases.

Attributes

idinteger
Identifier assigned by the API.
namestring
Supplier name, up to 191 characters.
emailstring or null
Contact email.
phonestring or null
Phone number.
vatstring or null
VAT registration number.
taxcodestring or null
Tax code.
pecstring or null
Certified email address.
sdistring or null
Electronic invoicing recipient code.
addressstring or null
Street address.
citystring or null
City.
provincestring or null
Province or state.
zipstring or null
Postal code.
countrystring or null
Two-letter country code.
ibanstring or null
Account IBAN.
bicstring or null
Bank identifier code.
is_activeboolean
Whether the supplier is active.
notesstring or null
Notes about the supplier.
metadatamap or null
Additional supplier data.

List suppliers

View as Markdown
GET/api/v1/suppliers

Lists supplier records in the workspace.

Permissions

Send your API key in X-API-Key. Required permissions are Suppliers → Read.

Query parameters

qstring
Search by name, email, VAT number, or tax code.
is_activeinteger
Use 1 for active or 0 for inactive.
lengthinteger
Number of records to return.
startinteger
Zero-based offset.
drawstring
Optional request marker echoed in the response.
sortstring
Sort by id, name, email, city, is_active, tsc, or tsu. Prefix the field name with a minus sign for descending order.
orderstring
Direction for unprefixed sort fields. Use asc or desc.

Returns

Returns items in data, counts before and after text search, and the optional draw marker.

Errors

401
The API key is missing or invalid.
403
The API key lacks the required permission.

Retrieve a supplier

View as Markdown
GET/api/v1/suppliers/{id}

Returns one supplier by ID.

Permissions

Send your API key in X-API-Key. Required permissions are Suppliers → Read.

Path parameters

idintegerRequired
ID of the supplier.

Returns

The supplier is returned in data.

Errors

401
The API key is missing or invalid.
403
The API key lacks the required permission.
404
The requested record was not found.

Create a supplier

View as Markdown
POST/api/v1/suppliers

Creates a supplier.

Permissions

Send your API key in X-API-Key. Required permissions are Suppliers → Write.

Body parameters

namestringRequired
Supplier name, up to 191 characters.
emailstring or null
Contact email.
phonestring or null
Phone number.
vatstring or null
VAT registration number.
taxcodestring or null
Tax code.
pecstring or null
Certified email address.
sdistring or null
Electronic invoicing recipient code.
addressstring or null
Street address.
citystring or null
City.
provincestring or null
Province or state.
zipstring or null
Postal code.
countrystring or null
Two-letter country code.
ibanstring or null
Account IBAN.
bicstring or null
Bank identifier code.
is_activeboolean
Whether the supplier is active.
notesstring or null
Notes about the supplier.
metadatamap or null
Additional supplier data.

Returns

The created supplier is returned in data.

Errors

401
The API key is missing or invalid.
403
The API key lacks the required permission.
422
One or more fields failed validation.

Update a supplier

View as Markdown
PATCH / PUT / POST/api/v1/suppliers/{id}

Updates a supplier by ID.

Permissions

Send your API key in X-API-Key. Required permissions are Suppliers → Write.

Path parameters

idintegerRequired
ID of the supplier.

Body parameters

namestring
Supplier name, up to 191 characters.
emailstring or null
Contact email.
phonestring or null
Phone number.
vatstring or null
VAT registration number.
taxcodestring or null
Tax code.
pecstring or null
Certified email address.
sdistring or null
Electronic invoicing recipient code.
addressstring or null
Street address.
citystring or null
City.
provincestring or null
Province or state.
zipstring or null
Postal code.
countrystring or null
Two-letter country code.
ibanstring or null
Account IBAN.
bicstring or null
Bank identifier code.
is_activeboolean
Whether the supplier is active.
notesstring or null
Notes about the supplier.
metadatamap or null
Additional supplier data.

Include is_active when editing an active supplier. Omitting it deactivates the supplier.

Returns

Returns a successful update response.

Errors

401
The API key is missing or invalid.
403
The API key lacks the required permission.
404
The requested record was not found.
422
One or more fields failed validation.

Delete a supplier

View as Markdown
DELETE/api/v1/suppliers/{id}
POST/api/v1/suppliers/{id}/delete

Deletes an unused supplier.

Permissions

Send your API key in X-API-Key. Required permissions are Suppliers → Write.

Path parameters

idintegerRequired
ID of the supplier.

Returns

Returns a successful removal response.

Errors

401
The API key is missing or invalid.
403
The API key lacks the required permission.
404
The requested record was not found.
400
The record is in use or could not be removed.