Search a Pass with a serial number

Examples

curl -i "https://api.passdock.com/api/v1/templates/106/passes/search?api_token=75778a65dfdae310a107d2ef0bbd3780&serial_number=serial-1351766860&many=true"

Supported Formats

json

Success Response:

200 Good Request
              {
      "auxiliary": [
        {
          "changeMessage": "Departure time changed to %@",
          "dateStyle": "PKDateStyleMedium",
          "key": "departure",
          "label": "DEPARTURE",
          "timeStyle": "PKDateStyleMedium",
          "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": "https://api.passdock.com/passes/199/cd4bf0e77e1c619ed55d78f5f2ead787b7c689f9.pkpass",
      "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"
    }
          
OR 200 Good Request with Many paramenter.
              [
    {
      "code": "This is the message inside the QR Code.",
      "download": "https://api.passdock.com/passes/34/0e21273510a9bc18fc05572842f461970583e3de.pkpass",
      "family_id": 25,
      "id": 34,
      "redeemed_at": null,
      "serial_number": "ObjC-API-65",
      "type": 1,
      "web_token": "0e21273510a9bc18fc05572842f461970583e3de"
    },
    {
      "code": "This is the message inside the QR Code.",
      "download": "https://api.passdock.com/passes/35/89b8cd9af2a98cc9bf21dd6050acc56fe43426f6.pkpass",
      "family_id": 25,
      "id": 35,
      "redeemed_at": null,
      "serial_number": "ObjC-API-78",
      "type": 1,
      "web_token": "89b8cd9af2a98cc9bf21dd6050acc56fe43426f6"
    },
    {
      "code": "This is the message inside the QR Code.",
      "download": "https://api.passdock.com/passes/36/9fb8daf956a1de6095e9a4f3cd0c97526701834c.pkpass",
      "family_id": 25,
      "id": 36,
      "redeemed_at": null,
      "serial_number": "ObjC-API-78",
      "type": 1,
      "web_token": "9fb8daf956a1de6095e9a4f3cd0c97526701834c"
    }
  ]
          

Errors

400 Bad Request
401 Unauthorized
404 Pass Not Found
423 Serial number too short (at least 3 chars)

Params

Param name Description
template_id
required

Template ID


Value: Must be Fixnum
many
optional

Get an array of Passes instead of the just one, but in compact mode


Value: Must be one of: true, false.
serial_number
required

Serial Number


Value: Must be String
api_token
required

Your Passdock API key


Value: Must be String