saveSupplier

This call is deprecated. We recommend to use the PIM API instead.

The corresponding new call is: POST /v1/supplier.

Create or update a supplier.

Input parameters

Parameter name Description Possible value Required
supplierID Supplier ID. Set this parameter to edit an existing supplier. Omit this parameter to create a new one. Integer
groupID Supplier 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
supplierManagerID Supplier 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.
companyName String
companyTypeID If is not set - company type ID will be calculated by analysing company name for type-related parts. Integer
firstName String
lastName String
fullName String
code National ID number (for persons) / Registry code (for companies). String
companyID Use to indicate that this person is a contact person / an employee in a particular company.. Integer
birthday Person birthday (not applicable to companies). Date (yyyy-mm-dd)
vatNumber Supplier's VAT number. String
bankName Name of supplier's bank. String
bankAccountNumber Number of supplier's bank account. String
bankIBAN IBAN number of supplier's bank account. String
bankSWIFT BIC/SWIFT identifier of supplier's bank account. String
phone String
mobile String
fax String
email String
skype String
website String
notes String
integrationCode Corresponding supplier identifier in a system integrated with Erply (eg. accounting software) String
vatrateID ID of a VAT rate Integer
currencyCode Currency code, e.g. "EUR" String
deliveryTermsID ID of delivery terms Integer
countryID ID of supplier's country Integer
GLN String GLN.
paymentDays Default 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 name Type Description
supplierID Integer ID of the newly-created or updated item
alreadyExists Integer (0 or 1)