Search

saveSupplier

Create or update a supplier.

Input parameters

Parameter nameDescriptionPossible valueRequired
supplierIDID of a supplier. If this parameter is present, then the specified supplier is updated.Integer
groupIDSupplier group ID. Use getSupplierGroups. If not specified, supplier will be assigned to the first supplier group in the list.
When updating existing supplier, groupID must not be set to 0.
Integer
supplierManagerIDSupplier manager (must be an employee, use getEmployees).Integer
*********If creating a new supplier, use parameter companyName.
If creating a new person, use parameters firstName and lastName. Alternatively - if it is necessary to add data where person's name is not split into surname and given names, use parameter fullName.
One of three parameters - companyName, lastName, fullName - is required.
companyNameString
firstNameString
lastNameString
fullNameString
codeNational ID number (for persons) / Registry code (for companies).String
companyIDUse to indicate that this person is a contact person / an employee in a particular company..Integer
birthdayPerson birthday (not applicable to companies).Date (yyyy-mm-dd)
vatNumberSupplier's VAT number.String
bankNameName of supplier's bank.String
bankAccountNumberNumber of supplier's bank account.String
bankIBANIBAN number of supplier's bank account.String
bankSWIFTBIC/SWIFT identifier of supplier's bank account.String
phoneString
mobileString
faxString
emailString
skypeString
websiteString
notesString
paymentDaysDefault payment period.Integer
*************Additional attributes associated with this item.
Attributes must be supplied as a flat list, each attribute defined by the following set of three parameters. Replace # with set number (1, 2, 3, ...). When updating an existing entry, API will only update the attributes specified in input data and leave all other existing attributes unchanged. To delete an attribute, set its value to 'null' or 'undefined'.
attributeName#Attribute name. Name can only contain the following symbols: A-Z, a-z, 0-9, dash and underscore.String
attributeType#Attribute type, possible types are 'text', 'int' and 'double'. By default 'text'.String
attributeValue#Value of the attribute. Set value to 'null' or 'undefined' to delete an attribute.
'text' attribute can be any string, maximum 255 characters.
'int' must be a signed 32-bit integer.
'double' must be a decimal number.
String

Response

Field nameTypeDescription
supplierIDIntegerID of the newly-created or updated item
alreadyExistsInteger(0 or 1)