Companies, users and partners
List and creation of an organization, loading and assigning members, importing and deleting partners.
A company is referred to as an organization in the Doklado Public API. Organization management entries identify it by company identification number (IČO).
All operations on this page use method POST, JSON body and header api_key. Access settings can be found in the Authentication. Click on an endpoint to open its inputs and responses in the REST API reference.
List and creation of a company
| Endpoint | Usage |
|---|---|
POST /v3/organization/manage/list | List of organizations that can be filtered by company identification number (IČO) or tax identification number (DIČ). |
POST /v3/organization/manage/create | Organization creation by company identification number (IČO), accounting software and country. |
Send in object when created data fields identificationNumber, accountingSoftware and countryCode. The country has the value sk or cz. Select the supported accounting software from the endpoint schema.
Members of the organization
| Endpoint | Usage |
|---|---|
POST /v3/organization/manage/list-members | Retrieve organization members including email, first name, last name, and role. |
POST /v3/organization/manage/assign-member | Assigning users to an organization. |
You can load the list of members by entering company identification number (IČO) into data.organizationId. In data.members, userEmail, name, surname, and organizationRole are returned for the member. Replace the sample company identification number (IČO) and API key with your own data.
curl --request POST --fail-with-body --silent --show-error \
'https://api-gateway-prod-europe-west-1-7epuecvu.ew.gateway.dev/v3/organization/manage/list-members' \
--header 'api_key: YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--data-raw '{
"data": {
"organizationId": "12345678"
}
}'
The members list can contain the roles owner, accountant, employee, desktop_agent, auditor, uploader, and tb_user.
You can send 1 to 20 users in data.users when assigned. Specify userEmail, name, surname, and organizationRole for each with a value of owner, accountant, or employee. These endpoints do not describe user removal.
Import of partners
| Endpoint | Usage |
|---|---|
POST /v3/organization/manage/partner/upsert | Import of partners by identifier from an external system. |
One request accepts 1 to 100 partners in data.partners. Specify name, accountingSoftwareInternalId, partnerCountryCode and partnerType (customer or supplier) for each. The identifier accountingSoftwareInternalId is used for pairing within the organization. The optional field data.partners[].emails contains a list of partner email addresses, for example ["uctaren@example.com", "fakturacia@example.com"]. It can also be null.
partnerCountryCode uses values such as sk or cz according to the specification examples. In the following example, replace the API key, company identification number (IČO), and the partner data with your own data:
curl --request POST --fail-with-body --silent --show-error \
'https://api-gateway-prod-europe-west-1-7epuecvu.ew.gateway.dev/v3/organization/manage/partner/upsert' \
--header 'api_key: YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--data-raw '{
"data": {
"organizationId": "12345678",
"partners": [
{
"name": "Sample customer",
"accountingSoftwareInternalId": "CUSTOMER-001",
"partnerCountryCode": "sk",
"partnerType": "customer",
"ico": "87654321"
}
]
}
}'
See endpoint reference for available address and tax fields.
Also check each data.partners entry in the response: accountingSoftId corresponds to the passed accountingSoftwareInternalId and success partner creation result. Despite the name "upsert", the description of the response mentions the already existing identifier success: false and the code DOCUMENT_ALREADY_EXISTS. Therefore, this description does not guarantee the update of an existing partner. The code is given in the description, but the separate code field for the partner item is not defined in the scheme.
Deleting partners
| Endpoint | Usage |
|---|---|
POST /v3/organization/manage/partner/delete | Removal of partners by identifiers from the external accounting system. |
In the data object, enter organizationId (company identification number (IČO) organization) and the accountingSoftwareInternalIds field with 1 to 100 identifiers. Use accountingSoftwareInternalId values that identify partners when importing via partner/upsert. In the example, replace API key, company identification number (IČO) and partner identifiers with your own data.
curl --request POST --fail-with-body --silent --show-error \
'https://api-gateway-prod-europe-west-1-7epuecvu.ew.gateway.dev/v3/organization/manage/partner/delete' \
--header 'api_key: YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--data-raw '{
"data": {
"organizationId": "12345678",
"accountingSoftwareInternalIds": [
"CUSTOMER-001",
"SUPPLIER-002"
]
}
}'
In the response, evaluate each data.partners separately: accountingSoftId corresponds to the passed identifier and success to the result of the deletion. If the identifier does not exist in the organization, the Swagger description states success: false and the code DOCUMENT_DOES_NOT_EXISTS. However, the scheme does not define a separate field for this code in the partner item.
Endpoint lists HTTP 200, 403, 404 and 500. For a successful HTTP response, therefore, also check the body of the response and the result of the individual partners.
More information
Consider paging and errors and API consumption when integrating. For a full list of operations, see endpoint overview.