Create a new customer or update customer information. Function can be used for manipulating both companies and persons. Some parameters only apply to one or another.

If the created or updated customer is a natural person and your account country is subject to the General Data Protection Regulation (GDPR), Erply logs the change in the customer information processing log.

Input parameters

Parameter nameDescriptionPossible valueRequired
customerIDID of a customer. If this parameter is present, then the specified customer is updated.Integer
*********If creating a new company, 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.
genderGender: "male", "female" or empty string. For persons only.String
groupIDCustomer group ID. Use getCustomerGroups. If not specified, customer will be assigned to the first customer group in the list.
When updating existing customer, groupID must not be set to 0.
codeNational ID number (for persons) / Registry code (for companies).String
vatNumberCustomer's VAT number.String
imageContentCustomer's image content in base64. Use base64_encode($imagefile)Image
imageMimeTypeImage mime-type, allowed types are image/gif and image/jpegString
bankNameName of customer's bank.String
bankAccountNumberNumber of customer's bank account.String
bankIBANIBAN number of customer's bank account.String
bankSWIFTBIC/SWIFT identifier of customer's bank account.String
birthdayPerson's birthday (not applicable to companies).Date (yyyy-mm-dd)
integrationCodeCorresponding customer identifier in a system integrated with Erply (eg. accounting software)String
jobTitleIDPerson's job title ID.Integer
companyIDUse to indicate that this person is a contact person / an employee in a particular company..Integer
customerManagerIDCustomer manager (must be an employee, use getEmployees).Integer
invoicePayerIDUse to indicate that invoices to this customer must be addressed by default to another company.Integer
paymentDaysDefault payment period for invoices.Integer
penaltyPerDayPenalty for overdue invoices, expressed as % per day, eg. "0.5". Free text.String
creditCredit limit. Use system's default currency.Integer
salesBlockedIndicates that this customer is not allowed to receive invoices (up-front cash payments only).0 or 1, by default 0
referenceNumberAssign a reference number - if system is configured to use hand-created customer reference numbers. By default not necessary, since reference numbers are created automatically.String
customerCardNumberAssign the code of customer's loyalty/membership card. This code must match the sequence produced by card swipe.String
priceListIDAssign the customer a price list (see getPriceLists).Integer
priceListID2Customer's price list 2.Integer
priceListID3Customer's price list 3.Integer
euCustomerTypeCustomer type. Possible values are "DOMESTIC", "EU", "OUTSIDE_EU".String
outsideEUDEPRECATED — euCustomerType is recommended instead. Indicate that this is a foreign customer, located outside EU.0 or 1, by default 0
businessAreaIDCustomer's business area. Use getBusinessAreas.Integer
countryIDCountry ID. Use getCountries.Integer
taxOfficeIDTax office ID.

This is a Greece-specific field and can only be used on Greek accounts. Setting it on other accounts returns error code 1128.

To retrieve a list of tax offices, see getTaxOffices.
usernameUser name for webshop access. Before assigning user name, use API call validateCustomerUsername to verify that the user name is unique (no other customer has it yet).String
passwordPassword for webshop access.String
flagStatusWhether the customer is flagged or not.Integer (1 or 0)
colorStatusColor that the customer entry is marked with. Possible values: "", "yellow", "red", "blue", "green"String
taxExemptIndicates this customer is a tax exempt organizationInteger (0 or 1)
paysViaFactoringIndicates this customer pays invoices via factoringInteger (0 or 1)
creditCardLastNumbersLast 4 numbers of customer's credit cardString
signUpStoreIDLocation where customer was registeredInteger
homeStoreIDMost commonly used locationInteger
rewardPointsDisabledIndicates that this customer does not earn new reward points.0 or 1, by default 0
posCouponsDisabledIndicates that POS does not automatically print coupons to this customer.0 or 1, by default 0
emailOptOutIndicates that this customer is opted-out customer.0 or 1, by default 0
shipGoodsWithWaybillsIndicates that for this customer, shipments should be (and may be) accompanied by a Waybill. At the end of the month, a summary Invoice can be issued for all the month's shipments and customer will pay then for all the shipments at once. (In the Sales module, there is a command "Create invoice from selected waybills"). If a customer does not have this flag, you should issue Invoice-Waybills instead, and the customer must pay for each shipment separately.
Field appears only if conf parameter enable_waybill_customers is set to 1
Integer 0 or 1
*************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.
*************To store strings longer than 255 characters, use "long attributes". (All accounts might not have this capability (API returns error 1006). If necessary, please ask ERPLY customer support to turn this feature on.)

As with regular attributes, send parameters longAttributeName1 and longAttributeValue1 to store an attribute, longAttributeName2 and longAttributeValue2 to store another etc. The "#" symbol below should be replaced with numbers 1, 2, 3, etc.

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'.
longAttributeName#Attribute name. Name can only contain the following symbols: A-Z, a-z, 0-9, dash and underscore.String
longAttributeValue#Value of the attribute. Set value to 'null' or 'undefined' to delete an attribute.String (65535)


Field nameTypeDescription
alreadyExists (0 or 1)