Skip to main content

/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

RCOMultitudeKeyTypeDescription
R1User-AgentStringAn identifying string in Product/Version format, where Version is a SemVer-compliant string, that uniquely identifies your application.
R1AuthorizationStringIt's required to use the "Bearer" authentication scheme to transmit the access token.
R1AcceptStringThe only supported response type for this endpoint is application/json.
O0-1Accept-EncodingStringgzip compression is supported.
R1Content-TypeStringPThe only supported request type for this endpoint is application/json.
R1PAC-Application-IDStringThe 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.
R1PAC-API-KeyStringThe API key provided by Paciolan for this application.
R1PAC-Channel-CodeStringThe channel partner identifier issued to your organization by the Paciolan Partner Services team partner on-boarding.
R1Request-IDStringThe integrator's external request ID for support traceablility and issue debugging. This string should be a UUID V4 value.

Request Object

RCOPropertyTypeDescription
RtokensarrayArray of Tokens

Response

HEADERS

PropertyTypeDescription
Request-IDStringThe same ID provided in the header of the request call returned back.
Content-TypeStringSupported type is application/json.

Error Response Object

PropertyTypeDescription
errorObjectError details
typeStringError type that has occurred
appErrorCodeStringInternal error code used for support. Depending on type returned, this code may be needed to handle error response differently
developerMessageStringGeneric description of error that occured

Error Types

Error TypeError DescApp Error CodeHTTP Status CodeHTTP Status DescRetry PossibleRetry CountUltimate actionMS Error Level
INVALID_TOKENToken is invalidMS-422422Unprocessable ContentNo0Caller to analyzeERROR
UNPROCESSABLE_ENTITYThe request payload cannot contain more than 100 tokensMS-422422Unprocessable ContentNo0Caller to analyzeERROR
SEAT_RECORD_LOCKEDSeat is lockedMS-409409ConflictNo0Caller to analyzeERROR

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",
}
}