/tickets/unlock
Description
The Unlock API will unlock tokens provided which will open that item/seat for status changes.
Flow
If the seller decides to unlist their items/seats (for any reason), then a request to unlock those tokens is needed.
Supported Methods
- PUT
Description
This API is idempotent. All it does is unlock the inventory. (Flipping the mpreserve flag to false)
Request
/tickets/unlock
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 | tokens | array | Array of Tokens |
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. |
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_TOKEN | Token is invalid | MS-422 | 422 | Unprocessable Content | No | 0 | Caller to analyze | ERROR |
UNPROCESSABLE_ENTITY | The request payload cannot contain more than 100 tokens | MS-422 | 422 | Unprocessable Content | No | 0 | Caller to analyze | ERROR |
SEAT_RECORD_LOCKED | Seat is locked | MS-409 | 409 | Conflict | No | 0 | Caller to analyze | ERROR |
Examples
Request
curl -X PUT --compressed 'https://link-sandbox.paciolan.info/v1/tickets/unlock' \
-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 '{
"tokens":[
"98973476444",
"54457347644"
]
}'
Responses
Success Response
< HTTP/1.1 200
{
"success": [
{
"token":"98973476444",
"ownerId": "234567"
},
{
"token":"54457347644",
"ownerId": "234567"
}
]
}
Partial Failure Response
Note:
- We support partial failure.(which means for example out of four tokens if token1 and token2 are unlocked but failed to unlock the token3, we aren't going back and locking token1 and token2(basically reset state))
- Also, please note that if atleast 1 token cannot be unlocked, the http status will be 207. If all tokens can be unlocked (total success), then the http status will be 200.
< HTTP/1.1 207
{
"success": [
{
"token":"98973476444",
"ownerId": "234567"
},
{
"token":"54457347644",
"ownerId": "234567"
}
],
"failure": [
{
"token":"67889833903898",
"status": null,
"appErrorCode": "MS-422",
"developerMessage":"Token is invalid",
"type":"INVALID_TOKEN",
"ownerId": "234567"
},
{
"token":"35293252542428",
"status": "LOCK",
"appErrorCode": "MS-409",
"developerMessage": "Seat is locked",
"type": "SEAT_RECORD_LOCKED",
"ownerId": "234567"
}
]
}
Unsuccessful Unlock Response
< HTTP/1.1 422
{
"error": {
"type":"UNPROCESSABLE_ENTITY",
"appErrorCode": "MS-422",
"developerMessage":"Unable to process the request."
},
"failure": [
{
"token": "56789983390560",
"status": null,
"appErrorCode": "MS-422",
"developerMessage": "Token is invalid",
"type": "INVALID_TOKEN",
"ownerId": "234567"
},
{
"token": "56689833903898",
"status": null,
"appErrorCode": "MS-422",
"developerMessage": "Token is invalid",
"type": "INVALID_TOKEN",
"ownerId": "234567"
}
]
}
Too Many Request Response
< HTTP/1.1 422
{
"error": {
"type": "UNPROCESSABLE_ENTITY",
"appErrorCode": "MS-422",
"developerMessage":"The request payload cannot contain more than 100 tokens",
}
}