1. Resources

1.1. Login

A POST request to log in, get token and its validity as a response.

Error codes:
401 "UNAUTHORIZED" invalid username or password or user/organization is blocked.
403 "FORBIDDEN" in case of 2nd login.

Curl request

Snippet curl-request not found for operation::login

HTTP request

Snippet http-request not found for operation::login

Request fields

Snippet request-fields not found for operation::login

HTTP response

Snippet http-response not found for operation::login

Response fields

Snippet response-fields not found for operation::login

1.2. Departments with Organizations

1.2.1. Get current user Departments

A GET request to get departments/organizations of user. Request parameter "level" is optional.

Required ORGANIZATIONS_VIEW(201,3) role.

Curl request

Snippet curl-request not found for operation::departmentsWithOrganizations

HTTP request

Snippet http-request not found for operation::departmentsWithOrganizations

Request headers

Snippet request-headers not found for operation::departmentsWithOrganizations

Query parameters

Snippet query-parameters not found for operation::departmentsWithOrganizations

HTTP response

Snippet http-response not found for operation::departmentsWithOrganizations

Response fields-

Snippet response-fields- not found for operation::departmentsWithOrganizations

1.2.2. Get Department by department code

Curl request

Snippet curl-request not found for operation::departmentByCode

HTTP request

Snippet http-request not found for operation::departmentByCode

Request headers

Snippet request-headers not found for operation::departmentByCode

Path parameters

Snippet path-parameters not found for operation::departmentByCode

HTTP response

Snippet http-response not found for operation::departmentByCode

Response fields

Snippet response-fields not found for operation::departmentByCode

1.3. Organizations

1.3.1. Get Organization by ID

A GET request to get organization by organization id. Organization must belong User’s organization and received organization.

Required ORGANIZATIONS_VIEW(201,3) role.

Curl request

Snippet curl-request not found for operation::organization

HTTP request

Snippet http-request not found for operation::organization

Request headers

Snippet request-headers not found for operation::organization

Path parameters

Snippet path-parameters not found for operation::organization

HTTP response

Snippet http-response not found for operation::organization

Response fields

Snippet response-fields not found for operation::organization

1.3.2. Get Organization by UNP

A GET request to get organization by organization UNP.

Required ORGANIZATIONS_VIEW(201,3) role.

Curl request

Snippet curl-request not found for operation::organizationByUnp

HTTP request

Snippet http-request not found for operation::organizationByUnp

Request headers

Snippet request-headers not found for operation::organizationByUnp

Path parameters

Snippet path-parameters not found for operation::organizationByUnp

HTTP response

Snippet http-response not found for operation::organizationByUnp

Response fields

Snippet response-fields not found for operation::organizationByUnp

1.3.3. Get all Organizations

A GET request to get all organizations. Response fields are the same as in the previous request.

Warning: a response would contain more than 4500 records.

Required ORGANIZATIONS_VIEW(201,3) role.

/api/organizations

GET /api/organizations HTTP/1.1
Authorization: 9D412264A84416A6B2626AEEF78AA199DEBA9BA7
Host: localhost:8801

1.4. DocStorages

1.4.1. Get Operations

A GET request to get storage operations for organization. Dates must be within one month. It’s allowed to receive operations only for the user’s organizations.

Required REGISTER_MOVEMENT_BY_WAREHOUSE_VIEW(303,3) role.

Curl request

Snippet curl-request not found for operation::operationsForOrganization

HTTP request

Snippet http-request not found for operation::operationsForOrganization

Request headers

Snippet request-headers not found for operation::operationsForOrganization

Path parameters

Snippet path-parameters not found for operation::operationsForOrganization

Query parameters

Snippet query-parameters not found for operation::operationsForOrganization

HTTP response

Snippet http-response not found for operation::operationsForOrganization

Response fields-

Snippet response-fields- not found for operation::operationsForOrganization

1.4.2. Get DocStorageTypes

A GET request for DocStorageTypes.

Required TYPES_WAREHOUSE_OPERATIONS_VIEW(111,3) role.

