list

request
GET /api/v2/legal-entities/licences?active=true&sort=issuedOn HTTP/1.1
Table 201. request description
Parameter Description

active

Is licence active?

pageable

Pageable description

response
HTTP/1.1 200 OK

{
  "content" : [ {
    "id" : 4,
    "issuedOn" : "2021-11-28",
    "issueInfo" : "229",
    "licenceNumber" : "2223",
    "legalEntity" : {
      "id" : 1,
      "shortName" : "ИП Валеева Людмила Александровна"
    },
    "departments" : [ {
      "id" : "1000000007",
      "name" : "Второй магазин"
    } ]
  }, {
    "id" : 13,
    "issuedOn" : "2025-10-27",
    "issueInfo" : "some info",
    "licenceNumber" : "5410",
    "legalEntity" : {
      "id" : 4,
      "shortName" : "ООО \"ПОКРОВСК-ОПТИКА ПЛЮС\""
    },
    "departments" : [ {
      "id" : "1000000003",
      "name" : "Первый магазин"
    } ]
  }, {
    "id" : 10,
    "issuedOn" : "2025-10-27",
    "issueInfo" : "some info",
    "licenceNumber" : "5410",
    "legalEntity" : {
      "id" : 5,
      "shortName" : "ИП1"
    },
    "departments" : [ {
      "id" : "1000000003",
      "name" : "Первый магазин"
    } ]
  }, {
    "id" : 7,
    "issuedOn" : "2025-10-27",
    "issueInfo" : "some info",
    "licenceNumber" : "5410",
    "legalEntity" : {
      "id" : 6,
      "shortName" : "ИП 2"
    },
    "departments" : [ {
      "id" : "1000000003",
      "name" : "Первый магазин"
    } ]
  } ],
  "pageable" : {
    "pageNumber" : 0,
    "pageSize" : 10,
    "sort" : {
      "empty" : false,
      "sorted" : true,
      "unsorted" : false
    },
    "offset" : 0,
    "paged" : true,
    "unpaged" : false
  },
  "last" : true,
  "totalElements" : 4,
  "totalPages" : 1,
  "first" : true,
  "size" : 10,
  "number" : 0,
  "sort" : {
    "empty" : false,
    "sorted" : true,
    "unsorted" : false
  },
  "numberOfElements" : 4,
  "empty" : false
}
Table 202. response description
Path Type Description

id

Number

The licence’s id

issuedOn

String

The licence’s issue date

issueInfo

String

The licence’s issue info

licenceNumber

String

The licence’s number

legalEntity

Object

The licence’s legal entity

departments

Array

The licence’s array of departments

create

request
POST /api/v2/legal-entities/licences HTTP/1.1

{
  "issuedOn" : "2020-11-28",
  "issueInfo" : "228",
  "licenceNumber" : "2223",
  "legalEntityId" : 1,
  "departmentsId" : [ 1000000007, 1000000008 ]
}
Table 203. request description
Path Type Description Constraints

issuedOn

String

The licence’s issue date

issueInfo

String

The licence’s issue info

number

String

The licence’s number

legalEntityId

Number

The licence’s legal entity id

departmentsIds

Array

The licence’s array of departments id’s

response
HTTP/1.1 201 Created
Location: /api/v2/legal-entities/licences/2
response description

update

request
PUT /api/v2/legal-entities/licences/4 HTTP/1.1

{
  "issuedOn" : "2021-11-28",
  "issueInfo" : "229",
  "licenceNumber" : "2223",
  "legalEntityId" : 1,
  "departmentsId" : [ 1000000007 ]
}
Table 204. /api/v2/legal-entities/licences/{legalEntityLicenceId}
Parameter Description

legalEntityLicenceId

legalEntityLicenceId

Path Type Description Constraints

name

String

the department’s name

Must not be blank.
Size must be between 0 and 50 inclusive

issuedOn

String

The licence’s issue date

issueInfo

String

The licence’s issue info

number

String

The licence’s number

legalEntityId

Number

The licence’s legal entity id

Must not be null

departmentsIds

Array

The licence’s array of departments id’s

response
HTTP/1.1 200 OK

get

request
GET /api/v2/legal-entities/licences/1 HTTP/1.1
Table 205. /api/v2/legal-entities/licences/{legalEntityLicenceId}
Parameter Description

legalEntityLicenceId

legalEntityLicenceId

response
HTTP/1.1 200 OK

{
  "id" : 1,
  "issuedOn" : "2019-11-28",
  "issueInfo" : "123",
  "licenceNumber" : "3123",
  "legalEntity" : {
    "id" : 1,
    "shortName" : "ИП Валеева Людмила Александровна"
  },
  "departments" : [ {
    "id" : "1000000003",
    "name" : "Первый магазин"
  } ]
}
response description
HTTP/1.1 200 OK

{
  "id" : 1,
  "issuedOn" : "2019-11-28",
  "issueInfo" : "123",
  "licenceNumber" : "3123",
  "legalEntity" : {
    "id" : 1,
    "shortName" : "ИП Валеева Людмила Александровна"
  },
  "departments" : [ {
    "id" : "1000000003",
    "name" : "Первый магазин"
  } ]
}

delete

request
DELETE /api/v2/legal-entities/licences/3 HTTP/1.1
Table 206. /api/v2/legal-entities/licences/{legalEntityLicenceId}
Parameter Description

legalEntityLicenceId

legalEntityLicenceId

response
HTTP/1.1 200 OK