# Get Order Details Endpoint to consult the details of an order. HOST: DIRECTION: Endpoint: GET /v1/orders/{orderId} Version: v.1.0.6 Security: OAuth2, Sig ## Path parameters: - `orderId` (string, required) The unique identifier of the order. The order ID is generated by Keeta. ## Response 200 fields (application/json): - `id` (string, required) The unique identifier of the order. The order ID is generated by Keeta. - `type` (string, required) - for orders that will be delivered to the customer's address. - orders that will be picked up at the establishment by the customer - orders that will be consumed inside the establishment. Enum: "DELIVERY", "TAKEOUT", "INDOOR" - `displayId` (string, required) Order Id shown in Keeta interface for the customer. - `sourceAppId` (string) This field must be filled in with the AppId of Keeta that originated the order. This field is to help the applications that will work as a Hub, intermediating the requests from Keeta with the Software Service. - `salesChannel` (string) You can indicate through which sales channel this order originated. - `virtualBrand` (string) This field can be used as an alternative id for the merchant, in cases where the same merchant has different identifications or brands (such as dark kitchens). It is important to note that Keeta or Software Hub must know this Id beforehand. - `category` (string) Indicates the order category. > If you find that your order category does not fit any of the listed categories, please open an issue so it can be added. Enum: "FOOD", "GROCERY", "DRUGSTORE", "PETSTORE" - `createdAt` (string, required) Order creation date and time. (UTC date-time in ISO timestamp format. See [Guidelines](#section/General-Guidelines) for more info.). - `lastEvent` (string) The last valid event polled (whether acknowledged or not) or sent via webhook. for definitions of each type. Enum: "CREATED", "CONFIRMED", "DISPATCHED", "READY_FOR_PICKUP", "PICKED_UP", "DELIVERED", "CONCLUDED", "CANCELLATION_REQUESTED", "CANCELLED", "USER_REFUND_REQUEST", "REFUNDED", "REFUND_FAILED" - `orderTiming` (string, required) Indicates the timing for initiating the order: : for orders that must be prepared immediately. : for orders scheduled for a specific date and time. It will always be accompanied by the object. : for orders that will only be delivered when the consumer indicates that they are going to pick it up. In this case, the Software Service will receive a event indicating that the order should be started. Enum: "INSTANT", "SCHEDULED", "ONDEMAND" - `preparationStartDateTime` (string, required) Suggestion for the preparation start time after Order creation. This can be used by Keeta to inform the merchant to delay the start of the preparation for any reason. Default is the same time as the order creation time. (UTC date-time in ISO timestamp format. See [Guidelines](#section/General-Guidelines) for more info). - `merchant` (object, required) Merchant information. - `merchant.id` (string, required) Unique Identifier. Identifies the merchant in the different systems that the merchant will communicate. This id must be generated by the merchant's . > The software service should ensure that merchantId is unique. > If this is not possible, it is recommended to at least use a UUID. Example: "22815773000169-dbc7e35a-c936-4665-9e13-eb55eb8b6824" - `merchant.name` (string, required) Merchant Public Name Example: "Pizza Plaza" - `items` (array, required) Order items. - `items.id` (string, required) A unique identifier of the item. - `items.index` (integer) Item's position. - `items.name` (string, required) Product name - `items.externalCode` (string, required) External product code. - `items.unit` (string, required) Item's Unit of Measurement. Possible values: - - Unit - - Kilogram - - Liter - - Ounce - - Pound - - Gallon > Use fractional values for quantities smaller than the unit of measure: > Example: 500 grams = 0.5 KG Enum: "UN", "KG", "L", "OZ", "LB", "GAL" - `items.ean` (string) EAN is the barcode standard used on items. - `items.quantity` (number, required) Amount of items. > Use fractional values for quantities smaller than the unit of measure: > Example: 500 grams = 0.5 KG - `items.specialInstructions` (string) Special instructions about the items. - `items.unitPrice` (object, required) Price per unit. This is the price the customer is paying and will be considered for order totals calculations. - `items.unitPrice.value` (number, required) Price value. 4 decimals places are accepted Example: 40 - `items.unitPrice.currency` (string, required) The 3-letter ISO 4217 currency code. Example: "BRL" - `items.originalPrice` (object) Original price of the product. This price and should be used to inform the price of an item before applying markdowns on the list price. Discounts applied during the order such as coupons and vouchers should not be considered here. These must be reported in the object. - `items.scalePriceApplied` (boolean) Indicates whether or not the unit price of the item has changed due to a scaled purchase (where the quantity of items purchased changes the value of the item). Default is - `items.optionsPrice` (object) The sum of the total prices of all options of the item. - `items.subtotalPrice` (object) This price and should be used to inform the total price for the quantity of items ordered, excluding additional options. - `items.totalPrice` (object, required) Total Price of the item. - `items.indoor` (object) Item-related properties for when the order is of type - `items.indoor.productionPoint` (string) Production point for this specific item. It should be used when the merchant has more than one production point and it is necessary to carry out production at a specific location. Note: The locations must be previously registered in both and the . - `items.options` (array) The optional extras chosen by the consumer, related to this item. - `items.options.index` (integer) Option's position. - `items.options.name` (string, required) Options name - `items.options.quantity` (number, required) - `items.options.originalPrice` (object) Original price of the option. This price and should be used to inform the price of an option before applying markdowns on the list price. Discounts applied during the order such as coupons and vouchers should not be considered here. These must be reported in the object. - `items.options.totalPrice` (object, required) Total Price of the option. - `items.options.specialInstructions` (string) More instructions, if needed. - `otherFees` (array) Other fees that may apply. - `otherFees.name` (string, required) Name related to the other fees. - `otherFees.type` (string, required) Enum: "DELIVERY_FEE", "SERVICE_FEE", "TIP" - `otherFees.receivedBy` (string, required) Enum: "MARKETPLACE", "MERCHANT", "LOGISTIC_SERVICES" - `otherFees.receiverDocument` (string) Mandatory for marketplace. - `otherFees.price` (object, required) The fee price - `otherFees.observation` (string) Any extra comments. - `discounts` (array) Any discounts that may apply. - `discounts.amount` (object, required) Amount value of the discount. - `discounts.target` (string, required) Enum: "CART", "DELIVERY_FEE", "ITEM" - `discounts.targetId` (string) Only mandatory for = . - `discounts.sponsorshipValues` (array, required) Values sponsored by either party. The sum of the amounts listed in this atribute must match the value informed in the atribute above. - `discounts.sponsorshipValues.name` (string, required) Enum: "MARKETPLACE", "MERCHANT", "CHAIN" - `discounts.sponsorshipValues.amount` (object, required) Discount amount given by the sponsor. - `discounts.sponsorshipValues.discountCode` (string) Code related to the discount applied. Here you can enter a coupon used by the user, or an identification code from a marketing campaign, for example. - `total` (object, required) Set of fields with the sum of the values previously described in the order. - `total.itemsPrice` (object, required) Sum of the total price of the items listed in the attribute. - `total.otherFees` (object, required) Sum of the total value of other fees listed in the attribute. If there isn't one, use 0. - `total.discount` (object, required) Sum of any discounts that may be listed in the attribute. If there isn't one, use 0. - `total.orderAmount` (object, required) The final value of the order (itemsPrice + otherFees - discounts). - `payments` (object, required) All the description of the payment, such as methods, pre-payments, change, etc. - `payments.prepaid` (number, required) Amount paid in advance. - `payments.pending` (number, required) Amount that is still to be paid. - `payments.methods` (array, required) The payment method used. Whether it was online, on delivery, credit card, voucher, cash, etc. - `payments.methods.type` (string, required) if the payment was made through some platform, or if it going to be paid on delivery or in cash, for example. Enum: "PREPAID", "PENDING" - `payments.methods.method` (string, required) Enum: "CREDIT", "DEBIT", "MEAL_VOUCHER", "FOOD_VOUCHER", "DIGITAL_WALLET", "PIX", "CASH", "CREDIT_DEBIT", "COUPON", "REDEEM", "PREPAID_REDEEM", "OTHER" - `payments.methods.brand` (string) Indicates the brand of the card selected in the field. This field must only be filled in if is , , , or . If is chosen, it is recommended that you describe the brand name in the field. Enum: "VISA", "MASTERCARD", "DINERS", "AMEX", "HIPERCARD", "ELO", "AURA", "DISCOVER", "VR_BENEFICIOS", "SODEXO", "TICKET", "GOOD_CARD", "BANESCARD", "SOROCARD", "POLICARD", "VALECARD", "AGICARD", "JCB", "CREDSYSTEM", "CABAL", "GREEN_CARD", "VEROCHEQUE", "AVISTA", "OTHER" - `payments.methods.methodInfo` (string) Additional information regarding the payment method. It can be used to indicate some useful information of the chosen payment method, such as the name of the wallet, or an authorization number. This field can be used for any entered, but it is highly recommended to fill it in when the chosen is . - `payments.methods.transaction` (object) Authorization details and intermediary identification for credit card and/or subsidy transactions - `payments.methods.transaction.authorizationCode` (string) Credit card and/or subsidy transaction authorization number. - `payments.methods.transaction.acquirerDocument` (string) Document of the Transaction Intermediary (agency, delivery platform, marketplace, and similar) of services and businesses. - `payments.methods.changeFor` (number) Indicates the total that will be paid in cash by the customer and that should be considered for the calculation of the change (ex. customer will pay a $43 order with a $50 bill. Then 50.00 must be entered.). Only mandatory when is . - `taxInvoice` (object) Tax Invoice information. - `taxInvoice.issued` (boolean) Inform if a tax invoice has already been issued for this order. - `taxInvoice.taxInvoiceURL` (string) The address to download the tax invoice issued. - `customer` (object) Customer related information. if the chosen is - `customer.id` (string, required) A unique identifier related to the consumer. If Keeta does not have an Id for the customer, this Id can be generated when creating the order. - `customer.name` (string, required) Customer's name. - `customer.documentNumber` (string) Customer document. This document may be sent for dealing with tax issues. - `customer.phone` (object, required) Customer's phone. Here you can enter the customer's phone number directly (provided that the customer has given permission for this data to be shared, according to local policies) or another phone number (such as the Keeta's call center phone number) where the merchant can communicate about order issues that affect the customer (such as health issues). : The telephone number is considered an identification field and therefore the customer's advance consent is required. - `customer.phone.number` (string, required) - `customer.phone.extension` (string) - `customer.email` (string) Customer email. This document may be sent for dealing with tax issues. - `customer.ordersCountOnMerchant` (number, required) Total number of orders that the customer already placed within the merchant. - `schedule` (object) Information for scheduled orders. if is . - `schedule.scheduledDateTimeStart` (string, required) Date and time for when the order is ready. It can be calculated by using the average preparation time of the dishes. Default is the same time as order creation time. (UTC date-time in ISO timestamp format. See [Guidelines](#section/General-Guidelines) for more info). - `schedule.scheduledDateTimeEnd` (string, required) Date and time for when the order is ready. It can be calculated by using the average preparation time of the dishes. Default is the same time as order creation time. (UTC date-time in ISO timestamp format. See [Guidelines](#section/General-Guidelines) for more info). - `orderPriority` (string) Defines the priority of preparation and delivery of this order in relation to other orders from the same . The lower the priority, the faster this order should be fulfilled. This field depends on both Keeta and the Merchant being able to support this functionality. Enum: "PRIORITY1", "PRIORITY2", "PRIORITY3", "PRIORITY4", "PRIORITY5" - `delivery` (object) Information for DELIVERY orders. if the chosen is - `delivery.deliveredBy` (string, required) Enum: "MERCHANT", "MARKETPLACE" - `delivery.deliveryAddress` (object, required) The address to which the order will be delivered. - `delivery.deliveryAddress.country` (string, required) Two-letter [ISO 3166-1 alpha-2](https://www.iso.org/standard/72482.html) country code. Example: "BR" - `delivery.deliveryAddress.state` (string, required) State or country subdivision. It is recommended (but not required) that you use the [ISO 3166-2](https://www.iso.org/standard/72483.html) representation. Example: "BR-SP" - `delivery.deliveryAddress.city` (string, required) City name. Example: "São Paulo" - `delivery.deliveryAddress.district` (string, required) Neighborhood or District. Example: "Moema" - `delivery.deliveryAddress.street` (string, required) Street name. Example: "Plaza Avenue" - `delivery.deliveryAddress.number` (string, required) Street number. Example: "100" - `delivery.deliveryAddress.complement` (string) Address complement. Example: "BL 02 AP 31" - `delivery.deliveryAddress.reference` (string) Address reference. Example: "Yellow House" - `delivery.deliveryAddress.formattedAddress` (string, required) Full Formated Address Text Example: "Plaza Avenue, 100, BL 02 AP 31, Moema - São Paulo, SP - Brazil" - `delivery.deliveryAddress.postalCode` (string, required) Postal Code Example: "20111-000" - `delivery.deliveryAddress.coordinates` (object, required) - `delivery.deliveryAddress.coordinates.latitude` (number, required) Latitude in degrees. Values are restricted to the range [[-90, 90]]. Example: -23.54823 - `delivery.deliveryAddress.coordinates.longitude` (number, required) Longitude in degrees. Values are restricted to the range [[-180, 180]]. Example: -46.63632 - `delivery.estimatedDeliveryDateTime` (string, required) Estimated delivery date and time. The same date showed to the customer, in interface. (UTC date-time in ISO timestamp format. See [Guidelines](#section/General-Guidelines) for more info). - `delivery.deliveryDateTime` (string) Delivery date. The date time that the delivery actually took place. (UTC date-time in ISO timestamp format. See [Guidelines](#section/General-Guidelines) for more info). - `delivery.pickupCode` (string) It gives the Merchant a code so that the can collect the order. Note: Not to be confused with the customer's delivery code. - `takeout` (object) Information for TAKEOUT orders. if the chosen is - `takeout.mode` (string, required) Enum: "DEFAULT", "PICKUP_AREA" - `takeout.takeoutDateTime` (string, required) Takeout date and time. It can be calculated by using the average preparation time of the dishes. Default is the same time as order creation time. (UTC date-time in ISO timestamp format. See [Guidelines](#section/General-Guidelines) for more info). - `indoor` (object) Information for INDOOR orders. if the chosen is - `indoor.mode` (string, required) Indoor mode identifier: - : Used for orders placed in to be consumed inside the merchant without a specific location. - : Used for orders placed in to be consumed inside the merchant at a specific location already specified, such as a or a . - : Used for establishments that control orders via or (can be used in conjunction with the place field). - : Used for orders placed through self-services, such as kiosks, totems or tablets. Enum: "DEFAULT", "PLACE", "TAB", "TERMINAL" - `indoor.indoorDateTime` (string, required) Date and time for when the order is ready. It can be calculated by using the average preparation time of the dishes. Default is the same time as order creation time. (UTC date-time in ISO timestamp format. See [Guidelines](#section/General-Guidelines) for more info). - `indoor.place` (string) The place identifier (Required if mode is ) - `indoor.tab` (string) The tab or control card identifier (Required if mode is ) - `indoor.seat` (string) Optional Identifier of the seat where the customer is located. - `indoor.waiterCode` (string) Optional code to identify the waiter responsible for the order. - `sendPreparing` (boolean) This field indicates whether it is necessary for the to make a request to the [POST /v1/orders/{orderId}/preparing](#operation/orderPreparing) endpoint to indicate to the that the order is in production. : Indicates that the is waiting for a request. or : It is not required to make a request. - `sendDelivered` (boolean) This field indicates whether it is necessary for the to make a request to the [POST /v1/orders/{orderId}/delivered](#operation/orderDelivered) endpoint to indicate to the that the order has been delivered to the client. : Indicates that the is waiting for a request. or : It is not required to make a request. - `sendPickedUp` (boolean) This field indicates whether it is necessary for the to make a request to the [POST /v1/orders/{orderId}/pickedUp](#operation/orderPickedUp) endpoint to indicate to the that the order has been picked up by the client. : Indicates that the is waiting for a request. or : It is not required to make a request. - `sendTracking` (boolean) This field indicates whether it is necessary for the to make a request to the [POST /v1/orders/{orderId}/tracking](#operation/orderTracking) endpoint to inform the about delivery updates. : Indicates that the is waiting for a request. or : It is not required to make a request. - `extraInfo` (string) Extra information, if necessary. ## Response 400 fields (application/problem+json): - `title` (string, required) Short description of the problem. Example: "Unexpected error" - `status` (integer, required) HTTP code of the returned status. Example: 500 ## Response 401 fields (application/problem+json): - `title` (string, required) Short description of the problem. Example: "Unexpected error" - `status` (integer, required) HTTP code of the returned status. Example: 500 ## Response 403 fields (application/problem+json): - `title` (string, required) Short description of the problem. Example: "Unexpected error" - `status` (integer, required) HTTP code of the returned status. Example: 500 ## Response 404 fields (application/problem+json): - `title` (string, required) Short description of the problem. Example: "Unexpected error" - `status` (integer, required) HTTP code of the returned status. Example: 500 ## Response 503 fields (application/problem+json): - `title` (string, required) Short description of the problem. Example: "Unexpected error" - `status` (integer, required) HTTP code of the returned status. Example: 500