Curl request

Snippet curl-request not found for operation::docStorageTypes

HTTP request

Snippet http-request not found for operation::docStorageTypes

Request headers

Snippet request-headers not found for operation::docStorageTypes

HTTP response

Snippet http-response not found for operation::docStorageTypes

Response fields-

Snippet response-fields- not found for operation::docStorageTypes

1.4.3. Get DocStorageTypeActivities

A GET request for DocStorageTypeActivities.

Required TYPE_ACTIVITY_WAREHOUSE_OPERATIONS_VIEW(130,3) role.

Curl request

Snippet curl-request not found for operation::docStorageTypeActivities

HTTP request

Snippet http-request not found for operation::docStorageTypeActivities

Request headers

Snippet request-headers not found for operation::docStorageTypeActivities

HTTP response

Snippet http-response not found for operation::docStorageTypeActivities

Response fields-

Snippet response-fields- not found for operation::docStorageTypeActivities

1.4.4. Get BasisDocumentTypes

A GET request for BasisDocumentTypes.

Required TYPE_OF_DOCUMENT_REASONS_FOR_OPERATION_VIEW(112,3) role.

Curl request

Snippet curl-request not found for operation::basisDocumentTypes

HTTP request

Snippet http-request not found for operation::basisDocumentTypes

Request headers

Snippet request-headers not found for operation::basisDocumentTypes

HTTP response

Snippet http-response not found for operation::basisDocumentTypes

Response fields-

Snippet response-fields- not found for operation::basisDocumentTypes

1.5. Nomenclature

1.5.1. Get Nomenclature by ID

A GET request to get nomenclature by Nomenclature id.

Required ITEM_NOMENCLATURE_VIEW(301,3) role.

Curl request

Snippet curl-request not found for operation::nomenclatureById

HTTP request

Snippet http-request not found for operation::nomenclatureById

Request headers

Snippet request-headers not found for operation::nomenclatureById

Path parameters

Snippet path-parameters not found for operation::nomenclatureById

HTTP response

Snippet http-response not found for operation::nomenclatureById

Response fields

Snippet response-fields not found for operation::nomenclatureById

1.5.2. Get WoodProductCategories

A GET request to get all WoodProductCategories.

Required CATEGORY_PRODUCT_VIEW(114,3) role.

Curl request

Snippet curl-request not found for operation::woodProductCategories

HTTP request

Snippet http-request not found for operation::woodProductCategories

Request headers

Snippet request-headers not found for operation::woodProductCategories

HTTP response

Snippet http-response not found for operation::woodProductCategories

Response fields-

Snippet response-fields- not found for operation::woodProductCategories

1.5.3. Get DeterminingVolumeMethods

A GET request to get all DeterminingVolumeMethods.

Required METHOD_DEFINITION_VOLUME_VIEW(109,3) role.

Curl request

Snippet curl-request not found for operation::determiningVolumeMethods

HTTP request

Snippet http-request not found for operation::determiningVolumeMethods

Request headers

Snippet request-headers not found for operation::determiningVolumeMethods

HTTP response

Snippet http-response not found for operation::determiningVolumeMethods

Response fields-

Snippet response-fields- not found for operation::determiningVolumeMethods

1.5.4. Get WoodDiameterGroups

A GET request to get all WoodDiameterGroups.

Required GROUPS_DIAMETERS_VIEW(104,3) role.

Curl request

Snippet curl-request not found for operation::woodDiameterGroups

HTTP request

Snippet http-request not found for operation::woodDiameterGroups

Request headers

Snippet request-headers not found for operation::woodDiameterGroups

HTTP response

Snippet http-response not found for operation::woodDiameterGroups

Response fields-

Snippet response-fields- not found for operation::woodDiameterGroups

1.5.5. Get WoodDiameters

A GET request to get all WoodDiameters.

Required DIAMETERS_WOOD_VIEW(103,3) role.

Curl request

Snippet curl-request not found for operation::woodDiameters

