Account
Account is a generic term which encapsulates the following concepts:
- Wholesaler
- Customer
- Supplier
- Company
- Organisation
The business model
Operator supports a Wholesaler under Wholesaler business model.
The example below demonstrate a Tree representation of the model which is supported. Wholesaler n means there can be n layers of a Wholesaler under Wholesaler.
graph TD
A[Wholesaler 1]-->B(Wholesaler 2);
A-->C(End customer 1);
B-->D(End customer 2);
B-->E(Wholesaler n);
E-->F(End customer n);
In some contexts below, the term "company" will be used on behalf of "account".
Properties of an account
- * account group id: The id of the account group owned by the parent account
- * parent account id: The id of the parent account
- head office account id: The id of the account which is head office
- introduced by account id: The id of the account which will act as representative (Dealer)
- * name: The official name of the business/consumer account.
- number: An friendly number to identify the account. If no number is set, the platform will assign an auto-incremental value
- * consumer: This is a boolean (true or false) value, where true means account is consumer, and false means account is business.
- chamber of commerce number: The registration number in the Chamber of Commerce where the account is located. It is mandatory in certain scenarios. See next section for details.
- value added tax number: The number the account was given for Value Added Tax purposes. This is a unique code issued to business accounts which are registered to pay VAT.
- * locations: List of locations, on which the physical location of the company, as well as where to send mails to. See Location for details.
- * contacts: List of contact persons for the company. See Contact for details.
The prefix * in the items listed above means they are mandatory.
Chamber of Commerce number validation
!!! info "The chamber of commerce number is optional by definition. However, it is mandatory for Business accounts (consumer: false) and the registration country (postal location) is The Netherlands."
Available features
- Get available status for accounts
- List all child accounts owned by a Supplier
- Create child accounts
- Modify account
- View details of account
- Change the status of an account
Examples
Create account
sequenceDiagram
Actor->>Administration API: GET account Group owned by Wholesaler 1
Note right of Administration API: See "https://api.host.url/webjars/swagger-ui/index.html?configUrl=/swagger-config.json#/accountgroup/overviewUsingGET" "Swagger documentation"
Administration API-->>Actor: OK!
Actor->>Administration API: Create account as child of Wholesaler 1
Note right of Administration API: See "https://api.host.url/webjars/swagger-ui/index.html?configUrl=/swagger-config.json#/account/createUsingPOST" "Swagger documentation"
Administration API-->>Actor: Account created!
List child accounts of parent account
sequenceDiagram
Actor->>Administration API: GET child accounts of parent account
Note right of Administration API: See "https://api.host.url/webjars/swagger-ui/index.html?configUrl=/swagger-config.json#/account/overviewUsingGET" "Swagger documentation"
Administration API-->>Actor: OK!
View details of account
sequenceDiagram
Actor->>Administration API: GET details of account
Note right of Administration API: See "https://api.host.url/webjars/swagger-ui/index.html?configUrl=/swagger-config.json#/account/detailsUsingGET_1" "Swagger documentation"
Administration API-->>Actor: OK!
Update account
sequenceDiagram
Actor->>Administration API: GET details of account
Note right of Administration API: See "https://api.host.url/webjars/swagger-ui/index.html?configUrl=/swagger-config.json#/account/detailsUsingGET_1" "Swagger documentation"
Administration API-->>Actor: OK!
Actor->>Administration API: Update account
Note right of Administration API: See "https://api.host.url/webjars/swagger-ui/index.html?configUrl=/swagger-config.json#/account/updateUsingPUT_1" "Swagger documentation"
Administration API-->>Actor: Account updated!
Update status of account
sequenceDiagram
Actor->>Administration API: GET available status of account
Note right of Administration API: See "https://api.host.url/webjars/swagger-ui/index.html?configUrl=/swagger-config.json#/account/overviewUsingGET_1" "Swagger documentation"
Administration API-->>Actor: OK!
Actor->>Administration API: Update account status
Note right of Administration API: See "https://api.host.url/webjars/swagger-ui/index.html?configUrl=/swagger-config.json#/account/changeStatusUsingPATCH" "Swagger documentation"
Administration API-->>Actor: Account status updated!