Skip to main content

/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

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

RCOMultitudePropertyTypeDescription
R1listingObjectListing Info
R1 externalListingIdStringExternal Listing ID
R1 externalOrderIdStringExternal Order ID
O1 totalPriceNumberTotal listing price (exclude fees)
O1 totalFeesNumberTotal fees
R1-N tokensArray of ObjectsRepresents individual tickets with a token and price.
R1 tokenStringTicket token ID
O1 individualPriceNumberIndividual ticket price
O1 individualFeesNumberIndividual ticket fees
R1buyerObjectBuyer Information
R1 buyer.firstNameStringBuyer's first name.
O0-1 buyer.middleInitialStringBuyer's middle initial.
R1 buyer.lastNameStringBuyer's last name.
R1 buyer.phoneNumberObjectBuyer's phone number.
R1 buyer.phoneNumber.numberStringBuyer's phone number, unformatted, with all non-numeric characters removed.
O0-1 buyer.phoneNumber.formattedNumberStringBuyer's phone number, formatted.
O0-1 buyer.phoneNumber.extensionStringBuyer's phone number extension.
R1 buyer.phoneNumber.countryCodeStringBuyer's phone number country code.
O0-1 buyer.addressObjectBuyer's address
R1 buyer.address.address1StringBuyer's address 1
O0-1 buyer.address.address2StringBuyer's address 2
O0-1 buyer.address.address3StringBuyer's address 3 (mapped to in care of in the back office)
O0-1 buyer.address.address4StringBuyer's address 4 (mapped to international address line in the back office)
R1 buyer.address.localityStringBuyer's address locality (city for most locales)
R1 buyer.address.regionStringBuyer's address region (state/province for most locales)
R1 buyer.address.postalCodeStringBuyer's postal code.
R1 buyer.address.countryCodeStringBuyer's address country code
R1 buyer.emailAddressObjectBuyer email address details.
R1 buyer.emailAddress.emailStringBuyer email.
OO-1 buyer.emailAddress.optInBooleanBuyer 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.
R1settlementObjectRequired for resale.
R1 totalAmountPaidNumberTotal amount paid by the buyer(includes fees).
R1 amountToSellerNumberAmount paid to the seller.
O0-1asyncCallbackUrlStringIf 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

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

Response Object

PropertyTypeDescription
processIdStringA unique ID for the request that is/has executed.
statusEnum ["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.
paidDouble (JSON Number)Total amount of any payments applied
offersArray of ObjectsCollection of offers. Each offer represents one ticket.
quantityInteger (JSON Number)Offer quantity
seasonCodeStringSeason code
itemCodeStringItem code
basisStringItem basis
eventObjectEvent object (single items only)
event.nameStringEvent (item) name
priceLevelInteger (JSON Number)Price level
seatsArray of ObjectsCollection of seats
sectionStringSection (level:section)
rowStringRow
seatStringSeat
sequenceInteger (JSON Number)Seat sequence
accessIdStringAccessId for the new token.
tokenStringNew token ID. This can be used implicitly as the offer's ID.
mobileUrlStringMobile Ticket PDF
applePassUrlStringApple Pass
googlePassUrlStringText file containing the JWT needed to append to https://pay.google.com/gp/v/save/{JWT} to receive the pass for Google Wallet.
priceTypeObjectPrice type
priceType.nameStringPrice type name
transactionsArray of ObjectsTransaction records from Paciolan system.
seasonStringTransaction season
transactionStringTransaction id

Error Response Object

Non-200 Errors

PropertyTypeDescription
processIdStringA unique ID for the request that has executed.
statusEnum ["ERROR"]The status of the order, in this case, "ERROR"
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

207 Error

PropertyTypeDescription
processIdStringA unique ID for the request that has executed.
statusEnum ["ERROR"]The status of the order, in this case, "ERROR"
errorsArray of ObjectsCollection of errors
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
tokensArray of StringsTokens that are part of this error group

Error Types

Error TypeError DescApp Error CodeHTTP Status CodeHTTP Status DescRetry PossibleRetry CountUltimate actionMS Error Level
AUTHORIZATION_FAILUREMissing required headers (PAC-Channel-Code, PAC-Application-ID, or PAC-Organization-ID)MS-401401UnauthorizedNo0Caller to analyzeERROR
INVALID_CHANNEL_CONFIG
INVALID_PARAMETER_VALUE
JSON_PARSE_ERROR
UNAUTHORIZED_REQUESTA PAC-Organization-ID provided that does not have the correct access controls set upMS-403403ForbiddenNo0Caller to analyzeERROR
UNHANDLED_EXCEPTIONA call made where the API can't properly connect/read the internal channel configurationMS-500500Internal Server ErrorYes3Caller to inform ProviderFATAL
ORDER_INCOMPLETESome of the items in the order were not processed correctly. Escalation required.*207Multi-StatusNo0Caller to inform ProviderFATAL

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