HTTP request

Snippet http-request not found for operation::woodDiameters

Request headers

Snippet request-headers not found for operation::woodDiameters

HTTP response

Snippet http-response not found for operation::woodDiameters

Response fields-

Snippet response-fields- not found for operation::woodDiameters

1.5.6. Get WoodSorts

A GET request to get all WoodSorts.

Required VARIETIES_VIEW(113,3) role.

Curl request

Snippet curl-request not found for operation::woodSorts

HTTP request

Snippet http-request not found for operation::woodSorts

Request headers

Snippet request-headers not found for operation::woodSorts

HTTP response

Snippet http-response not found for operation::woodSorts

Response fields-

Snippet response-fields- not found for operation::woodSorts

1.5.7. Get WoodClasses

A GET request to get all WoodClasses.

Required WOOD_VARIETIES_VIEW(102,3) role.

Curl request

Snippet curl-request not found for operation::woodClasses

HTTP request

Snippet http-request not found for operation::woodClasses

Request headers

Snippet request-headers not found for operation::woodClasses

HTTP response

Snippet http-response not found for operation::woodClasses

Response fields-

Snippet response-fields- not found for operation::woodClasses

1.5.8. Get WoodSortTypes

A GET request to get all WoodSortTypes.

Required WOOD_VARIETIES_VIEW(102,3) role.

Curl request

Snippet curl-request not found for operation::woodSortTypes

HTTP request

Snippet http-request not found for operation::woodSortTypes

Request headers

Snippet request-headers not found for operation::woodSortTypes

HTTP response

Snippet http-response not found for operation::woodSortTypes

Response fields-

Snippet response-fields- not found for operation::woodSortTypes

1.5.9. Get Units

A GET request to get all Units.

Required UNITS_VIEW(100,3) role.

Curl request

Snippet curl-request not found for operation::units

HTTP request

Snippet http-request not found for operation::units

Request headers

Snippet request-headers not found for operation::units

HTTP response

Snippet http-response not found for operation::units

Response fields-

Snippet response-fields- not found for operation::units

1.5.10. Get Lengths

A GET request to get all Lengths.

Required LENGTHS_PRODUCTS_VIEW(110,3) role.

Curl request

Snippet curl-request not found for operation::lengths

HTTP request

Snippet http-request not found for operation::lengths

Request headers

Snippet request-headers not found for operation::lengths

HTTP response

Snippet http-response not found for operation::lengths

Response fields-

Snippet response-fields- not found for operation::lengths

1.5.11. Get WoodWhipClasses

A GET request to get all WoodWhipClasses.

Required DISCHARGE_WHIPLASH_VIEW(121,3) role.

Curl request

Snippet curl-request not found for operation::woodWhipClasses

HTTP request

Snippet http-request not found for operation::woodWhipClasses

Request headers

Snippet request-headers not found for operation::woodWhipClasses

HTTP response

Snippet http-response not found for operation::woodWhipClasses

Response fields-

Snippet response-fields- not found for operation::woodWhipClasses

1.6. Employees

1.6.1. Get Employee

A GET request to get employee by organization id and employee id. Employee must belong User’s organization and received organization.

Required EMPLOYEES_VIEW(202,3) role.

Curl request

Snippet curl-request not found for operation::employee

HTTP request

Snippet http-request not found for operation::employee

Request headers

Snippet request-headers not found for operation::employee

Path parameters

Snippet path-parameters not found for operation::employee

HTTP response

Snippet http-response not found for operation::employee

Response fields

Snippet response-fields not found for operation::employee

1.6.2. Get Employees

A GET request to get all employees of organization. Response fields are the same as in the previous request.

Required EMPLOYEES_VIEW(202,3) role.

/api/organizations/{organizationId}/employees

GET /api/organizations/3030/employees HTTP/1.1
Authorization: 9D412264A84416A6B2626AEEF78AA199DEBA9BA7
Host: localhost:8801

1.7. Get User

A GET request to find user details by organization id and user id. User must belong User’s organization and received organization. The result excludes password and token.

