/tickets/verify
Description
This call will return ticket details for a group of barcode/tokens that were successfully verified as valid.
Flow
- The tokens and/or barcodes are submitted, the request will reach to API.
- The API will validate each token and barcode by calling the DB or miscroservices.
- Once all the tickets are validated, the API will return the tickets' info + validate code.
Assumptions
- For each and every token integrator will make a call to API to fetch the ticket validity.
Request
/tickets/verify
HEADERS
RCO | Multitude | Key | Type | Description |
---|---|---|---|---|
R | 1 | User-Agent | String | An identifying string in Product/Version format, where Version is a SemVer-compliant string, that uniquely identifies your application. |
R | 1 | Authorization | String | It's required to use the "Bearer" authentication scheme to transmit the access token. |
R | 1 | Accept | String | The only supported response type for this endpoint is application/json. |
O | 0-1 | Accept-Encoding | String | gzip compression is supported. |
R | 1 | Content-Type | String | PThe only supported request type for this endpoint is application/json. |
R | 1 | PAC-Application-ID | String | The application identifier for which API access has been authorized; this value is typically expressed in reverse domain notation and is bound to an API key provided by Paciolan during provisioning. |
R | 1 | PAC-API-Key | String | The API key provided by Paciolan for this application. |
R | 1 | PAC-Channel-Code | String | The channel partner identifier issued to your organization by the Paciolan Partner Services team partner on-boarding. |
R | 1 | Request-ID | String | The integrator's external request ID for support traceablility and issue debugging. This string should be a UUID V4 value. |
Request Object
RCO | Property | Type | Description |
---|---|---|---|
R | tickets | object | Object which holds Tokens, Barcodes & AccessId |
C | tokens | array | Array of Tokens (must not be present if barcodes are present) |
C | barcodes | array | Array of Barcodes (must not be present if tokens are present) |
C | accessId | String | The event Id (representing the access dataaccount) for the corresponding token |
Response
HEADERS
Property | Type | Description |
---|---|---|
Request-ID | String | The same ID provided in the header of the request call returned back. |
Content-Type | String | Supported type is application/json. |
Response Object
RCO | Property | Type | Description |
---|---|---|---|
R | tokens | Array of Objects | |
R | → accessId | String | The accessId for the event, will always be the main/home event. |
C | → success | Array of Objects | At least one successful verification is needed for this array to return. |
R | → → seats | Array of Objects | |
R | → → → token | String | token |
C | → → → barcode | String | barcode |
R | → → → season | String | season Code |
R | → → → event | String | event code |
R | → → → section | String | Section code. (LEVEL:SECTION) |
R | → → → row | String | Row Code |
R | → → → seat | String | Seat Code |
R | → → → seatingType | String | Seating type. One of RESERVED , GENERAL_ADMISSION , or SECTION_GENERAL_ADMISSION . |
R | → → → associationType | String | Association type. Incomplete list: PARKING , VIP , etc. |
R | → → → seatAttributes | Array of Strings | Seating attributes. Currently only ADA and LIMITED_VIEW available. |
C | → failure | Array of Objects | At least one failed verification is needed for this array to return. |
R | → → seats | Array of Objects | |
C | → → → token | String | token |
C | → → → barcode | String | barcode |
C | → → → code | String | error code |
C | → → → developerMessage | String | error message |
C | → → → type | String | Error Enumerations |
Error Response Object
Property | Type | Description |
---|---|---|
error | Object | Error details |
→ type | String | Error type that has occurred |
→ appErrorCode | String | Internal error code used for support. Depending on type returned, this code may be needed to handle error response differently |
→ developerMessage | String | Generic description of error that occured |
Error Types
Error Type | Error Desc | App Error Code | HTTP Status Code | HTTP Status Desc | Retry Possible | Retry Count | Ultimate action | MS Error Level |
---|---|---|---|---|---|---|---|---|
INVALID_BARCODE | Barcode is invalid | MS-422 | 422 | Unprocessable Content | No | 0 | Caller to analyze | ERROR |
INVALID_TOKEN | token is invalid | MS-422 | 422 | Unprocessable Content | No | 0 | Caller to analyze | ERROR |
BARCODE_NOT_FOUND | Barcode doesnt exist | MS-404 | 404 | Not Found | No | 0 | Caller to analyze | ERROR |
TOKEN_NOT_FOUND | token doesnt exist | MS-404 | 404 | Not Found | No | 0 | Caller to analyze | ERROR |
UNPROCESSABLE_ENTITY | The request payload cannot contain more than 100 tokens/barcodes | MS-422 | 422 | Unprocessable Content | No | 0 | Caller to analyze | ERROR |
Examples
Request
Token Example
curl -X POST --compressed 'https://link-sandbox.paciolan.info/v1/tickets/verify' \
-H 'User-Agent: MyApplication/1.0' \
-H 'Authorization: Bearer <BearerToken>'
-H 'Accept: application/json' \
-H 'Content-Type: application/json' \
-H 'PAC-Application-ID: com.mycompany.myapp' \
-H 'PAC-API-Key: <ApiKey>' \
-H 'PAC-Channel-Code: my-application' \
-H 'Request-ID: <RequestID>' \
-d '{
"tickets":[
{
"accessId": "123:BB19:BB01",
"tokens": [
"98973476444",
"54457347644"
]
},
{
"accessId": "456:P19:P01",
"tokens": [
"88973476445",
"55457347694"
]
}
]
}'
Barcode Example
curl -X POST --compressed 'https://link-sandbox.paciolan.info/v1/tickets/verify' \
-H 'User-Agent: MyApplication/1.0' \
-H 'Authorization: Bearer <BearerToken>'
-H 'Accept: application/json' \
-H 'Content-Type: application/json' \
-H 'PAC-Application-ID: com.mycompany.myapp' \
-H 'PAC-API-Key: <ApiKey>' \
-H 'PAC-Channel-Code: my-application' \
-H 'Request-ID: <RequestID>' \
-d '{
"tickets":[
{
"accessId": "123:BB19:BB01",
"barcodes": [
"2132893238972932893",
"2132893238972932893"
]
},
{
"accessId": "456:P19:P01",
"barcodes": [
"2132893238972932893",
"2132893238972932893"
]
}
]
}'
Responses
Success Response
< HTTP/1.1 200
{
"tokens":[
{
"accessId":"129:FB23:FB01",
"success": {
"seats": [
{
"token":"1234567890123456",
"season":"BB19",
"event":"BB01",
"section":"U:100",
"row":"AA",
"seat":"14",
"seatingType": "RESERVED",
"associationType": null,
"seatAttributes": null,
"ownerId": "135792"
},
{
"token":"1234567890123456",
"season":"BB19",
"event":"BB01",
"section":"U:100",
"row":"AA",
"seat":"14",
"seatingType": "RESERVED",
"associationType": null,
"seatAttributes": null,
"ownerId": "135792"
}
]
}
},
{
"accessId": "129:FB23:FB02",
"success": {
"seats": [
{
"token":"1234567890123456",
"season":"BB19",
"event":"BB01",
"section":"U:100",
"row":"AA",
"seat":"14",
"seatingType": "RESERVED",
"associationType": null,
"seatAttributes": null,
"ownerId": "135792"
}
]
}
}
]
}
< HTTP/1.1 200
{
"barcodes": [
{
"accessId": "129:FB23:FB01",
"success": {
"seats": [
{
"token": "1234567890123456",
"season": "BB19",
"event": "BB01",
"barcode": "75813167566966",
"section": "U:100",
"row": "AA",
"seat": "14",
"seatingType": "RESERVED",
"associationType": null,
"seatAttributes": null,
"ownerId": "135792"
},
{
"token": "1234567890123456",
"season": "BB19",
"event": "BB01",
"barcode": "75813167566968",
"section": "U:100",
"row": "AA",
"seat": "14",
"seatingType": "RESERVED",
"associationType": null,
"seatAttributes": null,
"ownerId": "135792"
}
]
}
},
{
"accessId": "129:FB23:FB02",
"success": {
"seats": [
{
"token": "1234567890123456",
"season": "BB19",
"event": "BB01",
"barcode": "75813167566966",
"section": "U:100",
"row": "AA",
"seat": "14",
"seatingType": "RESERVED",
"associationType": null,
"seatAttributes": null,
"ownerId": "135792"
}
]
}
}
]
}
Partial Success
< HTTP/1.1 207
{
"tokens": [
{
"accessId":"129:FB23:FB01",
"success": {
"seats": [
{
"token":"1234567890123456",
"season":"BB19",
"event":"BB01",
"section":"U:100",
"row":"AA",
"seat":"14",
"seatingType": "RESERVED",
"associationType": null,
"seatAttributes": null,
"ownerId": "135792"
},
{
"token":"1234567890123456",
"season":"BB19",
"event":"BB01",
"section":"U:100",
"row":"AA",
"seat":"14",
"seatingType": "RESERVED",
"associationType": null,
"seatAttributes": null,
"ownerId": "135792"
}
]
},
"failure": {
"seats": [
{
"token":"1234567890123456",
"appErrorCode": "MS-422",
"developerMessage":"token is invalid.",
"type":"INVALID_TOKEN",
"ownerId": "135792"
},
{
"token":"1234567890123456",
"appErrorCode": "MS-404",
"developerMessage":"This token is not found.",
"type":"TOKEN_NOT_FOUND",
"ownerId": "135792"
}
]
}
}
]
}
< HTTP/1.1 207
{
"barcodes": [
{
"accessId": "129:FB23:FB01",
"success": {
"seats": [
{
"token":"1234567890123456",
"season":"BB19",
"event":"BB01",
"barcode":"75813167566966",
"section":"U:100",
"row":"AA",
"seat":"14",
"seatingType": "RESERVED",
"associationType": null,
"seatAttributes": null,
"ownerId": "135792"
},
{
"token":"1234567890123456",
"season":"BB19",
"event":"BB01",
"barcode":"75813167566968",
"section":"U:100",
"row":"AA",
"seat":"14",
"seatingType": "RESERVED",
"associationType": null,
"seatAttributes": null,
"ownerId": "135792"
}
]
},
"failure": {
"seats": [
{
"barcode":"75813167566966",
"appErrorCode": "MS-422",
"developerMessage":"Barcode is invalid. ",
"type":"INVALID_BARCODE",
"ownerId": "135792"
},
{
"barcode":"75813167566966",
"appErrorCode": "MS-404",
"developerMessage":"This barcode is not found. ",
"type":"BARCODE_NOT_FOUND",
"ownerId": "135792"
}
]
}
}
]
}
Full Failure Response
< HTTP/1.1 422
{
"error": {
"type": "UNPROCESSABLE_ENTITY",
"appErrorCode": "MS-422",
"developerMessage": "Unable to process the request."
},
"failure": {
"seats": [
{
"barcode":"75813167566966",
"appErrorCode": "MS-422",
"developerMessage":"Barcode is invalid. ",
"type":"INVALID_BARCODE",
"ownerId": "135792"
},
{
"barcode":"75813167566966",
"appErrorCode": "MS-404",
"developerMessage":"This barcode is not found. ",
"type":"BARCODE_NOT_FOUND",
"ownerId": "135792"
}
]
}
}
Too Many Request Response for tokens
< HTTP/1.1 422
{
"error": {
"type": "UNPROCESSABLE_ENTITY",
"appErrorCode": "MS-422",
"developerMessage": "The request payload cannot contain more than 100 tokens",
}
}
Too Many Request Response for barcodes
< HTTP/1.1 422
{
"error": {
"type": "UNPROCESSABLE_ENTITY",
"appErrorCode": "MS-422",
"developerMessage": "The request payload cannot contain more than 100 barcodes",
}
}
Request contains both barcodes and tokens
< HTTP/1.1 422
{
"error":{
"type": "UNPROCESSABLE_ENTITY",
"appErrorCode": "MS-422",
"developerMessage": "The request payload cannot contain both barcodes and tokens"
}
}