Update


/v2/b2b/orders/update


Body

        An OrderUpdate Input JSON Object

Response

        A Response Order JSON Object



JSON Objects


OrderUpdate Input JSON Object


FieldDescription
orderIdThe unique ID of the order object. Read only.
orderPosTransactionUUIDTransaction ID
accountContactIdContact ID for the account or organization
notes
orderItems
orderItems[x].orderItemId
orderItems[x].eventIdEvent ID of the orderItem
orderItems[x].itemTypeLimit Order Items to those that support the specified item type. Valid item types are:
  • Event
  • Inventory
  • Combo 
  • ComboInventory
  • RebookingFee
  • MembershipPurchase
  • MembershipRenewal
  • MembershipUpgrade
  • MembershipDowngrade
  • MembershipCancel
  • MembershipPostTermRenewal
  • MembershipRejoin
  • MembershipRenewalUpgrade
  • MembershipPostTermRenewalUpgrade
  • MembershipRejoinUpgrade
  • MembershipPostTermRenewalDowngrade
  • MembershipRejoinDowngrade
  • MembershipRenewalDowngrade
  • MembershipPurchaseConversion
  • MembershipReplacement
  • Donation
orderItems[x].itemTypeId
orderItems[x].quantityTotal number of items
noEmailSet to true if you do not want to send the email. Default is to send the email.
sendEmailToAllflag to send email to all
payment
payment.acmeTokenUnique token for the payment from ACME
payment.paymentProcessorTokenToken from the payment processor
payment.paymentProcessorFingerPrint
payment.ccLastFourDigitsLast four digits of credit card used
payment.creditCardBrandCredit card Brand (e.g. Visa, Mastercard, American Express)
payment.externalChargeIdID from the external management like Salesforce
payment.paymentId
payment.manualEntryCardNumber16 digits card number
payment.cvc3 digit security code
payment.encTrack1
payment.encTrack2
payment.encmp
payment.ksn
payment.devSN
payment.mpStatus
payment.magTekCardType
payment.encryptionBlockKey
payment.expDateCredit Card Expiration Date
payment.chargeAmountTotal Amount charged in the card
payment.postTransactionUUIDTransaction ID
payment.terminalIdID of the point of sale terminal associated with the payment
payment.creditCardVerificationData
payment.marketCode
payment.terminalCapabilities
payment.paymentPresentationTypeEnum
payment.firstName
payment.lastName
payment.contactEmail
payment.phoneNumber
payment.address
payment.checkNumber
payment.checkDate
payment.voucherNumber
payment.giftCardNumber
payment.expressTransactionId
payment.debit
payment.paymentType
emailEmail of the order contact
contactFirstNameFirst name of the order contact
contactLastNameLast name of the order contact
zipCodeZip/Post code of the order contact
phoneNumberPhone of the order contact
incidentReasonCode
terminalIdID of the POS sales terminal
billingFirstNameFirst name of the billing contact
billingLastNameLast name of the billing contact
billingEmailEmail address of the billing contact
billingAddress1Address line 1 of the billing contact
billingAddress2Address line 2 of the billing contact 
billingCountryCountry of the billing contact 
billingCityCity of the billing contact 
billingZipCodeZip/Postcode of the billing contact 
billingStateState/Province of the billing contact 
billingPhoneNumberPhone of the billing contact 
accountIdUnique database ID of the organization associated with the order
accountNameOrganization name associated with the order

Order Result JSON Object


FieldDescription
idOrder Id
tenantId
organizationId
organizationName
visitorId
tempVisitorId
email
contactFirstName
contactLastName
address1
address2
country
city
state
zipCode
billingEmail
billingFirstName
billingLastName
billingAddress1
billingAddress2
billingCountry
billingCity
billingZipCode
billingState
billingPhoneNumber
phoneNumber
orderNumber
discountedOriginalTotalAmountOriginal Total Amount after Discount
originalTotalAmountOriginal Total Amount
discountedTotalAmountTotal Amount After Discount
totalAmountTotal Amount
paidAmount
balanceAmountBalance of Total to be paid
refundAmountAmount being refunded
saleChannelLimit events to those that support the specified sale channel. Valid sale channels are:
  • online
  • pointOfSale
  • insideSalesIndividual 
  • customerRep
  • salesForce