Required USERS_VIEW(215,3) role.

Curl request

Snippet curl-request not found for operation::userForOrganization

HTTP request

Snippet http-request not found for operation::userForOrganization

Request headers

Snippet request-headers not found for operation::userForOrganization

Path parameters

Snippet path-parameters not found for operation::userForOrganization

HTTP response

Snippet http-response not found for operation::userForOrganization

Response fields

Snippet response-fields not found for operation::userForOrganization

1.8. Storages

1.8.1. Get Storage

A GET request to get storage for organization. Organization must belong to the User.

Required WAREHOUSES_VIEW(302,3) role.

Curl request

Snippet curl-request not found for operation::storage

HTTP request

Snippet http-request not found for operation::storage

Request headers

Snippet request-headers not found for operation::storage

Path parameters

Snippet path-parameters not found for operation::storage

HTTP response

Snippet http-response not found for operation::storage

Response fields

Snippet response-fields not found for operation::storage

1.8.2. Get Storages

A GET request to get storages for organization. Organization must belong to the User.
Response fields are the same as in the previous request plus optional cuttingAreaId

It is strongly recommended to call this request only after 1.8.3(Get invalid Storages)
For example /api/organizations/{organizationId}/storages/invalid returns:
* [] then /api/organizations/{organizationId}/storages
* [250959,256305] then /api/organizations/{organizationId}/storages?except=250959,256305

Error codes:
403 "Forbidden" in case of given storage does not belong to any of user’s organizations.
409 "Conflict" when there are more than 1 cutting areas for storage.

Required WAREHOUSES_VIEW(302,3) role.

/api/organizations/{organizationId}/storages
optional request parameter except comma separated storageId

GET /api/organizations/3030/storages HTTP/1.1
Authorization: 9D412264A84416A6B2626AEEF78AA199DEBA9BA7
Host: localhost:8801

1.8.3. Get invalid Storages

A GET request to get invalid storages ids for organization. Returns empty array [] when all storages are valid.

Organization must belong to the User.

Required WAREHOUSES_VIEW(302,3) role.

Curl request

Snippet curl-request not found for operation::invalidStorages

HTTP request

Snippet http-request not found for operation::invalidStorages

Request headers

Snippet request-headers not found for operation::invalidStorages

Path parameters

Snippet path-parameters not found for operation::invalidStorages

HTTP response

Snippet http-response not found for operation::invalidStorages

1.9. Labels

1.9.1. Get Labels

A GET request provides all labels for current user organizations(departments) view scope.

All parameters are mandatory. Date range must be within a month.

Required TAGS_VIEW(318,3) role.

Curl request

Snippet curl-request not found for operation::labelsAll

HTTP request

Snippet http-request not found for operation::labelsAll

Request headers

Snippet request-headers not found for operation::labelsAll

Query parameters

Snippet query-parameters not found for operation::labelsAll

HTTP response

Snippet http-response not found for operation::labelsAll

Response fields-

Snippet response-fields- not found for operation::labelsAll

1.9.2. Get Labels for Organization

A GET request provides labels by organizationId, (optionally) statusId within the date range.

Date range must be within a year. if statusId is missing returns labels with all statuses.

Returns 403 "Forbidden" in case of organization does not belong to user.

Required TAGS_VIEW(318,3) role.

Curl request

Snippet curl-request not found for operation::labelsOrganization

HTTP request

Snippet http-request not found for operation::labelsOrganization

Request headers

Snippet request-headers not found for operation::labelsOrganization

Path parameters

Snippet path-parameters not found for operation::labelsOrganization

Query parameters

Snippet query-parameters not found for operation::labelsOrganization

HTTP response

Snippet http-response not found for operation::labelsOrganization

Response fields are the same as in 1.9.1

1.9.3. Get Labels for Department

A GET request provides labels by departmentId, (optionally) statusId within the date range.

Date range must be within a year. if statusId is missing returns labels with all statuses.

Returns 403 "Forbidden" in case of department does not belong to user.

