Serve type

get

request
GET /api/v2/services/types/107450 HTTP/1.1
response
HTTP/1.1 200 OK

{
  "id" : 107450,
  "name" : "Test serve types for licenced doctor",
  "bonus" : 0.0,
  "deleted" : false,
  "price" : 500.0,
  "purchasing" : null,
  "showInAPI" : true,
  "medical" : true,
  "insurable" : false,
  "needsComment" : false,
  "doctorAvailable" : true,
  "optometristAvailable" : false,
  "storeAvailable" : false,
  "productionAvailable" : false,
  "categories" : [ "Врач с лицензией" ]
}

list types

request
GET /api/v2/services/types?userGroupFilter=%D0%94%D0%BE%D1%81%D1%82%D1%83%D0%BF%D0%BD%D0%BE+%D0%B4%D0%BB%D1%8F+API HTTP/1.1
response
HTTP/1.1 200 OK

{
  "content" : [ {
    "id" : 1000000100,
    "name" : "1",
    "bonus" : 0.0,
    "deleted" : false,
    "price" : 1.0,
    "purchasing" : null,
    "showInAPI" : true,
    "medical" : true,
    "insurable" : false,
    "needsComment" : false,
    "doctorAvailable" : true,
    "optometristAvailable" : true,
    "storeAvailable" : true,
    "productionAvailable" : true,
    "categories" : [ ]
  } ],
  "pageable" : {
    "pageNumber" : 0,
    "pageSize" : 10,
    "sort" : {
      "empty" : false,
      "sorted" : true,
      "unsorted" : false
    },
    "offset" : 0,
    "paged" : true,
    "unpaged" : false
  },
  "last" : true,
  "totalElements" : 1,
  "totalPages" : 1,
  "first" : true,
  "size" : 10,
  "number" : 0,
  "sort" : {
    "empty" : false,
    "sorted" : true,
    "unsorted" : false
  },
  "numberOfElements" : 1,
  "empty" : false
}
Table 311. response description
Path Type Description

id

Number

The service type’s id

deleted

Boolean

Is the service type deleted?

name

String

The service type’s name

price

Number

The basic price of service of the type

create

request
POST /api/v2/services/types HTTP/1.1

{
  "name" : "Special name for ServeTypeControllerCreateTest",
  "medical" : false,
  "price" : 1000.0,
  "purchasing" : 400.0,
  "showInAPI" : false,
  "needsComment" : false,
  "doctorAvailable" : true,
  "optometristAvailable" : false,
  "storeAvailable" : false,
  "productionAvailable" : false,
  "categories" : [ "Офтальмолог" ]
}
response
HTTP/1.1 200 OK

{
  "id" : 1000000105,
  "name" : "Special name for ServeTypeControllerCreateTest",
  "bonus" : 0.0,
  "deleted" : false,
  "price" : 1000.0,
  "purchasing" : 400.0,
  "showInAPI" : false,
  "medical" : false,
  "insurable" : false,
  "needsComment" : false,
  "doctorAvailable" : false,
  "optometristAvailable" : false,
  "storeAvailable" : false,
  "productionAvailable" : false,
  "categories" : [ ]
}

update

request
PUT /api/v2/services/types/107450 HTTP/1.1

{
  "name" : "Special name for ServeTypeControllerCreateTest",
  "medical" : false,
  "price" : 1000.0,
  "purchasing" : 400.0,
  "showInAPI" : false,
  "needsComment" : false,
  "doctorAvailable" : true,
  "optometristAvailable" : false,
  "storeAvailable" : false,
  "productionAvailable" : false,
  "categories" : [ "Офтальмолог" ]
}
response
HTTP/1.1 200 OK

{
  "id" : 107450,
  "name" : "Special name for ServeTypeControllerCreateTest",
  "bonus" : 0.0,
  "deleted" : false,
  "price" : 1000.0,
  "purchasing" : 400.0,
  "showInAPI" : false,
  "medical" : false,
  "insurable" : false,
  "needsComment" : false,
  "doctorAvailable" : true,
  "optometristAvailable" : false,
  "storeAvailable" : false,
  "productionAvailable" : false,
  "categories" : [ "Офтальмолог" ]
}

delete

request
DELETE /api/v2/services/types/107450 HTTP/1.1
response
HTTP/1.1 200 OK