/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
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 | source | Enumeration | Enumeration MY_ACCOUNT , INDIVIDUAL , or BROKER |
R | listing | Object | Listing Info |
O | → externalListingId | String | External Listing ID |
O | → totalPrice | Number | Listing Price |
R | → tokens | Array | Object Array of Tokens and Price |
R | → → token | String | Token |
O | → → individualPrice | Number | Individual price of a ticket |
C | seller | Object | Array which contains seller information. Required if "source" is "INDIVIDUAL" or "BROKER" |
R | → lastName | String | Account last name. |
R | → firstName | String | Account first name. |
O | → middleName | String | Account middle name. |
O | → address | Object | Object which contains address information. |
R | → → address1 | String | This represents street number & street name. |
O | → → address2 | String | This represents suite number. This value can be null. |
O | → → address3 | String | This value could be null. |
O | → → address4 | String | This value could be null. |
R | → → locality | String | This represents the city. |
R | → → region | String | This represents the state/province. |
R | → → postalCode | String | This represents the postalCode. |
R | → → countryCode | String | This represents the country code. |
O | → phoneNumber | Object | This represents patron's phone number |
R | → → number | String | Patron phone number, unformatted, with all non-numeric characters removed. This field is required if phone number is required |
O | → → formattedNumber | String | Patron phone number formatted |
O | → → extension | String | This. could be null. Required if the phone number is required |
R | → → countryCode | String | Patron phone number country code. This is required if the phone number is required |
R | → emailAddress | Object | Object which contains patron email information. |
R | String | Patron email address | |
O | → → optIn | Boolean | Patron 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
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 |
TOKEN_NOT_FOUND | Token does not exist | MS-404 | 404 | Not Found | 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 |
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"
}
}