Required TAGS_VIEW(318,3) role.

Curl request

Snippet curl-request not found for operation::labelsDepartment

HTTP request

Snippet http-request not found for operation::labelsDepartment

Request headers

Snippet request-headers not found for operation::labelsDepartment

Path parameters

Snippet path-parameters not found for operation::labelsDepartment

Query parameters

Snippet query-parameters not found for operation::labelsDepartment

HTTP response

Snippet http-response not found for operation::labelsDepartment

Response fields are the same as in 1.9.1

1.9.4. Get Label by ID

A GET request to get label by id.

Required TAGS_VIEW(318,3) role.

Curl request

Snippet curl-request not found for operation::label

HTTP request

Snippet http-request not found for operation::label

Request headers

Snippet request-headers not found for operation::label

Path parameters

Snippet path-parameters not found for operation::label

HTTP response

Snippet http-response not found for operation::label

Response fields are the same as in 1.9.1

1.9.5. Get LabelStatuses

A GET request to get all labels statuses.

Required TAGS_VIEW(318,3) role.

Curl request

Snippet curl-request not found for operation::labelStatuses

HTTP request

Snippet http-request not found for operation::labelStatuses

Request headers

Snippet request-headers not found for operation::labelStatuses

HTTP response

Snippet http-response not found for operation::labelStatuses

Response fields-

Snippet response-fields- not found for operation::labelStatuses

1.9.6. Get LabelSeries

A GET request to get all labels series.

Required TAGS_VIEW(318,3) role.

Curl request

Snippet curl-request not found for operation::labelSeries

HTTP request

Snippet http-request not found for operation::labelSeries

Request headers

Snippet request-headers not found for operation::labelSeries

HTTP response

Snippet http-response not found for operation::labelSeries

Response fields-

Snippet response-fields- not found for operation::labelSeries

1.10. CuttingAreas

1.10.1. Get CuttingAreaStatuses

A GET request to get all statuses for cutting areas.

Required LESOSKI_VIEW(205,3) role.

Curl request

Snippet curl-request not found for operation::cuttingAreasStatuses

HTTP request

Snippet http-request not found for operation::cuttingAreasStatuses

Request headers

Snippet request-headers not found for operation::cuttingAreasStatuses

HTTP response

Snippet http-response not found for operation::cuttingAreasStatuses

Response fields-

Snippet response-fields- not found for operation::cuttingAreasStatuses

1.10.2. Get CuttingArea for Storage

A GET request to get cutting area by storageId.

Error codes:
403 "Forbidden" in case of given storage does not belong to any of user’s organizations.
404 "Not Found" when there is no cutting area for given storage.
409 "Conflict" when there are more than 1 cutting areas.
412 "Precondition Failed" when there is no such storage.

Required LESOSKI_VIEW(205,3) role.

Curl request

Snippet curl-request not found for operation::cuttingAreaByStorageId

HTTP request

Snippet http-request not found for operation::cuttingAreaByStorageId

Request headers

Snippet request-headers not found for operation::cuttingAreaByStorageId

Path parameters

Snippet path-parameters not found for operation::cuttingAreaByStorageId

HTTP response

Snippet http-response not found for operation::cuttingAreaByStorageId

Response fields

Snippet response-fields not found for operation::cuttingAreaByStorageId

1.10.3. Get CuttingAreas for Organization

A GET request to get cutting areas by organization. Organization must belong to the User. Response fields are the same as in the previous request.

Required LESOSKI_VIEW(205,3) role.

/api/organizations/{organizationId}/cutting-areas

GET /api/organizations/2879/cutting-areas HTTP/1.1
Authorization: 9D412264A84416A6B2626AEEF78AA199DEBA9BA7
Host: localhost:8801

1.11. WoodDocs

1.11.1. Get ActivityKinds

A GET request to get all ActivityKinds for WoodDoc.

Required TYPE_ACTIVITY_VIEW(108,3) role.

Curl request

Snippet curl-request not found for operation::activityKinds

