Creating a line
POST /locations/ id /lines

Creates a new line

Request

  curl -X POST https://api.qminder.com/v1/locations/4052/lines
  -H "X-Qminder-REST-API-Key: KEY"
  --data "name=My New Cool Service"
          
Request parameter Description
name Name of the line. Up to 30 characters long.

Response

{
  "statusCode": 200,
  "id": 827
} 
Response field Type Description
id Number ID of a created line
List of lines
GET /locations/ id /lines

Get list of lines for specified location.

Request

  curl https://api.qminder.com/v1/locations/4052/lines
  -H "X-Qminder-REST-API-Key: KEY"
          

Response

{
  "statusCode": 200,
  "data": [
    {...},
    {...}
  ]
} 
Returns a list of lines which are wrapped in a data object.
Details
GET /lines/ id

Get line details.

Request

  curl https://api.qminder.com/v1/lines/1827
  -H "X-Qminder-REST-API-Key: KEY"
          

Response

Returns a line.
Estimated time of service
GET /lines/ id /estimated-time

Get estimated time of service.

Request

  curl https://api.qminder.com/v1/lines/1827/estimated-time
  -H "X-Qminder-REST-API-Key: KEY"
          

Response

 {
    "statusCode": 200,
    "estimatedTimeOfService": "2013-07-03T16:27Z",
    "estimatedPeopleWaiting": 3
  } 
Response field Type Description
estimatedTimeOfService Date Estimated time it takes to serve all people in the line
estimatedPeopleWaiting Number Estimated number of people waiting
Deleting
DELETE /lines/ id

Deletes the line and all data associated with it. Deleting line is possible only if there is more than line connected to the location. If it is the only line for the location, server will reply with HTTP status code 409 and line will not be deleted.

Request

  curl -X DELETE https://api.qminder.com/v1/lines/1827
  -H "X-Qminder-REST-API-Key: KEY"
          

Response

 {
    "statusCode": 200
  }