api templates index

Matteo Gavagnin edited this page Nov 1, 2012 · 1 revision

Get All Templates

Returns a JSON of the Templates owned by the user.

GET /api/v1/templates

Params

Param name Required Description
api_token Your Passdock API key

Supported Formats

json

Success Response:

  • Code: 200
    Content: Good Request

    Sample:

[
      {
        "auxiliary": [
          {
            "changeMessage": "Departure time changed to %@",
            "dateStyle": "PKDateStyleMedium",
            "key": "departure",
            "label": "DEPARTURE",
            "timeStyle": "PKTimeStyleMedium",
            "value": ""
          }
        ],
        "back": [
          {
            "changeMessage": "",
            "key": "passport",
            "label": "PASSPORT",
            "value": ""
          }
        ],
        "bar": {
          "altText": "",
          "format": "PKBarcodeFormatQR",
          "message": "",
          "messageEncoding": "iso-8859-1"
        },
        "created_at": "2012-10-18T09:03:46Z",
        "custom": [
          {
            "transitType": "PKTransitTypeAir"
          }
        ],
        "header": [
          {
            "changeMessage": "Gate changed to %@",
            "key": "gate",
            "label": "GATE",
            "value": ""
          }
        ],
        "id": 106,
        "primary": [
          {
            "changeMessage": "Departure changed in %@",
            "key": "from",
            "label": "FROM",
            "value": ""
          },
          {
            "changeMessage": "Destination changed to %@",
            "key": "to",
            "label": "TO",
            "value": ""
          }
        ],
        "relevance": {
          "relevantDate": ""
        },
        "secondary": [
          {
            "changeMessage": "Passenger name changed to %@",
            "key": "name",
            "label": "NAME",
            "value": ""
          }
        ],
        "title": "Passdock Airways",
        "updated_at": "2012-10-18T09:13:47Z",
        "visual": {
          "backgroundColor": "rgb(237,184,61)",
          "foregroundColor": "rgb(255,255,255)",
          "labelColor": "",
          "logoText": "Passdock Airways"
        }
      }
  ]

Error Response:

  • Code: 400
    Content: Bad Request

    OR

  • Code: 401
    Content: Unauthorized

Sample Call:

curl -i https://api.passdock.com/api/v1/templates?api_token=75778a65dfdae310a107d2ef0bbd3780