HTTP request

Snippet http-request not found for operation::activityKinds

Request headers

Snippet request-headers not found for operation::activityKinds

HTTP response

Snippet http-response not found for operation::activityKinds

Response fields-

Snippet response-fields- not found for operation::activityKinds

1.11.2. Get DeterminingVolumeProcesses

A GET request to get all DeterminingVolumeProcesses.

Required METHOD_OF_DETERMINING_CHOP_VOLUME_VIEW(116,3) role.

Curl request

Snippet curl-request not found for operation::determiningVolumeProcesses

HTTP request

Snippet http-request not found for operation::determiningVolumeProcesses

Request headers

Snippet request-headers not found for operation::determiningVolumeProcesses

HTTP response

Snippet http-response not found for operation::determiningVolumeProcesses

Response fields-

Snippet response-fields- not found for operation::determiningVolumeProcesses

1.11.3. Get FellingTypes

A GET request to get all FellingTypes for WoodDoc.

Required TYPES_OF_USE_AND_CHOP_TYPES_VIEW(207,3) role.

Curl request

Snippet curl-request not found for operation::fellingTypes

HTTP request

Snippet http-request not found for operation::fellingTypes

Request headers

Snippet request-headers not found for operation::fellingTypes

HTTP response

Snippet http-response not found for operation::fellingTypes

Response fields-

Snippet response-fields- not found for operation::fellingTypes

1.11.4. Get StorageTypes

A GET request to get all StorageTypes.

Required WAREHOUSE_TYPES_VIEW(115,3) role.

Curl request

Snippet curl-request not found for operation::storageTypes

HTTP request

Snippet http-request not found for operation::storageTypes

Request headers

Snippet request-headers not found for operation::storageTypes

HTTP response

Snippet http-response not found for operation::storageTypes

Response fields-

Snippet response-fields- not found for operation::storageTypes

1.11.5. Get WoodGroupTypes

A GET request to get all WoodGroupTypes.

Required TREE_SPECIES_AND_WOOD_GROUPS_VIEW(206,3) role.

Curl request

Snippet curl-request not found for operation::woodGroupTypes

HTTP request

Snippet http-request not found for operation::woodGroupTypes

Request headers

Snippet request-headers not found for operation::woodGroupTypes

HTTP response

Snippet http-response not found for operation::woodGroupTypes

Response fields-

Snippet response-fields- not found for operation::woodGroupTypes

1.11.6. Get WoodDocTypes

A GET request to get all WoodDocTypes for WoodDoc.

Required PERMIT_TYPES_VIEW(105,3) role.

Curl request

Snippet curl-request not found for operation::woodDocTypes

HTTP request

Snippet http-request not found for operation::woodDocTypes

Request headers

Snippet request-headers not found for operation::woodDocTypes

HTTP response

Snippet http-response not found for operation::woodDocTypes

Response fields-

Snippet response-fields- not found for operation::woodDocTypes

1.11.7. Get WoodDocTypePermits

A GET request to get all WoodDocTypePermits.

Required BASIS_FOREST_VIEW(106,3) role.

Curl request

Snippet curl-request not found for operation::woodDocPermits

HTTP request

Snippet http-request not found for operation::woodDocPermits

Request headers

Snippet request-headers not found for operation::woodDocPermits

HTTP response

Snippet http-response not found for operation::woodDocPermits

Response fields-

Snippet response-fields- not found for operation::woodDocPermits

1.11.8. Get WoodDocStatuses

A GET request to get all WoodDocStatus.

Required PERMIT_DOCUMENT_VIEW(200,3) role.

Curl request

Snippet curl-request not found for operation::woodDocStatutes

HTTP request

Snippet http-request not found for operation::woodDocStatutes

Request headers

Snippet request-headers not found for operation::woodDocStatutes

HTTP response

Snippet http-response not found for operation::woodDocStatutes

Response fields-

Snippet response-fields- not found for operation::woodDocStatutes

1.11.9. Get WoodDoc for Storage

