api passes show

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

Show Pass

Returns a JSON of the Pass for a given Template

GET /api/v1/templates/:template_id/passes/:id

Params

Param name Required Description
template_id Template ID
id Pass ID
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": "2012-11-12T10:12:20-08:00"
        }
      ],
      "back": [
        {
          "changeMessage": "",
          "key": "passport",
          "label": "PASSPORT",
          "value": "United States of America."
        }
      ],
      "bar": {
        "format": "PKBarcodeFormatQR",
        "message": "1350551026",
        "messageEncoding": "iso-8859-1"
      },
      "created_at": "2012-10-18T09:03:47Z",
      "custom": [
        {
          "transitType": "PKTransitTypeAir"
        }
      ],
      "download_url": "/passes/199",
      "family_id": 106,
      "header": [
        {
          "changeMessage": "Gate changed to %@",
          "key": "gate",
          "label": "GATE",
          "value": "56"
        }
      ],
      "id": 199,
      "primary": [
        {
          "changeMessage": "Departure changed in %@",
          "key": "from",
          "label": "FROM",
          "value": "NYC"
        },
        {
          "changeMessage": "Destination changed to %@",
          "key": "to",
          "label": "TO",
          "value": "SFO"
        }
      ],
      "relevance": {
        "locations": [
        ]
      },
      "secondary": [
        {
          "changeMessage": "Passenger name changed to %@",
          "key": "name",
          "label": "NAME",
          "value": "James Smith"
        }
      ],
      "serial_number": "serial-1350551026",
      "updated_at": "2012-10-18T09:15:31Z",
      "visual": {
        "backgroundColor": "rgb(237,184,61)",
        "foregroundColor": "rgb(255,255,255)",
        "labelColor": "",
        "logoText": "Passdock Airways"
      },
      "web_token": "cd4bf0e77e1c619ed55d78f5f2ead787b7c689f9"
  }

Error Response:

  • Code: 401
    Content: Unauthorized

    OR

  • Code: 404
    Content: Not Found

Sample Call:

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