> For the complete documentation index, see [llms.txt](https://docs.hos.accessacloud.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.hos.accessacloud.com/atreemo-api/api-reference/atreemo-api-reference/transaction.md).

# Transaction

Api Methods for Transaction

## GetOrdersByCustomer

> Retrieves a customer's order history by positive ctcID or externalID, with optional source and date filters. Paging starts at pageNumber=1 with pageSize=50; values below 1 fail validation and sizes above 500 are capped. Validation failures use HTTP 400 with CustomerOrdersOutput. A page beyond available results can instead return HTTP 200 with Response=false. Use returned PageSize and TotalOrders rather than assuming the requested size was applied or that every empty Orders list means success.

```json
{"openapi":"3.0.3","info":{"title":"Atreemo API","version":"0.1.0"},"tags":[{"name":"Transaction","description":"Api Methods for Transaction"}],"servers":[{"url":"https://apim-hospitality-dev-uksouth.azure-api.net/atreemo-api","description":"Local DEV APIM import draft only; not a deployed endpoint announcement."}],"security":[{"AtreemoBearer":[]}],"components":{"securitySchemes":{"AtreemoBearer":{"type":"http","scheme":"bearer","description":"Atreemo access token obtained by the caller from the Atreemo instance `POST /token` endpoint (OAuth2 password grant) and sent as `Authorization: Bearer <token>`. See the Authorisation guide."}},"schemas":{"CustomerOrdersOutput":{"type":"object","nullable":true,"properties":{"Response":{"type":"boolean"},"TotalOrders":{"type":"integer","format":"int32"},"PageNumber":{"type":"integer","format":"int32"},"PageSize":{"type":"integer","format":"int32"},"Orders":{"type":"array","items":{"$ref":"#/components/schemas/CustomerOrder"},"nullable":true},"Errors":{"type":"array","items":{"type":"string","nullable":true},"nullable":true}},"description":"Source-backed JSON members, including inheritance and JSON naming/ignore attributes. No property is required solely because its CLR value type is non-nullable. Runtime and deployment alignment are unverified."},"CustomerOrder":{"type":"object","nullable":true,"properties":{"OrderUniqueID":{"type":"integer","format":"int64"},"OrderID":{"type":"string","nullable":true},"CtcID":{"type":"integer","format":"int32"},"ExternalCustomerID":{"type":"string","nullable":true},"ExternalCustomerSource":{"type":"string","nullable":true},"OrderDate":{"type":"string","format":"date-time"},"OrderTypeID":{"type":"integer","format":"int32"},"OrderType":{"type":"string","nullable":true},"OrderStatusID":{"type":"integer","format":"int32"},"OrderStatus":{"type":"string","nullable":true},"LocationID":{"type":"integer","format":"int32"},"LocationName":{"type":"string","nullable":true},"TotalAmount":{"type":"number","format":"double"},"DiscountAmount":{"type":"number","format":"double"},"OrderItems":{"type":"array","items":{"$ref":"#/components/schemas/CustomerOrderItem"},"nullable":true},"PaymentItems":{"type":"array","items":{"$ref":"#/components/schemas/CustomerOrderPayment"},"nullable":true}},"description":"Source-backed JSON members, including inheritance and JSON naming/ignore attributes. No property is required solely because its CLR value type is non-nullable. Runtime and deployment alignment are unverified."},"CustomerOrderItem":{"type":"object","nullable":true,"properties":{"ItemID":{"type":"string","nullable":true},"ItemName":{"type":"string","nullable":true},"ProductCode":{"type":"string","nullable":true},"ItemGroupName":{"type":"string","nullable":true},"ItemSubGroupName":{"type":"string","nullable":true},"Quantity":{"type":"number","format":"double"},"ItemPrice":{"type":"number","format":"double"},"TotalPrice":{"type":"number","format":"double"},"DiscountAmount":{"type":"number","format":"double"}},"description":"Source-backed JSON members, including inheritance and JSON naming/ignore attributes. No property is required solely because its CLR value type is non-nullable. Runtime and deployment alignment are unverified."},"CustomerOrderPayment":{"type":"object","nullable":true,"properties":{"PaymentDate":{"type":"string","format":"date-time","nullable":true},"PaymentMethodID":{"type":"integer","format":"int32"},"PaymentMethod":{"type":"string","nullable":true},"AmountPaid":{"type":"number","format":"double"},"CardNumber":{"type":"string","nullable":true},"PaymentDesc":{"type":"string","nullable":true}},"description":"Source-backed JSON members, including inheritance and JSON naming/ignore attributes. No property is required solely because its CLR value type is non-nullable. Runtime and deployment alignment are unverified."}}},"paths":{"/api/Transaction/GetOrdersByCustomer":{"get":{"operationId":"TransactionGetOrdersByCustomer","summary":"GetOrdersByCustomer","tags":["Transaction"],"description":"Retrieves a customer's order history by positive ctcID or externalID, with optional source and date filters. Paging starts at pageNumber=1 with pageSize=50; values below 1 fail validation and sizes above 500 are capped. Validation failures use HTTP 400 with CustomerOrdersOutput. A page beyond available results can instead return HTTP 200 with Response=false. Use returned PageSize and TotalOrders rather than assuming the requested size was applied or that every empty Orders list means success.","parameters":[{"name":"ctcID","in":"query","schema":{"type":"integer","format":"int32","default":0},"description":"Native query parameter. CLR int ctcID in the pinned controller signature. Omission uses the declared default.","required":false},{"name":"externalID","in":"query","schema":{"type":"string","nullable":true},"description":"Native query parameter. CLR string externalID in the pinned controller signature. Omission uses the declared default.","required":false},{"name":"externalSource","in":"query","schema":{"type":"string","nullable":true},"description":"Native query parameter. CLR string externalSource in the pinned controller signature. Omission uses the declared default.","required":false},{"name":"fromDate","in":"query","schema":{"type":"string","format":"date-time","nullable":true},"description":"Native query parameter. CLR DateTime? fromDate in the pinned controller signature. Omission uses the declared default.","required":false},{"name":"toDate","in":"query","schema":{"type":"string","format":"date-time","nullable":true},"description":"Native query parameter. CLR DateTime? toDate in the pinned controller signature. Omission uses the declared default.","required":false},{"name":"pageNumber","in":"query","schema":{"type":"integer","format":"int32","default":1},"description":"Native query parameter. CLR int pageNumber in the pinned controller signature. Omission uses the declared default.","required":false},{"name":"pageSize","in":"query","schema":{"type":"integer","format":"int32","default":50},"description":"Native query parameter. CLR int pageSize in the pinned controller signature. Omission uses the declared default.","required":false}],"responses":{"200":{"description":"OK (sample status in the public collection).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerOrdersOutput"}}}}}}}}}
```

## PostOrder

> Send transaction details to Atreemo

```json
{"openapi":"3.0.3","info":{"title":"Atreemo API","version":"0.1.0"},"tags":[{"name":"Transaction","description":"Api Methods for Transaction"}],"servers":[{"url":"https://apim-hospitality-dev-uksouth.azure-api.net/atreemo-api","description":"Local DEV APIM import draft only; not a deployed endpoint announcement."}],"security":[{"AtreemoBearer":[]}],"components":{"securitySchemes":{"AtreemoBearer":{"type":"http","scheme":"bearer","description":"Atreemo access token obtained by the caller from the Atreemo instance `POST /token` endpoint (OAuth2 password grant) and sent as `Authorization: Bearer <token>`. See the Authorisation guide."}},"schemas":{"OrderTransaction":{"type":"object","properties":{"ApplyRedeeemVoucher":{"type":"boolean","description":"Flag Apply Redeeem Voucher : true when need to redeem voucher by transaction or by transaction items."},"BookingReference":{"allOf":[{"$ref":"#/components/schemas/BookingReference"}],"description":"Booking Reference : optional"},"ClerkID":{"type":"string","description":"Clerk ID"},"CloseDateTime":{"type":"string","format":"date-time","nullable":true,"description":"Close Date Time"},"CollectionDate":{"type":"string","format":"date-time","nullable":true,"description":"Collection Date"},"Currency":{"type":"string","description":"ISO 3-Letter Currency Code like USD,GBP"},"CustomerCount":{"type":"integer","format":"int32","description":"number of covers in the table"},"CustomField1":{"type":"string","description":"Extra Field 1"},"CustomField2":{"type":"string","description":"Extra Field 2"},"CustomField3":{"type":"string","description":"Extra Field 3"},"CustomField4":{"type":"string","description":"Extra Field 4"},"CustomField5":{"type":"string","description":"Extra Field 5"},"CustomField6":{"type":"string","description":"Extra Field 6"},"CustomField7":{"type":"string","description":"Extra Field 7"},"EarnPoints":{"type":"boolean","description":"Trigger a bespoke loyalty program"},"Location":{"allOf":[{"$ref":"#/components/schemas/ApiLocation"}],"description":"The site visited (Acteol id)"},"OpenDateTime":{"type":"string","format":"date-time","nullable":true,"description":"Open Date Time"},"OrderChannelID":{"description":"Order Channel InStore = 1, OnlineWeb = 5, OnlineApp = 6 (Documented as type `EnumOrderChannels`. The published description lists the values captured in `x-atreemo-documented-values`; their wire representation (number or name) and whether the list is exhaustive are not documented.)","type":"integer","format":"int32"},"OrderDate":{"type":"string","format":"date-time","nullable":true,"description":"Order Date : if null then date time when the Api call is made."},"OrderDelivery":{"allOf":[{"$ref":"#/components/schemas/OrderDelivery"}],"description":"Delivery details : optional"},"OrderID":{"type":"string","description":"Transaction ID"},"OrderStatusID":{"description":"Order Status Paid = 1, Cancelled = 2, Invoiced = 3, Incomplete = 4, Refunded = 5, PartiallyPaid = 6 (Documented as type `EnumOrderStatus`. The published description lists the values captured in `x-atreemo-documented-values`; their wire representation (number or name) and whether the list is exhaustive are not documented.)","type":"integer","format":"int32"},"OrderTypeID":{"description":"Order Type InStore = 1, Collection = 2, Delivery = 3, Shop = 7, PayAtTable = 8, PreOrder = 9, Deposit = 10, Kiosk=11 HotelBooking=12 (Documented as type `EnumOrderTypes`. The published description lists the values captured in `x-atreemo-documented-values`; their wire representation (number or name) and whether the list is exhaustive are not documented.)","type":"integer","format":"int32"},"ReceiptCode":{"type":"string","description":"The code printed in the bill"},"Source":{"type":"string","description":"Source"},"SubTransactions":{"type":"array","items":{"$ref":"#/components/schemas/SubTransaction"},"description":"Order items per customer"},"TableNumber":{"type":"string","description":"Table number"},"Tax":{"type":"number","format":"double","description":"Tax"},"TillID":{"type":"string","description":"Till ID"}},"required":["Location","OrderID","SubTransactions"]},"BookingReference":{"type":"object","properties":{"BookingSector":{"description":"Restaurant=1, Hotel=2, Other=3 (Documented as type `BookingSectorEnum`. The published description lists the values captured in `x-atreemo-documented-values`; their wire representation (number or name) and whether the list is exhaustive are not documented.)","type":"integer","format":"int32"},"ReservationReference":{"type":"string","description":"Reservation Reference"},"SupplierCode":{"type":"integer","format":"int32","nullable":true,"description":"Reservation Supplier Code : Call Api/Reservation/GetSuppliers to get full list Mandatory with ReservationReference field"}}},"ApiLocation":{"type":"object","properties":{"ActeolSiteID":{"type":"integer","format":"int32","description":"the ID of the site visited (Acteol id)"},"ExternalLocationID":{"type":"string","description":"the ID of the site visited (supplier site id if the user in mapped with a supplier) this field will be ignored if ActeolSiteID is populated"}}},"OrderDelivery":{"type":"object","properties":{"CollectionCode":{"type":"string","description":"Collection Code"},"DeliveredTime":{"type":"string","format":"date-time","nullable":true,"description":"Delivered Time"},"DeliveryDueTime":{"type":"string","format":"date-time","nullable":true,"description":"Delivery DueTime"},"DeliveryId":{"type":"string","description":"Delivery Id"},"DeliveryInfo":{"type":"string","description":"Delivery Info"},"DeliveryMode":{"type":"string","description":"Delivery Mode"},"DeliveryOrigin":{"type":"string","description":"Delivery Origin"},"DeliveryState":{"type":"string","description":"Delivery State"},"DeliveryTime":{"type":"string","format":"date-time","nullable":true,"description":"Delivery Time"},"DeviceName":{"type":"string","description":"Device Name"},"Enabled":{"type":"boolean","description":"Enabled"},"Prepaid":{"type":"boolean","description":"Prepaid"},"ProductionDueTime":{"type":"string","format":"date-time","nullable":true,"description":"Production Due Time"},"Shpipping_Address":{"allOf":[{"$ref":"#/components/schemas/OrderShippingAddress"}],"description":"Address Details"}}},"OrderShippingAddress":{"type":"object","properties":{"address1":{"type":"string","description":"Street Address"},"address2":{"type":"string","description":"Building Address"},"city":{"type":"string","description":"City"},"company":{"type":"string","description":"Company"},"country":{"type":"string","description":"Country"},"country_code":{"type":"string","description":"country code"},"first_name":{"type":"string","description":"first name"},"last_name":{"type":"string","description":"Last name"},"latitude":{"type":"number","description":"latitude"},"longitude":{"type":"number","description":"longitude"},"name":{"type":"string","description":"name"},"phone":{"type":"string","description":"phone"},"province":{"type":"string","description":"province"},"province_code":{"type":"string","description":"province code"},"zip":{"type":"string","description":"zip"}}},"SubTransaction":{"type":"object","properties":{"CustomerDetails":{"allOf":[{"$ref":"#/components/schemas/CustomerIDDetails"}],"description":"Ids to find the customer of the transaction."},"OrderItems":{"type":"array","items":{"$ref":"#/components/schemas/OrderItems"},"description":"List of order Items"},"PaidAmount":{"type":"number","format":"double","description":"Paid Amount (after discount)"},"PaymentItems":{"type":"array","items":{"$ref":"#/components/schemas/OrderPaymentItems"},"description":"List of payments"},"ServiceChargeAmount":{"type":"number","format":"double","description":"The amount of service charge"},"TotalAdjustmentAmount":{"type":"number","format":"double","description":"Total Adjustement Amount (External)"},"TotalAmount":{"type":"number","format":"double","description":"Order amount before discount"},"TotalDiscountAmount":{"type":"number","format":"double","description":"Total Discount Amount (Atreemo voucher)"},"VoucherCode":{"type":"string","description":"Order Voucher Code (Atreemo Code)"}},"required":["OrderItems"]},"CustomerIDDetails":{"type":"object","properties":{"CardToken":{"type":"string","description":"The Card token used to identify customers returning with the same token sent to us in xxxxxxxxxxxxxx (Info to find CtcID if it's empty)"},"CtcID":{"type":"integer","format":"int32","description":"Ctcid of the Customer"},"ExternalIdentifier":{"allOf":[{"$ref":"#/components/schemas/CustomerExtenalIdentifier"}],"description":"The combination of the external id and External Source (Info to find CtcID if it's empty)"},"MemberNumber":{"type":"string","description":"the customer member number (Info to find CtcID if it's empty)"}}},"CustomerExtenalIdentifier":{"type":"object","properties":{"ExternalID":{"type":"string","description":"External unique ID"},"ExternalSource":{"type":"string","description":"External Source"}}},"OrderItems":{"type":"object","properties":{"AdjustmentAmount":{"type":"number","format":"double","description":"Adjustement Amount (External)"},"DiscountAmount":{"type":"number","format":"double","description":"Order Item DiscountAmount"},"Gross":{"type":"number","format":"double","description":"Order Item Gross"},"ItemDesc":{"type":"string","description":"Order Item Description (Product)"},"ItemGroupName":{"type":"string","description":"Order Item Product Group Name"},"ItemID":{"type":"string","description":"Order Item ID (unique identifier of the item in the order)"},"ItemName":{"type":"string","description":"Order Item Name (Product)"},"ItemPrice":{"type":"number","format":"double","description":"Order Item Price"},"ItemSubGroupName":{"type":"string","description":"Order Item Product Sub Group Name"},"PriceLevel":{"type":"string","description":"Order Price Level"},"ProductCode":{"type":"string","description":"Order Product Code"},"Quantity":{"type":"number","format":"double","description":"Order Item Quantity"},"SalesGroupID":{"type":"string","description":"Order Sales Group ID"},"SalesGroupName":{"type":"string","description":"Order Sales Group Name"},"Tax":{"type":"number","format":"double","description":"Order Item Tax"},"TotalPrice":{"type":"number","format":"double","description":"Order Item Total Price"},"VoucherCode":{"type":"string","description":"Order Voucher Code : ApplyRedeeemVoucher should be flagged (Atreemo Code)"}}},"OrderPaymentItems":{"type":"object","properties":{"AmountPaid":{"type":"number","format":"double","description":"Amount Paid"},"AuthCode":{"type":"string","description":"Auth code like to credit card used for payment"},"CardNumber":{"type":"string","description":"Card Number"},"PaymentDate":{"type":"string","format":"date-time","nullable":true,"description":"Payment Date"},"PaymentDesc":{"type":"string","description":"Payment Description"},"PaymentMethodID":{"description":"Payment Method Card = 1, Cash = 2, Point = 3, Mobile = 4, PurchaseOrder = 5, Credit = 6, Voucher = 7, Other = 8, Internet = 9 (Documented as type `EnumPaymentMethod`. The published description lists the values captured in `x-atreemo-documented-values`; their wire representation (number or name) and whether the list is exhaustive are not documented.)","type":"integer","format":"int32"},"PointsReservationCode":{"type":"integer","format":"int32","description":"This will be used only if the payment method is point and (PaymentMethodID = 3) an you have already reserved these points at the begining."}}},"ApiCallResponse":{"type":"object","properties":{"Errors":{"type":"array","items":{"$ref":"#/components/schemas/APICallError"},"description":"Collection of errors if exist"},"ResponseStatus":{"type":"boolean","description":"True: if the action was succsessfully treated False: if there is an error"}}},"APICallError":{"type":"object","properties":{"ErrorCode":{"type":"integer","format":"int32","description":"The error code"},"ErrorDescription":{"type":"string","description":"The error description"}}}}},"paths":{"/api/Transaction/PostOrder":{"post":{"operationId":"TransactionPostOrder","summary":"PostOrder","tags":["Transaction"],"description":"Send transaction details to Atreemo","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderTransaction"}}}},"responses":{"200":{"description":"OK (sample status in the public collection).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiCallResponse"}}}}}}}}}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.hos.accessacloud.com/atreemo-api/api-reference/atreemo-api-reference/transaction.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