A GET request to get WoodDoc by storageId.

Error codes:
403 "Forbidden" in case of given storage does not belong to any of user’s organizations.
404 "Not Found" when there is no woodDoc for given storage.
409 "Conflict" when there are more than 1 woodDocs.
412 "Precondition Failed" when there is no such storage.

Required PERMIT_DOCUMENT_VIEW(200,3) role.

Curl request

Snippet curl-request not found for operation::woodDoc

HTTP request

Snippet http-request not found for operation::woodDoc

Request headers

Snippet request-headers not found for operation::woodDoc

Path parameters

Snippet path-parameters not found for operation::woodDoc

HTTP response

Snippet http-response not found for operation::woodDoc

Response fields

Snippet response-fields not found for operation::woodDoc

1.11.10. Create a new WoodDoc ticket

A POST request to create new WoodDoc ticket. All fields are required, except for the fields in CuttingAreaSpecification (only woodGroupType is required). At least one cuttingAreaSpecification must contain a main woodGroupType, if specified and ticket contains the appropriate fellingType(checkWoodGroupTypeMain = true). CuttingAreaSpecifications without volumes will be ignored. The field "storages" should be located in the cutting area block. By default, cuttingAreaStatus will be set 2(Active) and woodDocStatus will be set 1(Project). It’s allowed to create only for the user’s organizations/departments. The woodDoc number is unique within one year for one departmentForestry.

The dateWoodDoc range: from the beginning of the current year to one month ahead of the current date.
All dates must be after or equals then dateWoodDoc except dateUse. dateUse must be before or equals then dateWoodDoc.
dateEndCuttingArea must be after or equals then the dateEndUse, but no longer than 4 months.
dateStart must be between woodDocDate and dateEndUse, inclusive.

Should not contain a field "fioWoodUse". If any incorrect provided dates or cuttingAreas, cuttingAreaSpecifications, storages, woodGroupType are not provided or woodDoc already exists or fioWoodUse is provided the response would be with status 406. If department blocked, or department haven’t 4 level, or woodGroupType blocked, the response would be with status 409.

Request may provide an Accept-Language header for preferable response language. By default, response has English locale. There are two locales available: Russian(ru) and English(en).
For example:
'Accept-Language: ru, en;q=0.8, *;q=0.5'

Required PERMIT_DOCUMENT_ADD(200,1),

LESOSKI_ADD(205,1),

SPECIFICATIONS_FORESTER_ADD(208,1),

WAREHOUSES_ADD(302,1) roles.

Curl request

Snippet curl-request not found for operation::addWoodDocTicket

HTTP request

Snippet http-request not found for operation::addWoodDocTicket

Request headers

Snippet request-headers not found for operation::addWoodDocTicket

Request fields

Snippet request-fields not found for operation::addWoodDocTicket

HTTP response

Snippet http-response not found for operation::addWoodDocTicket

1.11.11. Create a new WoodDoc order

A POST request to create new WoodDoc order. All fields are mandatory except for dateEndCuttingArea. The field "storages" should be located at the root. An array of unit length storages is expected. By default, woodDocStatus will be set 1(Project). It’s allowed to create only for individuals. The woodDoc number is unique within one year for one department.

The dateWoodDoc range: from the beginning of the current year to one month ahead of the current date.

All dates must be after or equals then dateWoodDoc except dateUse. dateUse must be before or equals then dateWoodDoc.

dateEndCuttingArea must be after or equals then the dateEndUse, but no longer than 4 months.

dateStart must be between woodDocDate and dateEndUse, inclusive.

Should not contain fields "cuttingAreas" and "organizationUse". If any incorrect provided dates or cuttingAreas or organizationUse are provided or received more than one storage or woodDoc already exists the response would be with status 406. If department blocked, or department haven’t 4 level the response would be with status 409.

Request may provide an Accept-Language header for preferable response language. By default, response has English locale. There are two locales available: Russian(ru) and English(en).
For example:
'Accept-Language: ru, en;q=0.8, *;q=0.5'

