/cart/complete-order
Description
The Complete Order API endpoint commits a cart to a sale and records a financial transaction.
Supported Methods
- POST
Supported Status Codes
- 201 Created
- 207 Partial Success
- 400 Bad Request
- 401 Unauthorized
- 402 Payment Required
- 403 Forbidden
- 405 Method Not Allowed
- 406 Not Acceptable
- 415 Unsupported Media Type
- 422 Unprocessable Entity
- 426 Upgrade Required
- 429 Too Many Requests
- 500 Internal Server Error
- 505 HTTP Version Not Supported
Supported Media Types
Request
- application/json
Response
- application/json
Request
/cart/complete-order
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 | Multitude | Property | Type | Description |
---|---|---|---|---|
R | 1 | listing | Object | Listing Info |
R | 1 | → externalListingId | String | External Listing ID |
R | 1 | → externalOrderId | String | External Order ID |
O | 1 | → totalPrice | Number | Total listing price (exclude fees) |
O | 1 | → totalFees | Number | Total fees |
R | 1-N | → tokens | Array of Objects | Represents individual tickets with a token and price. |
R | 1 | → → token | String | Ticket token ID |
O | 1 | → → individualPrice | Number | Individual ticket price |
O | 1 | → → individualFees | Number | Individual ticket fees |
R | 1 | buyer | Object | Buyer Information |
R | 1 | → buyer.firstName | String | Buyer's first name. |
O | 0-1 | → buyer.middleInitial | String | Buyer's middle initial. |
R | 1 | → buyer.lastName | String | Buyer's last name. |
R | 1 | → buyer.phoneNumber | Object | Buyer's phone number. |
R | 1 | → → buyer.phoneNumber.number | String | Buyer's phone number, unformatted, with all non-numeric characters removed. |
O | 0-1 | → → buyer.phoneNumber.formattedNumber | String | Buyer's phone number, formatted. |
O | 0-1 | → → buyer.phoneNumber.extension | String | Buyer's phone number extension. |
R | 1 | → → buyer.phoneNumber.countryCode | String | Buyer's phone number country code. |
O | 0-1 | → buyer.address | Object | Buyer's address |
R | 1 | → → buyer.address.address1 | String | Buyer's address 1 |
O | 0-1 | → → buyer.address.address2 | String | Buyer's address 2 |
O | 0-1 | → → buyer.address.address3 | String | Buyer's address 3 (mapped to in care of in the back office) |
O | 0-1 | → → buyer.address.address4 | String | Buyer's address 4 (mapped to international address line in the back office) |
R | 1 | → → buyer.address.locality | String | Buyer's address locality (city for most locales) |
R | 1 | → → buyer.address.region | String | Buyer's address region (state/province for most locales) |
R | 1 | → → buyer.address.postalCode | String | Buyer's postal code. |
R | 1 | → → buyer.address.countryCode | String | Buyer's address country code |
R | 1 | → buyer.emailAddress | Object | Buyer email address details. |
R | 1 | → → buyer.emailAddress.email | String | Buyer email. |
O | O-1 | → → buyer.emailAddress.optIn | Boolean | Buyer opt-in. If true, and if new patron is created then the API will set the email marketing flag to true. If the request resolves to existing patron then we DO NOT update the email marketing flag for existing patrons. |
R | 1 | settlement | Object | Required for resale. |
R | 1 | → totalAmountPaid | Number | Total amount paid by the buyer(includes fees). |
R | 1 | → amountToSeller | Number | Amount paid to the seller. |
O | 0-1 | asyncCallbackUrl | String | If the complete order call takes longer than expected, we will respond back with a status of "PENDING". If this callback URL is provided, our systems will then call it when the status updates, setting the request of the call to follow the response object definition below. |
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
Property | Type | Description |
---|---|---|
processId | String | A unique ID for the request that is/has executed. |
status | Enum ["PENDING", "COMPLETE", "ERROR"] | The status of the order. A status of "PENDING" will require a polling call to /complete-order/{processId} if no asyncCallbackUrl was provided in the request. |
paid | Double (JSON Number) | Total amount of any payments applied |
offers | Array of Objects | Collection of offers. Each offer represents one ticket. |
→ quantity | Integer (JSON Number) | Offer quantity |
→ seasonCode | String | Season code |
→ itemCode | String | Item code |
→ basis | String | Item basis |
→ event | Object | Event object (single items only) |
→ → event.name | String | Event (item) name |
→ → priceLevel | Integer (JSON Number) | Price level |
→ → seats | Array of Objects | Collection of seats |
→ → → section | String | Section (level:section) |
→ → → row | String | Row |
→ → → seat | String | Seat |
→ → → sequence | Integer (JSON Number) | Seat sequence |
→ → → accessId | String | AccessId for the new token. |
→ → → token | String | New token ID. This can be used implicitly as the offer's ID. |
→ → → mobileUrl | String | Mobile Ticket PDF |
→ → → applePassUrl | String | Apple Pass |
→ → → googlePassUrl | String | Text file containing the JWT needed to append to https://pay.google.com/gp/v/save/{JWT} to receive the pass for Google Wallet. |
→ priceType | Object | Price type |
→ → priceType.name | String | Price type name |
transactions | Array of Objects | Transaction records from Paciolan system. |
→ season | String | Transaction season |
→ transaction | String | Transaction id |
Error Response Object
Non-200 Errors
Property | Type | Description |
---|---|---|
processId | String | A unique ID for the request that has executed. |
status | Enum ["ERROR"] | The status of the order, in this case, "ERROR" |
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 |
207 Error
Property | Type | Description |
---|---|---|
processId | String | A unique ID for the request that has executed. |
status | Enum ["ERROR"] | The status of the order, in this case, "ERROR" |
errors | Array of Objects | Collection of errors |
→ 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 |
→ tokens | Array of Strings | Tokens that are part of this error group |
Error Types
Error Type | Error Desc | App Error Code | HTTP Status Code | HTTP Status Desc | Retry Possible | Retry Count | Ultimate action | MS Error Level |
---|---|---|---|---|---|---|---|---|
AUTHORIZATION_FAILURE | Missing required headers (PAC-Channel-Code, PAC-Application-ID, or PAC-Organization-ID) | MS-401 | 401 | Unauthorized | No | 0 | Caller to analyze | ERROR |
INVALID_CHANNEL_CONFIG | ||||||||
INVALID_PARAMETER_VALUE | ||||||||
JSON_PARSE_ERROR | ||||||||
UNAUTHORIZED_REQUEST | A PAC-Organization-ID provided that does not have the correct access controls set up | MS-403 | 403 | Forbidden | No | 0 | Caller to analyze | ERROR |
UNHANDLED_EXCEPTION | A call made where the API can't properly connect/read the internal channel configuration | MS-500 | 500 | Internal Server Error | Yes | 3 | Caller to inform Provider | FATAL |
ORDER_INCOMPLETE | Some of the items in the order were not processed correctly. Escalation required. | * | 207 | Multi-Status | No | 0 | Caller to inform Provider | FATAL |
Examples
Request
curl -X POST --compressed 'https://link-sandbox.paciolan.info/v1/cart/complete-order' \
-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 '{
"listing": {
"externalListingId": "SDFE3434JJRTER",
"externalOrderId": "1234567890",
"totalPrice": 100,
"totalFees": 4,
"tokens": [
{
"token": "129L7GVL7PX3KS9ZC",
"individualPrice": 50,
"individualFees": 2,
},
{
"token": "129L7GVL7PX3KS8YB",
"individualPrice": 50,
"individualFees": 2,
}
]
},
"buyer": {
"firstName": "Tony",
"lastName": "Stark",
"emailAddress": {
"email": "tony@stark.com"
},
"phoneNumber": {
"number": "7149999999",
"countryCode": "US"
},
"address": {
"address1": "123 Main Street",
"locality": "Irvine",
"region": "CA",
"postalCode": "92627",
"countryCode": "US"
},
},
"settlement": {
"totalAmountPaid": 52,
"amountToSeller": 45,
}
}'
Responses
Status COMPLETE (Success) Response
{
"processId": "a1b2c3",
"status": "COMPLETE",
"paid": 104,
"offers": [
{
"quantity": 1,
"seasonCode": "CALI",
"itemCode": "RSHAHLA",
"basis": "SINGLE",
"event": {
"name": "RSHAH LA",
"priceLevel": 1,
"seats": [
{
"section": "1:1",
"row": "2",
"seat": "1",
"sequence": 1,
"accessId": "431:BB19:BB01",
"token": "badf123aadadf123a",
"mobileUrl": "https://ticketdelivery.eveneue.net/tickets/F19/F02/3u328u39hfisudfisfhw-mobile.pdf",
"applePassUrl": "https://ticketdelivery.eveneue.net/tickets/F19/F02/3u328u39hfisudfisfhx.pkpass",
"googlePassUrl": "https://ticketdelivery.eveneue.net/tickets/F19/F02/3u328u39hfisudfisfhx.txt",
"ownerId": "135792"
}
]
},
"priceType": {
"name": "Adult"
}
},
{
"quantity": 1,
"seasonCode": "CALI",
"itemCode": "RSHAHLA",
"basis": "SINGLE",
"event": {
"name": "RSHAH LA",
"priceLevel": 1,
"seats": [
{
"section": "1:1",
"row": "2",
"seat": "2",
"sequence": 2,
"accessId": "431:BB19:BB01",
"token": "asdf123afvaefa",
"mobileUrl": "https://ticketdelivery.eveneue.net/tickets/F19/F02/3u328u39hfisudfisfhw-mobile.pdf",
"applePassUrl": "https://ticketdelivery.eveneue.net/tickets/F19/F02/3u328u39hfisudfisfhw.pkpass",
"googlePassUrl": "https://ticketdelivery.eveneue.net/tickets/F19/F02/3u328u39hfisudfisfhw.txt",
"ownerId": "135792"
}
]
},
"priceType": {
"name": "Adult"
}
}
],
"transactions": [
{
"season": "CALI",
"transaction": "264667"
}
],
"sellerIds": ["654321"],
"cartId": "7890987"
}
Status PENDING Response
{
"processId": "d4e5f6",
"status": "PENDING"
}
Status ERROR Response
An HTTP Status Code of 207
with a body status
of ERROR
will produce a partial failure that requires customer support escalation and will look similar to this:
{
"processId": "g7h8i9",
"status": "ERROR",
"paid": 104,
"offers": [
{
"quantity": 2,
"seasonCode": "CALI",
"itemCode": "RSHAHLA",
"basis": "SINGLE",
"event": {
"name": "RSHAH LA",
"priceLevel": 1,
"seats": [
{
"section": "1:1",
"row": "2",
"seat": "1",
"sequence": 1,
"accessId": "431:BB19:BB01",
"token": "1b66cg62375bd82f4",
"mobileUrl": "https://ticketdelivery.eveneue.net/tickets/F19/F02/3u328u39hfisudfisfhw-mobile.pdf",
"applePassUrl": "https://ticketdelivery.eveneue.net/tickets/F19/F02/3u328u39hfisudfisfhx.pkpass",
"googlePassUrl": "https://ticketdelivery.eveneue.net/tickets/F19/F02/3u328u39hfisudfisfhx.txt",
"ownerId": "135792"
}
]
},
"priceType": {
"name": "Adult"
}
}
],
"transactions": [
{
"season": "CALI",
"transaction": "264667"
}
],
"errors": [
{
"type": "ORDER_INCOMPLETE",
"appErrorCode": "BO-*",
"developerMessage": "Some of the items in this order did not process correctly.",
"tokens": [
"bddf9ggcgbe80b2c6",
"9d2eg28fg6c230042"
],
sellerIds: ["123456"]
},
{
"type": "ORDER_INCOMPLETE",
"appErrorCode": "BO-*",
"developerMessage": "Some of the items in this order did not process correctly.",
"tokens": [
"e597ba2feabg84bb2",
"447ga7255e0723dac"
],
sellerIds: ["123456"]
},
],
"sellerIds": ["654321"],
"cartId": "7890987"
}