# LoyaltyTransactions

## Retrieve a loyalty transaction

> Retrieve detailed information for a specific loyalty transaction.

```json
{"openapi":"3.0.3","info":{"title":"Omnitron API","version":"1.0.0"},"security":[{"Token":[]}],"components":{"securitySchemes":{"Token":{"type":"apiKey","in":"header","name":"Authorization"}},"parameters":{"id_path":{"name":"id","in":"path","description":"Unique identifier of the resource","required":true,"schema":{"type":"integer"}}},"schemas":{"LoyaltyTransaction":{"type":"object","allOf":[{"$ref":"#/components/schemas/StarterModel"}],"required":["uuid","amount","order","user_email","transaction_type","customer_email"],"properties":{"pk":{"type":"integer","description":"Primary key of the loyalty transaction"},"uuid":{"type":"string","format":"uuid","description":"Unique identifier for the loyalty transaction."},"amount":{"type":"number","format":"decimal","description":"Transaction amount."},"order":{"type":"integer","description":"ID of the associated order"},"user_email":{"type":"string","format":"email","description":"Email of the user who performed the transaction."},"transaction_type":{"$ref":"#/components/schemas/LoyaltyTransactionType"},"customer":{"$ref":"#/components/schemas/Customer"},"customer_email":{"type":"string","format":"email","description":"Email of the customer involved in the transaction."},"raw_request":{"type":"string","nullable":true,"description":"Raw request data (optional)."},"raw_response":{"type":"string","nullable":true,"description":"Raw response data (optional)."},"reference":{"type":"string","description":"Reference identifier for the transaction.","nullable":true},"remote_addr":{"type":"string","format":"ipv4","nullable":true,"description":"IP address from where the transaction was initiated."}}},"StarterModel":{"type":"object","properties":{"created_date":{"type":"string","format":"date-time","readOnly":true,"description":"The date and time when the object was created."},"modified_date":{"type":"string","format":"date-time","description":"The date and time when the object was last modified."}}},"LoyaltyTransactionType":{"type":"string","description":"Type of loyalty transaction","enum":["purchase","refund"]},"Customer":{"type":"object","properties":{"pk":{"format":"int64","readOnly":true,"description":"Customer ID"},"email":{"type":"string","format":"email","description":"Email address of the customer"},"first_name":{"type":"string","description":"First name of the customer","maxLength":255},"last_name":{"type":"string","description":"Last name of the customer","maxLength":255},"phone_number":{"type":"string","description":"Phone number of the customer","nullable":true,"maxLength":128},"is_active":{"type":"boolean","description":"Indicates if the customer is active","default":false},"channel_code":{"type":"string","description":"Code representing the channel the customer belongs to","maxLength":64},"erp_code":{"type":"string","description":"Partner customer code (ERP code)","nullable":true,"maxLength":64},"attributes":{"type":"object","description":"Attributes as a JSON object"},"attribute_kwargs":{"type":"object","description":"Attribute kwargs as a JSON object"},"localized_attributes":{"type":"object","description":"Localized attributes as a JSON object"},"localized_attribute_kwargs":{"type":"object","description":"Localized attribute kwargs as a JSON object"},"extra_field":{"type":"object","description":"Additional fields as a JSON object"},"email_allowed":{"type":"boolean","description":"Indicates if the customer allows receiving emails"},"sms_allowed":{"type":"boolean","description":"Indicates if the customer allows receiving SMS"},"call_allowed":{"type":"boolean","description":"Indicates if the customer allows receiving calls"},"date_joined":{"type":"string","format":"date-time","description":"The date when the customer joined","nullable":true},"gender":{"type":"string","description":"Gender of the customer","nullable":true,"enum":["male","female"]},"user_type":{"type":"string","description":"Type of user","nullable":true,"enum":["guest","registered"]},"date_of_birth":{"type":"string","format":"date","description":"Date of birth of the customer","nullable":true},"channel":{"type":"integer","nullable":true,"description":"ID of the channel the customer belongs to"}},"required":["email","channel_code","is_active","email_allowed","sms_allowed","call_allowed"]}},"responses":{"400":{"description":"Required field(s) are missing, data is invalid, or the action is not allowed.","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"field":{"oneOf":[{"type":"array","description":"Indicates that no value was provided for the {field} field in the request.","items":{"type":"string"}},{"type":"array","description":"Indicates usage of a non-existent object for {field} in the request.","items":{"type":"string"}}]},"code":{"type":"string","description":"Represents the server-side error code."}}},{"type":"object","properties":{"non_field_errors":{"description":"Indicates invalid data or action usage in the request.","type":"array","items":{"type":"string"}},"code":{"type":"string","description":"Represents the server-side error code."}}},{"type":"object","properties":{"detail":{"description":"Provides a detailed message for the given error.","type":"string"},"code":{"type":"string","description":"Represents the server-side error code."}}}]}}}},"401":{"description":"Unauthorized Access","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string","description":"Contains a detailed description of the error."},"code":{"type":"string","description":"Represents the server-side error code."}}}}}},"404":{"description":"The given resource or object was not found or does not exist.","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"description":"Contains a detailed description of the error.","type":"string"}}}}}},"500":{"description":"Server Error"}}},"paths":{"/api/v1/loyalty_transactions/{id}/":{"get":{"summary":"Retrieve a loyalty transaction","description":"Retrieve detailed information for a specific loyalty transaction.","tags":["LoyaltyTransactions"],"parameters":[{"$ref":"#/components/parameters/id_path"}],"responses":{"200":{"description":"Detailed information about the loyalty transaction.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LoyaltyTransaction"}}}},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"404":{"$ref":"#/components/responses/404"},"500":{"$ref":"#/components/responses/500"}}}}}}
```