Required PERMIT_DOCUMENT_ADD(200,1),

LESOSKI_ADD(205,1),

SPECIFICATIONS_FORESTER_ADD(208,1),

WAREHOUSES_ADD(302,1) roles.

Curl request

Snippet curl-request not found for operation::addWoodDocOrder

HTTP request

Snippet http-request not found for operation::addWoodDocOrder

Request headers

Snippet request-headers not found for operation::addWoodDocOrder

Request fields

Snippet request-fields not found for operation::addWoodDocOrder

HTTP response

Snippet http-response not found for operation::addWoodDocOrder

1.11.12. Error messages when creating a WoodDoc

This example specified an invalid fellingType(399) for a WoodDoc order.

Curl request

Snippet curl-request not found for operation::errorIncorrectFellingType

HTTP request

Snippet http-request not found for operation::errorIncorrectFellingType

Request headers

Snippet request-headers not found for operation::errorIncorrectFellingType

HTTP response

Snippet http-response not found for operation::errorIncorrectFellingType

Response fields

Snippet response-fields not found for operation::errorIncorrectFellingType

1.12. Contracts

1.12.1. Import a new Contract

A POST request to create Contract.

Required CONTRACT_ADD(333,1) or CONTRACT_EDIT(332,1) role.

Curl request

Snippet curl-request not found for operation::importContract

HTTP request

Snippet http-request not found for operation::importContract

Request headers

Snippet request-headers not found for operation::importContract

Request fields

Snippet request-fields not found for operation::importContract

HTTP response

Snippet http-response not found for operation::importContract

1.12.2. Get Contracts for user Organization

A GET request for user organization and its parent active contracts.

Required CONTRACT_VIEW(333,3) role.

Curl request

Snippet curl-request not found for operation::gerActualContracts

HTTP request

Snippet http-request not found for operation::gerActualContracts

Request headers

Snippet request-headers not found for operation::gerActualContracts

HTTP response

Snippet http-response not found for operation::gerActualContracts

Response fields-

Snippet response-fields- not found for operation::gerActualContracts

1.12.3. Get Contract by seller Organization ID and Contract ID

A GET request for contract by seller organization id and contract external id.

Required CONTRACT_VIEW(333,3) role.

Curl request

Snippet curl-request not found for operation::gerContract

HTTP request

Snippet http-request not found for operation::gerContract

Request headers

Snippet request-headers not found for operation::gerContract

HTTP response

Snippet http-response not found for operation::gerContract

Response fields

Snippet response-fields not found for operation::gerContract

1.13. Logout

A DELETE request to log out.

Authentication is required.

Curl request

Snippet curl-request not found for operation::logout

HTTP request

Snippet http-request not found for operation::logout

Request headers

Snippet request-headers not found for operation::logout

HTTP response

Snippet http-response not found for operation::logout

2. Appendix

2.1. HTTP verbs

RESTful notes tries to adhere as closely as possible to standard HTTP and REST conventions in its use of HTTP verbs.

Verb Usage

GET

Used to retrieve a resource

POST

Used to create a new resource

PUT, PATCH

Used to update an existing resource, including partial updates

DELETE

Used to delete an existing resource

2.2. Response status codes

RESTful notes tries to adhere as closely as possible to standard HTTP and REST conventions in its use of HTTP status codes.

Status code Usage

200 OK

The request completed successfully

201 Created

A new resource has been created successfully. The resource’s URI is available from the response’s Location header.

204 No Content

An update to an existing resource has been applied successfully.

400 Bad Request

The request was malformed. The response body will include an error providing further information.

401 Unauthorized

The request has not been applied because it lacks valid authentication credentials.

403 Forbidden

The request was understood, but the server refuses to authorize it.

404 Not Found

The requested resource did not exist.

406 Not Acceptable

The requested resource did not have acceptable representation.

409 Conflict

The requested resource have conflict with the current state of the target resource.

410 Gone

The requested resource is no longer available.

412 Precondition Failed

The request conditions did not meet server expectation.