checkInStatusLimit check in status to those that support the specified status. Valid check in status  are:
  • NotCheckedIn
  • CheckedIn
  • PartiallyCheckedIn 
orderExceptionCodeIdException Code 
orderExceptionCodeName
notes
postUUID
creationDateOrder Creation Date
orderItems
orderItems[x].orderItemId
orderItems[x].eventIdEvent Id of the orderItem
orderItems[x].itemTypeLimit Order Items to those that support the specified item type. Valid item types are:
  • Event
  • Inventory
  • Combo 
  • ComboInventory
  • RebookingFee
  • MembershipPurchase
  • MembershipRenewal
  • MembershipUpgrade
  • MembershipDowngrade
  • MembershipCancel
  • MembershipPostTermRenewal
  • MembershipRejoin
  • MembershipRenewalUpgrade
  • MembershipPostTermRenewalUpgrade
  • MembershipRejoinUpgrade
  • MembershipPostTermRenewalDowngrade
  • MembershipRejoinDowngrade
  • MembershipRenewalDowngrade
  • MembershipPurchaseConversion
  • MembershipReplacement
  • Donation
orderItems[x].itemTypeId
orderItems[x].quantityNumber of tickets of the orderItem
createdOnOrder Creation Date
createdBy
updatedOn
updatedBy
paymentDueDate
ticketDeliveryLimit Ticket Delivery to those that support the specified ticket delivery. Valid item types are:
  • print
  • willCall
ticketExpiredDaysDays since the ticket expired
legacy
hiddenEventDate
membershipIdMembership Id if the order is a membership purchase
couponIdCoupon applied during the purchase
ccLastFourDigitsLast four digits of the credit card
paymentId
accountContactId
orderRequestId
invoiceAfter
customerId
obfuscated



Refund:

This API can be used to avail refund. 

When we send a request with orderItems[x].quantity less than the actual ordered quantity it will result in a refund.


Cancel:

Similar to the Refund. If the orderItems is voided by setting orderItems[x].quantity as 0, it will result in the order cancellation.

 

Example of Order Update result in Refund and Cancel:


This is an order with Order ID: 26644388 paid an order $400 for 4 tickets costing $100 each


NOTE:  If you cancel the order by updating the order items to have quantity = 0, this will not trigger the refund email.  If you would like to trigger a refund email, please use the Refund API.  The order update will send the Order Confirmation email.



Now when we use the Update API as follows


/v2/b2b/orders/update


Body

{
   "orderId": "26644388",
   "orderItems": [
     {
       "orderItemId": "38042229",
       "quantity": 0
     }
     ]
}

Response

{
    "id": "26644388",
    "tenantId": 107,
    "visitorId": "1076467",
    "email": "michele+bradClarke@acmeticketing.com",
    "billingEmail": "michele+bradClarke@acmeticketing.com",
    "contactFirstName": "Brad",
    "contactLastName": "Clarke",
    "billingFirstName": "Brad",
    "billingLastName": "Clarke",
    "orderNumber": "100130807",
    "discountedTotalAmount": "0.00",
    "totalAmount": "0.00",
    "discountedOriginalTotalAmount": "400.00",
    "originalTotalAmount": "400.00",
    "paidAmount": "400.00",
    "balanceAmount": "0.00",
    "refundAmount": "400.00",
    "saleChannel": "Customer Rep",
    "checkInStatus": "NotCheckedIn",
    "creationDate": "2020-05-29T16:15:15-07:00",
    "paymentDueDate": "2020-05-29T16:15:15-07:00",
    "createdOn": "2020-05-29T16:15:15-07:00",
    "createdBy": "2258",
    "updatedOn": "2020-06-01T19:19:09-07:00",
    "updatedBy": "340",
    "ticketDelivery": "willCall",
    "legacy": false,
    "hideEventDate": false,
    "invoiceAfter": false,
    "customerId": 4762835,
    "obfuscated": false
}

The above response shows that the amount $400 has been refunded and so the order is cancelled.