Companies
Companies are used to group contacts from the same company together. This parent - child relationship i.e. tree organizational structure is very powerful because it allows inheriting addresses, settings, permissions, pricing, etc. A usergroup was used to represent a company in a B2B environment, but that concept will soon be deprecated and a dedicated Companies
resource should be used. Usergroups can still be used to group Companies.
The company API is only available on the Propeller cloud version. The legacy version of Propeller does not support this API
Company Lookup keys
Key | Type | Description |
---|---|---|
id | integer | Propeller company id |
sourceId | string | External system unique id. sourceId should be combined with source |
Fields
Name | Description | Type |
---|---|---|
name | Company name | string |
language | Default system language | string ISO 639-1 |
parent | Parent usergroup | JSON object that identifies the parent. id or sourceId in combination with source |
taxNumber | Company tax number | string |
cocNumber | Chamber of commerce number | string |
debtorId | A unique id representing the company | integer string |
phone | Company phone number | string |
email | Company email address | string |
department | Department | string |
office | Office | string |
notes | Notes | string |
inheritProductList | Indicates whether pricing should be inherited from parent usergroup | enum Y = Yes N = No |
inheritOrderList | Indicates whether the order list should be inherited from the parent usergroup | enum Y = Yes N = No |
budget | Company budget settings | enum Y = Contacts in the company use budget and may only order products within budget H = Contacts in the company use budget and may also order products outside budget N = Contacts in the company do not use budgets |
budgetInherit | Indicates whether budget settings should be inherited from parent usergroup | enum Y = Yes N = No |
orderListAllowAll | Order list settings | enum N = Order everything within the order list Y = Order everything outside the order list A = Order everything, but products outside the order list must be authorized U = Order everything P = Order restricted products |
sourceId | External system unique id | string |
source | External system | string |
Company Errors
This section describes error codes specific for the Company
resource.
Code | Error Type | Status Code | Message | Reason |
---|---|---|---|---|
40004 | CompanyExists | 400 | Company already exists | Company with such lookup key already exists |
40005 | CompanyMultipleFound | 400 | Multiple companies found. Please provide additional filters | Multiple companies with such lookup key exist |
40006 | CompanyNotFound | 404 | Company does not exist | Company with such lookup key not found |
40007 | ParentCompanyNotFound | 404 | Parent company not found | Parent company with such lookup key not found. This error is typical when working with company sub-resources (e.g. attributes, addresses) |
40008 | CompanyNotAllowed | 405 | Company is not allowed | Usually when company is in Recycle Bin and can't be used |
90006 | AddressNotFound | 404 | Address does not exist | Company address does not exist |
📄️ Get Addresses by type
Use this endpoint to retrieve a list of all company addresses. Addresses can be filtered by type.
📄️ Create Company Address
Use this endpoint to create an address for a company. If the address is successfully created, the response will include the address `id`.
📄️ Company Bulk Addresses
Use this endpoint to create multiple company addresses with a single API request. If an address with the code provided is found, it will be updated, otherwise a new address will be created. If the code is not provided, a new address will be created. When a new address is successfully created, the response will include the address `id`.
📄️ Get Company Address by Id
Use this endpoint to retrieve details for a company address. The address is identified by `id`.
📄️ Delete Company Address
Use this endpoint to delete a company address. The address is identified by `id`.
📄️ Update Company Address
Use this endpoint to update a company address. The address is identified by `id`.
📄️ Create Company
Use this endpoint to create a single company. If a company is successfully created, the response will include the usergroup `id`.
📄️ Get Company by lookup key
Use this endpoint to retrieve company details by lookup key. If multiple companies with the same lookup key exist, use additional filtering depending on the lookup key to uniquely identify the company (e.g. `source` and `language` for lookup key `sourceId`).
📄️ Delete Company by lookup key
Delete a company by a specific lookupKey / lookupId combination. A deleted company will be moved to the Propeller Recycle bin. This means the deleted company can be restored, however, only via the Propeller backoffice.
📄️ Update Company by lookup key
Use this endpoint to update company by lookup key. If multiple companies with the same lookup key exist, use additional filtering depending on the lookup key to uniquely identify the company (e.g. `source` and `language` for lookup key `sourceId`).
📄️ Bulk Companies by source id
The bulk endpoints offer an efficient way of importing/updating large amounts of companies with just a single API call. When using the bulk `sourceId` endpoint, the companies are identified by `sourceId`, `source` and `language`. If a company doesn't already exist, it will be created. If it does exist, the company found will be updated.
📄️ Bulk Companies by Id
The bulk endpoints offer an efficient way of importing/updating large amounts of companies with just a single API call. When using the bulk `id` endpoint, the companies are identified by `id`. If a company with such `id` doesn't already exist, it will be created. If it does exist, the company found will be updated.
📄️ Search Companies
> The companies search endpoint is only available on the Propeller cloud version.