Send transactional events from your Odoo instance.
POST /v1/odoo/events
Odoo source variant — identical to /v1/events but auto-tags every event with source: "odoo".
POST
https://api.nonito.xyz/v1/odoo/eventsIdentical to /v1/events, but automatically injects "source": "odoo" into each event's properties. Use this endpoint when sending events from your Odoo integration.
Request Body
Same format as /v1/events:
json
{
"batch": [
{
"event_id": "string (required)",
"user_id": "string (required — E.164 phone)",
"event_name": "string (required — allowed event type)",
"timestamp": "string (optional — ISO 8601)",
"properties": { /* validated against schema */ }
}
]
}Response (202 Accepted)
json
{
"status": "queued",
"request_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"message": "Successfully queued 1 events."
}Error Responses
202Accepted — Batch validated and queued for ingestion
400Bad Request — Invalid Content-Type, Invalid Payload, or Validation Failed
401Unauthorized — Missing or invalid API key
500Internal Error — Database connection or ingestion failure
Allowed Event Types
Each event type maps to a specific Pydantic validation schema for the properties object.
| Event Name | Description |
|---|---|
order_created | A new order was placed |
order_updated | An existing order was modified |
order_cancelled | An order was cancelled |
order_packed | An order was packed for shipping |
order_dispatched | An order was dispatched |
order_delivered | An order was delivered |
customer_created | A new customer was registered |
customer_updated | Customer info was updated |
Validation Schemas
Each event type's properties object is validated against these Pydantic models. Invalid properties return a 400 with detailed per-field errors.
order_created
| Field | Type | Description |
|---|---|---|
order_id Required | string | Unique order identifier |
channel Required | string | "online" or "store" |
financials Required | Financials | Payment and pricing details |
branch Conditional | BranchInfo | Required when channel is "store" |
customer Required | CustomerInfo | Customer details |
items Required | OrderItem[] | List of line items |
note Optional | string | Order note |
order_updated
| Field | Type | Description |
|---|---|---|
order_id Required | string | Order identifier |
status Required | string | New order status |
updated_at Optional | string | ISO 8601 timestamp |
note Optional | string | Update note |
financials Optional | Financials | Updated financials |
items Optional | OrderItem[] | Updated line items |
customer Optional | CustomerInfo | Updated customer info |
branch Optional | BranchInfo | Updated branch info |
order_cancelled
| Field | Type | Description |
|---|---|---|
order_id Required | string | Order identifier |
reason Required | string | Cancellation reason |
refunded_amount Optional | float | Amount refunded (default 0.0) |
reference_number Optional | string | Refund transaction ID |
order_packed / order_dispatched
| Field | Type | Description |
|---|---|---|
order_id Required | string | Order identifier |
delivery_company Required | string | Shipping carrier |
tracking_number Required | string | Tracking number |
tracking_link Optional | string | Tracking URL |
note Optional | string | Packing/dispatch note |
order_delivered
| Field | Type | Description |
|---|---|---|
order_id Required | string | Order identifier |
delivery_company Required | string | Shipping carrier (e.g., Bosta, Aramex) |
tracking_number Required | string | Tracking number |
tracking_link Optional | string | Tracking URL |
delivery_agent Optional | string | Delivery agent name |
received_by Optional | string | Person who received the order |
customer_created / customer_updated
| Field | Type | Description |
|---|---|---|
first_name Required | string | Customer first name |
last_name Required | string | Customer last name |
email Optional | string | Customer email |
phone Required | string | Customer phone (E.164) |
marketing_consent Optional | boolean | Marketing opt-in (default false) |
Validation Error Format
json
{
"error": "Validation Failed",
"message": "One or more events in the batch are invalid.",
"details": [
{
"index": 0,
"errors": [
"Missing required field: 'order_id'",
"financials.total_price: field required"
]
}
]
}Nested Models
Shared data models referenced by the validation schemas above.
Financials
| Field | Type | Default | Description |
|---|---|---|---|
subtotal Required | float | — | Pre-discount subtotal |
total_discounts Optional | float | 0.0 | Total discounts applied |
total_tax Optional | float | 0.0 | Total tax |
total_price Required | float | — | Final price |
currency Optional | string | "EGP" | Currency code |
payment_method Required | string | — | e.g., cash, visa, wallet |
promo_codes Optional | string[] | — | Coupons applied |
BranchInfo
| Field | Type | Description |
|---|---|---|
branch_id Required | string | Branch identifier |
name Required | string | Branch name |
location Optional | string | Physical address or coordinates |
city Optional | string | City / Governorate |
phone Optional | string | Branch contact number |
CustomerInfo
| Field | Type | Description |
|---|---|---|
first_name Required | string | First name |
last_name Required | string | Last name |
email Optional | string | Email address |
phone Required | string | Phone number |
OrderItem
| Field | Type | Default | Description |
|---|---|---|---|
product_id Required | string | — | Product identifier / SKU |
name Required | string | — | Product name |
quantity Required | integer | — | Quantity ordered |
unit_price Required | float | — | Price per unit |
total_discount Optional | float | 0.0 | Discount on this item |
total_tax Optional | float | 0.0 | Tax on this item |
total_price Required | float | — | Final line item price |
category Optional | CategoryInfo | — | Product category |
CategoryInfo
| Field | Type | Description |
|---|---|---|
id Required | string | Category identifier |
name Required | string | Category name |
Code Examples
Send an order_created event from Odoo with automatic source tagging.
curl -X POST https://api.nonito.xyz/v1/odoo/events \ -H "Content-Type: application/json" \ -H "Authorization: Bearer your-api-key" \ -d '{ "batch": [{ "event_id": "ord_001", "user_id": "+201234567890", "event_name": "order_created", "timestamp": "2025-01-15T10:30:00Z", "properties": { "order_id": "ORD-1001", "channel": "online", "financials": { "subtotal": 250.0, "total_discounts": 25.0, "total_tax": 31.5, "total_price": 256.5, "currency": "EGP", "payment_method": "visa" }, "customer": { "first_name": "Ahmed", "last_name": "Hassan", "phone": "+201234567890" }, "items": [{ "product_id": "SKU-100", "name": "Classic T-Shirt", "quantity": 2, "unit_price": 125.0, "total_price": 250.0 }] } }] }'