Skip to main content

/tickets/lock

Description

The Lock API will lock the tokens provided to prevent any status changes to them.

Flow

While the listing is being created, there will be a request to API to lock the inventory. (Means protected)

Supported Methods

  • PUT

Request

/tickets/lock

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
RsourceEnumerationEnumeration MY_ACCOUNT, INDIVIDUAL, or BROKER
RlistingObjectListing Info
O externalListingIdStringExternal Listing ID
O totalPriceNumberListing Price
R tokensArrayObject Array of Tokens and Price
R tokenStringToken
O individualPriceNumberIndividual price of a ticket
CsellerObjectArray which contains seller information. Required if "source" is "INDIVIDUAL" or "BROKER"
R lastNameStringAccount last name.
R firstNameStringAccount first name.
O middleNameStringAccount middle name.
O addressObjectObject which contains address information.
R address1StringThis represents street number & street name.
O address2StringThis represents suite number. This value can be null.
O address3StringThis value could be null.
O address4StringThis value could be null.
R localityStringThis represents the city.
R regionStringThis represents the state/province.
R postalCodeStringThis represents the postalCode.
R countryCodeStringThis represents the country code.
O phoneNumberObjectThis represents patron's phone number
R numberStringPatron phone number, unformatted, with all non-numeric characters removed. This field is required if phone number is required
O formattedNumberStringPatron phone number formatted
O extensionStringThis. could be null. Required if the phone number is required
R countryCodeStringPatron phone number country code. This is required if the phone number is required
R emailAddressObjectObject which contains patron email information.
R emailStringPatron email address
O optInBooleanPatron marketing opt-in. If true, and if new patron is created, the API will set the email marketing flag to true. If the request resolves to existing patron then we WILL NOT update the email marketing flag for existing patrons.

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
TOKEN_NOT_FOUNDToken does not existMS-404404Not FoundNo0Caller to analyzeERROR
UNPROCESSABLE_ENTITYThe request payload cannot contain more than 100 tokensMS-422422Unprocessable ContentNo0Caller to analyzeERROR

Examples

Request

curl -X PUT --compressed 'https://link-sandbox.paciolan.info/v1/tickets/lock' \
-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 '{
"source": "MY_ACCOUNT",
"listing": {
"externalListingId": "SDFE3434JJRTER",
"totalPrice": 14,
"tokens": [
{
"token": "98973476444",
"individualPrice": 8
},
{
"token": "54457347644",
"individualPrice": 6
}
],
},
}'
curl -X PUT --compressed 'https://link-sandbox.paciolan.info/v1/tickets/lock' \
-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 '{
"source": "INDIVIDUAL",
"listing": {
"externalListingId": "SDFE3434JJRTER",
"totalPrice": 14,
"tokens": [
{
"token": "98973476444",
"individualPrice": 8
},
{
"token": "54457347644",
"individualPrice": 6
}
],
},
"seller": {
"lastName": "Smith",
"firstName": "John",
"emailAddress": {
"email": "johnsmith@paciolan.com",
"optIn": true
},
"phoneNumber": {
"number": "9498234548",
"countryCode": "US"
},
"address": {
"address1": "123 Paciolan St",
"locality": "Irvine",
"region": "CA",
"postalCode": "92617",
"countryCode": "US"
}
}
}'

Responses

Success Response
< HTTP/1.1 200

{
"success": [
{
"token":"98973476444",
"ownerId": "234567"
},
{
"token":"54457347644",
"ownerId": "234567"
}
],
"sellerIds": ["123456"]
}
Partial Failure Response

Note:

  • We don't support partial failure (for example, if four tokens were provided, and one of those tokens is invalid/not_found, the entire response would be invalid)
  • Also, please note that if atleast 1 token cannot be locked, the http status will be 207. If all tokens can be locked (success), then the http status will be 200.
< HTTP/1.1 207

{
"success": [
{
"token":"98973476444",
"ownerId": "234567"
},
{
"token":"54457347644",
"ownerId": "234567"
}
],
"failure": [
{
"token":"56789983390560",
"status":"UNLOCK",
"appErrorCode": "MS-422",
"developerMessage":"Token is invalid",
"type":"INVALID_TOKEN",
"ownerId": "234567"
},
{
"token":"56689833903898",
"status":"UNLOCK",
"appErrorCode": "MS-422",
"developerMessage":"Token is invalid",
"type":"INVALID_TOKEN",
"ownerId": "234567"
},
{
"token":"67889833903898",
"status":"UNLOCK",
"appErrorCode": "MS-404",
"developerMessage":"Token is not found",
"type":"TOKEN_NOT_FOUND",
"ownerId": "234567"
},
{
"token":"35293252542428",
"status":"UNLOCK",
"appErrorCode": "MS-404",
"developerMessage":"Token is not found",
"type":"TOKEN_NOT_FOUND",
"ownerId": "234567"
}
],
"sellerIds": ["123456"]
}
Full Failure Response
< HTTP/1.1 422

{
"error": {
"type": "UNPROCESSABLE_ENTITY",
"appErrorCode": "MS-422",
"developerMessage": "Unable to process the request."
},
"failure": [
{
"token":"56789983390560",
"status":"UNLOCK",
"appErrorCode": "MS-422",
"developerMessage":"Token is invalid",
"type":"INVALID_TOKEN",
"ownerId": "234567"
},
{
"token":"56689833903898",
"status":"UNLOCK",
"appErrorCode": "MS-422",
"developerMessage":"Token is invalid",
"type":"INVALID_TOKEN",
"ownerId": "234567"
},
{
"token":"67889833903898",
"status":"UNLOCK",
"appErrorCode": "MS-404",
"developerMessage":"Token is not found",
"type":"TOKEN_NOT_FOUND",
"ownerId": "234567"
},
{
"token":"35293252542428",
"status":"UNLOCK",
"appErrorCode": "MS-404",
"developerMessage":"Token is not found",
"type":"TOKEN_NOT_FOUND",
"ownerId": "234567"
}
],
"sellerIds": ["123456"]
}
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"
}
}