Skip to main content

Create company

This method lets you add companies to the system, either client or supplier

URL

(PUT) Companies

PARAMETERS

token

The token obtained on connection

Required

data

A json containing the company information (see below)

Required

 

JSON format of "data" parameter

 

CompanyNameThe name of the companyRequired
CodeAn optional company code.Optional
IsClientIndicates which type of company you want to create. If true, it creates a client. If false, a supplier.Required
CompanyTypeIdThe id representing the type of company that you want to create. For example, '0' is a "Corporation", '1' is a "Freelance translator". See Company types to get the list of existing profiles. If not set, "Corporation" is the default type.Optional
CommentsInternal comments included with the new companyOptional
CityThe city where the company is based.Optional
AddressLine1The first line of the address of the company.Optional
AddressLine2The second line of the address of the company.Optional
AddressLine3The third line of the address of the company.Optional
ZipThe address zip code.Optional
CountryCode

The 3 letter ISO country code such as 'USA', 'GRB',…

See http://unstats.un.org/unsd/tradekb/Knowledgebase/Country-Code for a complete list of codes.

Required
TimeZone

The company time zone code.

See chapter Time zones to get the list of supported codes.

Required
ContactNameThe contact person.Optional
ContactEmailThe contact email.Required
ContactPhoneThe contact phone.Optional
ContactPhoneMobileThe contact mobile phone.Optional
ContactFaxThe contact fax.Optional
ContactLocaleThe preferred language of communication.Optional
ContactTitleThe title of the contact such 'Mr.', 'Mrs.',...Optional
DebtorNoThe debtor number. Applies to clients only.Optional
CreditorNoThe creditor number. Applies to suppliers only.Optional
InvIsSameTrue or false. Indicates if the billing address is the same than the company address. If not set, the default value is true. The properties below are only processed if value is true.Optional
InvNameThe billing company name.Optional
InvEmailIf specified, then invoices are distributed by email to this address. Otherwise, emails are sent to the regular company contact email.Optional
InvCityBilling details: The city.Optional
InvAddressLine1Billing details: The first address details line.Optional
InvAddressLine2Billing details: The second address details line.Optional
InvAddressLine3Billing details: The third address details line.Optional
InvZipBilling details: The zip code.Optional
InvCountryCodeBilling details: The 3 letter ISO country code.Optional
VATApplicable VAT rate. If empty then the default platform VAT rate applies when calculating costs.Optional
PaymentTermsPayment terms applicable to supplier/client. If not provided, the platform default terms apply.Optional
VATNoThe company VAT /Tax number.Optional
AccountingCodeOptional code used for accounting purposes.Optional
CustomFields

A json array containing a list of custom field ids and values.

See below for details.

 

Example:

 

CODE
[ {
	"Id": "CustomStr1", 
	"Value": "My field" 
}, 
{ 
	"Id": "CustomStr5", 
	"Value": "A-2233" 
} ]
Optional
Labels

Set a label: "labels": [ { "id": 10, "value": 1 }, … ]

Clear a label: "labels": [ { "id": 10, "value": null }, … ]

See Custom labels to get the list of labels.

Optional
InvoiceTemplateId

The id of the template to use when printing invoices / quotes. See Invoice print layout to get the list.

Set null to reset value.

Optional

 

JSON format of field "CustomFields"

 

IdThe custom string id such as 'CustomStr1', 'CustomStr2', etc. Use method settings/customfields to obtain all available ids. Note that custom fields may apply to clients only, suppliers only or both (check out the configuration of custom fields in your Wordbee platform).Required
ValueThe value (string) of the custom fieldRequired

 

Example:

A minimal json to create a new client company is:

{

"CompanyName": "New company",

"IsClient": true,

"TimeZone": "Pacific Standard Time",

"CountryCode": "LUX",

"ContactEmail": "contact@gmail.com"

}

 

Results:

The id of the new company. In case of invalid parameters an HTTP error code is returned.



JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.