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.
Enabling
POST /lines/ id /enable

Enable a disabled line.

Request

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

Response

 {
    "statusCode": 200
  } 
Disabling
POST /lines/ id /disable

Disables a line. If the line has any active tickets (status NEW or CALLED), the server will reply with an HTTP status code of 400 and the line will not be disabled.

Request

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

Response

 {
    "statusCode": 200
  } 
Deleting
DELETE /lines/ id

Deletes the line and all data associated with it. Deleting line is possible only if there is more than one 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
  }