# Get order details This API is used to retrieve all of the details of an order based on either the user ID parameter, the order ID parameter, or both. Please note that if only the userId is entered, all orders placed by that member are returned. Endpoint: POST /orderdetails Version: 3.0.0 Security: ## Request fields (application/json): - `userId` (string, required) Enter the unique ID of the loyalty member. Example: "j86.sa@gmail.com" - `orderId` (string, required) Enter the unique ID of the loyalty member. Example: "p1" ## Response 200 fields (application/json): - `siteId` (string) Displays the Annex Cloud site ID for the loyalty program. Example: 9991331 - `id` (string) Displays the unique ID of the order. Example: "abc234" - `userId` (string) Displays the unique ID of the loyalty member. Example: "user@domain.com" - `email` (string) Displays the email address of the member. Example: "user@domain.com" - `orderDate` (string) Displays the order date in yyyy-MM-dd'T'HH:mm:ssZ format. Example: "2018-04-01T00:00:00-0700" - `firstName` (string) Displays the first name of the member. Example: "John" - `lastName` (string) Displays the last name of the member. Example: "Smith" - `orderTotal` (integer) Displays the total amount of an order placed by a loyalty member. Example: 200 - `purchasePointType` (string) Displays the purchase point type. Example: "Both" - `storeId` (string) Displays the unique ID of the store where the order was placed. Example: "IN12369" - `source` (string) Displays the source, meaning where the order was placed by the loyalty member, such as web or store. Example: "web" - `discountAmounts` (integer) Displays the total discount amount on a placed order. Example: 23 - `discountRefundData` (string) Displays the total refund amount for order. Example: 23 - `coupon` (string) Displays the coupon code, if a code was applied on the order. Example: "$20_OFF" - `pointsAwarded` (integer) Displays the number of points awarded against the order Example: 100 - `pointsOnHold` (integer) Displays the number of points on hold against the order. Points may be put on hold to account for possible returns made by the member. Example: 20 - `pointsExpirationDate` (string) Displays the points expiration date in yyyy-MM-dd'T'HH:mm:ssZ format. Example: "2020-04-01T00:00:00-0700" - `updatedAvailablePoints` (integer) Displays the updated total number of available points for the member. Example: 1234 - `updatedLifetimePoints` (integer) Displays the updated number of points the member has accumulated in their lifetime with the loyalty program. Example: 2000 - `discountAmount` (integer) Displays the total discount amount applied to the order placed. Example: 25 - `shippingAmount` (integer) Displays the cost of shipping for the order. Example: 15 - `orderDetail` (object) Displays the product details for the order as shown below. - `orderDetail.id` (string) Displays the unique product ID. Example: "p1" - `orderDetail.productName` (string) Displays the name of the product. Example: "shoes" - `orderDetail.quantity` (integer) Displays the quantity of the product purchased in the order. Example: 2 - `orderDetail.unitPrice` (integer) Displays the unit price of the product. Example: 75 - `orderDetail.productDiscount` (integer) Displays the total total discounted amount on the product. Example: 30 - `orderDetail.netPrice` (integer) Displays the net price of the product. Example: 150 - `orderDetail.estimatedShipDate` (string) Displays the estimated date the product will be shipped in yyyy-MM-dd'T'HH:mm:ssZ format. Example: "2018-04-01T00:00:00-0700" - `orderDetail.categoryId` (integer) Displays the category ID for the product. Example: 23 - `orderDetail.categoryName` (string) Displays the category name for the product. Example: "running shoes" - `orderDetail.url` (string) Displays the product URL. Example: "http://domain.com/image.gif" - `orderDetail.imageUrl` (string) Displays the product image URL. Example: "http://domain.com/image.gif" - `orderDetail.description` (string) Displays the description of the product. Example: "XYZ Flowers" - `orderDetail.lastUpdatedDate` (string) Displays the last updated date of the order in yyyy-MM-dd'T'HH:mm:ssZ format. Example: "2018-04-01T00:00:00-0700" - `orderDetail.points` (integer) Displays the number of points the member earned for purchasing the product. Example: 210 - `orderDetail.rewardId` (integer) Displays the specific reward ID for the reward applied to the order. Example: 123 - `orderDetail.rewardName` (string) Displays the name of the reward. Example: "Reward 123" - `orderDetail.campaignId` (integer) Displays the campaign ID, if a campaign was applied on the order. Example: 123 - `orderDetail.campaignName` (string) Displays the name of the ccampaign, if a campaign was applied on the order. Example: "summersale" - `orderDetail.campaignPoints` (integer) Displays the total number of campaign points earned, if a campaign was applied on the order. Example: 123 - `orderDetail.campaignHoldPoints` (integer) Displays the number of campaign points on hold. Example: 150 - `orderDetail.secondarykey` (string) Displays the unique secondary key. The secondary key is an essential element in handling orders that contain multiple products with the same product ID. If a member wants to return a product after the order is shipped, the system may encounter issues due to the identical product IDs. However, the secondary key comes in handy to differentiate between the products, enabling the system to identify each product accurately and process partial returns or cancellations of the order successfully. Example: "p101" - `ratio` (object) Displays the product purchase ratio details. - `ratio.purchaseRatio` (integer) Purchase action ratio (Action ID 109). Example: 1 - `ratio.eiRatio` (integer) Example: 1 - `ratio.tierRatio` (integer) Displays the tier ratio. Example: 1 - `ratio.campaignRatioApplied` (string) Displays whether the campaign ratio is applied or not to the product. Example: true - `ratio.campaignRatio` (integer) Displays the campaign ratio, if a campaign was applied on the order. Example: 1 - `ratio.pointsRatio` (integer) Total points ratio (purchaseRatio/campaignRatio whichever is higher X eiRatio X tierRatio). Example: 1 - `ratio.flatBonusPoints` (integer) Bonus points applied for this product (if not zero, then it is displayed). Example: 10 - `productStatus` (object) Displays the following details. - `productStatus.ship` (integer) Displays the number of products that have been shipped. Example: 1 - `productStatus.return` (integer) Displays the number of products that have been returned. - `productStatus.cancel` (integer) Displays the number of products that have been cancelled. - `productStatus.hold` (integer) Displays the number of products that are on hold. Example: 1 - `orderAttribute` (object) Displays the order attribute which passes values while creating the order (if order attributes have been configured). - `orderAttribute.MPC` (string) Displays the MPC value. Example: "ABC12345" - `orderAttribute.MSTN` (string) Displays the MSTN value. Example: "ABC67890" - `multiBucketsData` (object) Displays an array of all multi-bucket details with the following fields. Only displays if the multi-bucket flag is enabled. - `multiBucketsData.bucketName` (object) Displays the name of the specific bucket. - `multiBucketsData.bucketName.credit` (integer) Displays the points credited to the bucket for the order Example: 100 - `multiBucketsData.tier[bucketName]` (object) Displays the name of the specific bucket.