## Retrieve list of loyalty transactions

> Retrieve a paginated list of all loyalty transactions.

```json
{"openapi":"3.0.3","info":{"title":"Omnitron API","version":"1.0.0"},"security":[{"Token":[]}],"components":{"securitySchemes":{"Token":{"type":"apiKey","in":"header","name":"Authorization"}},"parameters":{"page":{"name":"page","in":"query","required":false,"description":"Specifies the page number of the current dataset","schema":{"type":"integer","minimum":1,"default":1}},"limit":{"name":"limit","in":"query","required":false,"description":"Indicates the number of rows on the current page.","schema":{"type":"integer","minimum":1,"default":10}},"uuid":{"name":"uuid","in":"query","description":"Filter by UUID.","required":false,"schema":{"type":"string"}},"transaction_type":{"name":"transaction_type","in":"query","description":"Filter by transaction type.","required":false,"schema":{"type":"string","enum":["purchase","refund"]}},"order":{"name":"order","in":"query","description":"Filter by order ID.","required":false,"schema":{"type":"number"}},"user_email":{"name":"user_email","in":"query","required":false,"schema":{"type":"string","format":"email"},"description":"User's email (case-insensitive)"},"customer_email":{"name":"customer_email","in":"query","required":false,"schema":{"type":"string","format":"email"},"description":"Customer's email (case-insensitive)"},"created_date":{"name":"created_date","in":"query","required":false,"description":"Filter by creation date using supported lookup expressions (e.g., `gt`, `gte`, `lt`, `lte`, `date__gt`, etc.).","schema":{"type":"string","format":"date-time"}},"modified_date":{"name":"modified_date","in":"query","required":false,"description":"Filter by modification date using supported lookup expressions (e.g., `gt`, `gte`, `lt`, `lte`, `date__gt`, etc.).","schema":{"type":"string","format":"date-time"}},"reference":{"name":"reference","in":"query","description":"Filter by reference.","required":false,"schema":{"type":"string"}}},"schemas":{"LoyaltyTransaction":{"type":"object","allOf":[{"$ref":"#/components/schemas/StarterModel"}],"required":["uuid","amount","order","user_email","transaction_type","customer_email"],"properties":{"pk":{"type":"integer","description":"Primary key of the loyalty transaction"},"uuid":{"type":"string","format":"uuid","description":"Unique identifier for the loyalty transaction."},"amount":{"type":"number","format":"decimal","description":"Transaction amount."},"order":{"type":"integer","description":"ID of the associated order"},"user_email":{"type":"string","format":"email","description":"Email of the user who performed the transaction."},"transaction_type":{"$ref":"#/components/schemas/LoyaltyTransactionType"},"customer":{"$ref":"#/components/schemas/Customer"},"customer_email":{"type":"string","format":"email","description":"Email of the customer involved in the transaction."},"raw_request":{"type":"string","nullable":true,"description":"Raw request data (optional)."},"raw_response":{"type":"string","nullable":true,"description":"Raw response data (optional)."},"reference":{"type":"string","description":"Reference identifier for the transaction.","nullable":true},"remote_addr":{"type":"string","format":"ipv4","nullable":true,"description":"IP address from where the transaction was initiated."}}},"StarterModel":{"type":"object","properties":{"created_date":{"type":"string","format":"date-time","readOnly":true,"description":"The date and time when the object was created."},"modified_date":{"type":"string","format":"date-time","description":"The date and time when the object was last modified."}}},"LoyaltyTransactionType":{"type":"string","description":"Type of loyalty transaction","enum":["purchase","refund"]},"Customer":{"type":"object","properties":{"pk":{"format":"int64","readOnly":true,"description":"Customer ID"},"email":{"type":"string","format":"email","description":"Email address of the customer"},"first_name":{"type":"string","description":"First name of the customer","maxLength":255},"last_name":{"type":"string","description":"Last name of the customer","maxLength":255},"phone_number":{"type":"string","description":"Phone number of the customer","nullable":true,"maxLength":128},"is_active":{"type":"boolean","description":"Indicates if the customer is active","default":false},"channel_code":{"type":"string","description":"Code representing the channel the customer belongs to","maxLength":64},"erp_code":{"type":"string","description":"Partner customer code (ERP code)","nullable":true,"maxLength":64},"attributes":{"type":"object","description":"Attributes as a JSON object"},"attribute_kwargs":{"type":"object","description":"Attribute kwargs as a JSON object"},"localized_attributes":{"type":"object","description":"Localized attributes as a JSON object"},"localized_attribute_kwargs":{"type":"object","description":"Localized attribute kwargs as a JSON object"},"extra_field":{"type":"object","description":"Additional fields as a JSON object"},"email_allowed":{"type":"boolean","description":"Indicates if the customer allows receiving emails"},"sms_allowed":{"type":"boolean","description":"Indicates if the customer allows receiving SMS"},"call_allowed":{"type":"boolean","description":"Indicates if the customer allows receiving calls"},"date_joined":{"type":"string","format":"date-time","description":"The date when the customer joined","nullable":true},"gender":{"type":"string","description":"Gender of the customer","nullable":true,"enum":["male","female"]},"user_type":{"type":"string","description":"Type of user","nullable":true,"enum":["guest","registered"]},"date_of_birth":{"type":"string","format":"date","description":"Date of birth of the customer","nullable":true},"channel":{"type":"integer","nullable":true,"description":"ID of the channel the customer belongs to"}},"required":["email","channel_code","is_active","email_allowed","sms_allowed","call_allowed"]}},"responses":{"500":{"description":"Server Error"}}},"paths":{"/api/v1/loyalty_transactions/":{"get":{"summary":"Retrieve list of loyalty transactions","description":"Retrieve a paginated list of all loyalty transactions.","tags":["LoyaltyTransactions"],"parameters":[{"$ref":"#/components/parameters/page"},{"$ref":"#/components/parameters/limit"},{"$ref":"#/components/parameters/uuid"},{"$ref":"#/components/parameters/transaction_type"},{"$ref":"#/components/parameters/order"},{"$ref":"#/components/parameters/user_email"},{"$ref":"#/components/parameters/customer_email"},{"$ref":"#/components/parameters/created_date"},{"$ref":"#/components/parameters/modified_date"},{"$ref":"#/components/parameters/reference"}],"responses":{"200":{"description":"A paginated list of loyalty transactions.","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/LoyaltyTransaction"}}}}},"500":{"$ref":"#/components/responses/500"}}}}}}
```


---

# Agent Instructions: Querying This Documentation

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

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://apidocs.akinon.com/omnitron-openapis/loyaltytransactions.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
