> For the complete documentation index, see [llms.txt](https://apidocs.akinon.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://apidocs.akinon.com/flows/extension-notification-flows.md).

# Extension Notification Flows

This document provides a detailed explanation of the extension notification gateway flows, including the purpose of the flow, the services involved, and the description of each field in the requests and responses.

{% hint style="warning" %}
All requests are sent with HTTP Basic Authentication. The notification endpoint URL is fully specified in the gateway configuration via `send_url`.
{% endhint %}

**Example configuration:**

```json
{
  "klass": "omnishop.libs.notification_gateways.notification_extensions.gateway.NotificationExtensionGateway",
  "conf": {
    "username": "<basic-auth-username>",
    "password": "<basic-auth-password>",
    "send_url": "https://example.com/api/notification",
    "from_number": "<sender-id>"
  }
}
```

{% hint style="info" %}
This configuration is defined under **Sales Channels > Sales Channel Settings > Dynamic Setting** in the admin panel, as the `NOTIFICATION_GATEWAYS` setting. The active gateway is selected via the `NOTIFICATION_GATEWAY` key (e.g. `"default"`).
{% endhint %}

## Purpose of the Flow

The Extension Notification Gateway Flow enables Commerce to send order lifecycle and marketing notifications to customers through an external messaging service. Instead of integrating directly with each SMS/push/messaging provider, Commerce communicates through a standardised interface that the provider must implement. This flow is particularly useful for:

* **Provider Abstraction:** Each provider handles its own delivery logic without changes to Commerce.
* **Event-Driven Notifications:** Notifications are triggered automatically on order status transitions and stock events.
* **Flexible Messaging:** Supports SMS, WhatsApp, push, or any other channel the external service implements.

The following configuration parameters are shared during integration:

| Field         | Description                                                                   |
| ------------- | ----------------------------------------------------------------------------- |
| `klass`       | Gateway class path                                                            |
| `username`    | Username for HTTP Basic Authentication                                        |
| `password`    | Password for HTTP Basic Authentication                                        |
| `send_url`    | Full URL of the notification endpoint (e.g. `https://example.com/api/notify`) |
| `from_number` | Sender identifier (phone number or alias)                                     |

### Common Request Headers

All requests include the following headers:

| Header        | Description                                 | Requirement |
| ------------- | ------------------------------------------- | ----------- |
| Authorization | Basic \[BASE64\_encoded(username:password)] | Mandatory   |
| Content-Type  | Always `application/json`                   | Mandatory   |

### Success Criteria

Commerce considers the notification successfully delivered when the external service returns HTTP `200`. Any other status code is treated as a failure.

{% hint style="danger" %}
The notification gateway does not have a built-in retry mechanism. If a notification request fails, it will not be automatically retried. Ensure your external service is highly available or implement your own retry logic on the receiving end.
{% endhint %}

***

## <mark style="color:red;">send-notification (POST)</mark>

Commerce sends a POST request to the URL configured in `send_url` whenever a notification event occurs. The request body contains the event type, recipient information, and event-specific payload.

**URL:**

```
^^ (configured send_url)
```

**Request Body Structure**

| Field          | Type   | Required | Description                                    |
| -------------- | ------ | -------- | ---------------------------------------------- |
| from           | String | Yes      | Sender identifier configured in `from_number`  |
| to             | String | Yes      | Recipient phone number with country code       |
| event          | String | Yes      | Event type that triggered the notification     |
| payload        | Object | Yes      | Event-specific data (see event sections below) |
| site\_domain   | String | Yes      | Site domain                                    |
| receiver\_user | Object | Yes      | User information (see ReceiverUser data model) |

**Request Body (typescript interface)**

```ts
interface NotificationRequest {
  from: string;
  to: string;
  event: NotificationEvent;
  payload: NotificationPayload;
  site_domain: string;
  receiver_user: ReceiverUser;
}

type NotificationEvent =
  | 'order_delivered'
  | 'product_alert'
  | 'order_cancellation'
  | 'pay_on_delivery'
  | 'order_completed'
  | 'order_refund_result'
  | 'order_shipped_cargo'
  | 'order_shipped_partial_cargo'
  | 'order_ready_for_pick_up'
  | 'order_e_archive_url_available'
  | 'order_checkout_url_with_token';

type NotificationPayload =
  | OrderPayload
  | ProductAlertPayload
  | OrderCancellationPayload
  | PartialShipmentPayload
  | CheckoutUrlPayload;

interface OrderPayload {
  order: Order;
}

interface ProductAlertPayload {
  product: Product;
}

interface OrderCancellationPayload {
  order: Order;
  cancellation_type: 'cancel' | 'refund';
  order_items?: OrderItem[];
  return_code?: string;
}

interface PartialShipmentPayload {
  order: Order;
  tracking_number: string;
  shipping_company: string;
  order_items: OrderItem[];
}

interface CheckoutUrlPayload {
  checkout_url: string;
}
```

**Response Body (raw 200)**

```
No Body
```

***

## Notification Events

| Event                           | Description                                         | Payload Type               |
| ------------------------------- | --------------------------------------------------- | -------------------------- |
| `order_delivered`               | Order has been delivered to the customer            | Order Payload              |
| `product_alert`                 | Product is back in stock (stock alert subscription) | Product Alert Payload      |
| `order_cancellation`            | Order or items have been cancelled                  | Order Cancellation Payload |
| `pay_on_delivery`               | Pay on delivery order created                       | Order Payload              |
| `order_completed`               | Order successfully completed                        | Order Payload              |
| `order_refund_result`           | Refund has been processed                           | Order Payload              |
| `order_shipped_cargo`           | Order shipped via cargo                             | Order Payload              |
| `order_shipped_partial_cargo`   | Partial shipment sent                               | Partial Shipment Payload   |
| `order_ready_for_pick_up`       | Order ready for customer pickup                     | Order Payload              |
| `order_e_archive_url_available` | E-archive invoice URL available                     | Order Payload              |
| `order_checkout_url_with_token` | Checkout URL with authentication token              | Checkout URL Payload       |

### Order Event Payload

Used by: `order_delivered`, `pay_on_delivery`, `order_completed`, `order_refund_result`, `order_shipped_cargo`, `order_ready_for_pick_up`, `order_e_archive_url_available`

**Request Body Example**

```json
{
  "from": "akinon",
  "to": "+905551234567",
  "event": "order_delivered",
  "payload": {
    "order": {
      "pk": 12345,
      "number": "ORD-2024-00001",
      "status": {
        "value": "550",
        "label": "delivered"
      },
      "currency": {
        "value": "try",
        "label": "TL"
      },
      "amount": "1250.00",
      "discount_amount": "50.00",
      "shipping_amount": "15.00",
      "shipping_tax_rate": "18.00",
      "refund_amount": "0.00",
      "discount_refund_amount": "0.00",
      "shipping_refund_amount": "0.00",
      "invoice_number": "INV-2024-00001",
      "invoice_date": "2024-01-15T10:30:00Z",
      "e_archive_url": "https://example.com/e-archive/INV-2024-00001",
      "tracking_number": "TRK123456789",
      "defined_tracking_url": null,
      "remote_addr": "192.168.1.1",
      "has_gift_box": false,
      "gift_box_note": null,
      "language_code": "en",
      "notes": null,
      "delivery_range": null,
      "shipping_option_slug": "standard-shipping",
      "extra_field": {},
      "user": 1001,
      "user_email": "john.doe@example.com",
      "basket": 5001,
      "shipping_option": 1,
      "payment_option": {
        "pk": 1,
        "name": "Credit Card",
        "payment_type": "credit_card",
        "slug": "credit-card"
      },
      "card": 101,
      "bin_number": "123456",
      "installment": 1,
      "installment_count": 1,
      "installment_interest_amount": "0.00",
      "segment": 1,
      "shipping_tracking_url": null,
      "checkout_provider": null,
      "created_date": "2024-01-15T10:30:00Z",
      "modified_date": "2024-01-16T14:20:00Z",
      "amount_without_discount": "1300.00",
      "is_cancelled": false,
      "is_cancellable": false,
      "is_refundable": true,
      "is_payable": false,
      "tracking_url": "https://tracking.example.com/TRK123456789",
      "client_type": {
        "value": "default",
        "label": "default"
      },
      "shipping_company": {
        "value": "yurtici",
        "label": "Yurtiçi Kargo"
      },
      "shipping_address": {
        "pk": 5001,
        "email": "john.doe@example.com",
        "phone_number": "+905551234567",
        "first_name": "John",
        "last_name": "Doe",
        "country": {
          "pk": 1,
          "name": "Turkey",
          "code": "TR",
          "is_active": true
        },
        "city": {
          "pk": 34,
          "name": "Istanbul",
          "is_active": true
        },
        "line": "123 Main Street, Apt 4B",
        "title": "Home",
        "township": {
          "pk": 340,
          "name": "Kadikoy",
          "is_active": true
        },
        "district": {
          "pk": 3401,
          "name": "Moda",
          "is_active": true
        },
        "postcode": "34710",
        "notes": null,
        "company_name": null,
        "tax_office": null,
        "tax_no": null,
        "e_bill_taxpayer": false,
        "hash_data": "abc123...",
        "address_type": {
          "value": "customer",
          "label": "Customer"
        },
        "retail_store": null,
        "remote_id": null,
        "identity_number": null,
        "extra_field": {},
        "user": {
          "pk": 1001,
          "username": "john.doe@example.com",
          "first_name": "John",
          "last_name": "Doe",
          "email": "john.doe@example.com",
          "is_active": true,
          "date_joined": "2024-01-01T10:00:00Z",
          "last_login": "2024-01-16T09:00:00Z",
          "email_allowed": true,
          "sms_allowed": true,
          "whatsapp_allowed": true,
          "call_allowed": false,
          "gender": {
            "value": "male",
            "label": "male"
          },
          "attributes": {},
          "phone": "+905551234567",
          "date_of_birth": "1990-05-15",
          "attributes_kwargs": {},
          "user_type": {
            "value": "registered",
            "label": "Registered"
          },
          "modified_date": "2024-01-16T09:00:00Z"
        }
      },
      "billing_address": {
        "pk": 5002,
        "email": "john.doe@example.com",
        "phone_number": "+905551234567",
        "first_name": "John",
        "last_name": "Doe",
        "country": {
          "pk": 1,
          "name": "Turkey",
          "code": "TR",
          "is_active": true
        },
        "city": {
          "pk": 34,
          "name": "Istanbul",
          "is_active": true
        },
        "line": "123 Main Street, Apt 4B",
        "title": "Home",
        "township": {
          "pk": 340,
          "name": "Kadikoy",
          "is_active": true
        },
        "district": {
          "pk": 3401,
          "name": "Moda",
          "is_active": true
        },
        "postcode": "34710",
        "notes": null,
        "company_name": null,
        "tax_office": null,
        "tax_no": null,
        "e_bill_taxpayer": false,
        "hash_data": "def456...",
        "address_type": {
          "value": "customer",
          "label": "Customer"
        },
        "retail_store": null,
        "remote_id": null,
        "identity_number": null,
        "extra_field": {},
        "user": {
          "pk": 1001,
          "username": "john.doe@example.com",
          "first_name": "John",
          "last_name": "Doe",
          "email": "john.doe@example.com",
          "is_active": true,
          "date_joined": "2024-01-01T10:00:00Z",
          "last_login": "2024-01-16T09:00:00Z",
          "email_allowed": true,
          "sms_allowed": true,
          "whatsapp_allowed": true,
          "call_allowed": false,
          "gender": {
            "value": "male",
            "label": "male"
          },
          "attributes": {},
          "phone": "+905551234567",
          "date_of_birth": "1990-05-15",
          "attributes_kwargs": {},
          "user_type": {
            "value": "registered",
            "label": "Registered"
          },
          "modified_date": "2024-01-16T09:00:00Z"
        }
      },
      "bank": {
        "pk": 1,
        "name": "Example Bank",
        "slug": "example-bank",
        "logo": "https://cdn.example.com/bank-logos/example-bank.png",
        "logo_path": null
      },
      "orderitem_set": [
        {
          "pk": 50001,
          "order": 12345,
          "status": {
            "value": "550",
            "label": "delivered"
          },
          "price": "299.00",
          "price_currency": {
            "value": "try",
            "label": "TL"
          },
          "tax_rate": "18.00",
          "invoice_number": "INV-2024-00001-001",
          "invoice_date": "2024-01-15T10:30:00Z",
          "e_archive_url": null,
          "tracking_number": "TRK123456789",
          "defined_tracking_url": null,
          "shipping_company": {
            "value": "yurtici",
            "label": "Yurtiçi Kargo"
          },
          "defined_shipping_company": null,
          "retail_price": "350.00",
          "image": null,
          "parent": null,
          "extra_field": {},
          "estimated_delivery_date": "2024-01-20",
          "shipped_date": "2024-01-16T09:00:00Z",
          "delivered_date": "2024-01-18T14:30:00Z",
          "attributes": {
            "color": "Black",
            "size": "M"
          },
          "attributes_kwargs": {
            "color": { "label": "Color" },
            "size": { "label": "Size" }
          },
          "localized_attributes": {},
          "localized_attributes_kwargs": {},
          "extra_product_price": 1001,
          "extra_product_stock": 1001,
          "shipping_tracking_url": null,
          "datasource": 1,
          "shipping_option_group": {
            "pk": 1,
            "amount": "15.00",
            "shipping_option_name": "Standard Shipping",
            "shipping_option_logo": "https://cdn.example.com/logos/standard.png"
          },
          "discount_amount": "24.00",
          "is_cancelled": false,
          "is_cancellable": false,
          "is_refundable": true,
          "is_tradable": false,
          "tracking_url": "https://tracking.example.com/TRK123456789",
          "discounted_price": "275.00",
          "cancellationrequest_set": [],
          "active_cancellation_request": null,
          "available_easy_return_shipping_companies": [],
          "datasource_detailed": null,
          "extra_product_stock_detailed": null,
          "extra_product_price_detailed": null,
          "product": {
            "pk": 1001,
            "sku": "TSH-001-BLK-M",
            "base_code": "TSH-001",
            "name": "Premium Cotton T-Shirt",
            "image": "https://cdn.example.com/images/tshirt-001.jpg",
            "absolute_url": "/products/premium-cotton-t-shirt/",
            "attributes": {
              "color": "Black",
              "size": "M"
            },
            "attributes_kwargs": {
              "color": { "label": "Color" },
              "size": { "label": "Size" }
            },
            "form_schema": null,
            "data_source": null,
            "extra_attributes": {},
            "category": null,
            "attribute_set": 1
          }
        }
      ],
      "discountitem_set": [
        {
          "name": "Summer Sale",
          "amount": "50.00",
          "created_date": "2024-01-15T10:30:00Z",
          "order_number": "ORD-2024-00001",
          "currency": {
            "value": "try",
            "label": "TL"
          }
        }
      ],
      "loyaltytransaction_set": [
        {
          "pk": 1,
          "uuid": "550e8400-e29b-41d4-a716-446655440000",
          "amount": "100.00",
          "order": 12345,
          "user": 1001,
          "user_email": "john.doe@example.com",
          "reference": "LOYALTY-2024-00001"
        }
      ]
    }
  },
  "site_domain": "www.example.com",
  "receiver_user": {
    "id": 1001,
    "first_name": "John",
    "last_name": "Doe",
    "email_allowed": true,
    "sms_allowed": true,
    "call_allowed": false,
    "whatsapp_allowed": true,
    "avatar": null,
    "email": "john.doe@example.com",
    "phone": "+905551234567",
    "date_of_birth": "1990-05-15",
    "gender": {
      "value": "male",
      "label": "male"
    },
    "genders": [
      { "value": "male", "label": "male" },
      { "value": "female", "label": "female" }
    ],
    "language_code": "en",
    "attributes": {},
    "date_joined": "2024-01-01T10:00:00Z"
  }
}
```

***

### Product Alert Payload

Used by: `product_alert`

Sent when a product that a user subscribed to for stock alerts becomes available.

**Request Body Example**

```json
{
  "from": "akinon",
  "to": "+905551234567",
  "event": "product_alert",
  "payload": {
    "product": {
      "pk": 1001,
      "name": "Premium Cotton T-Shirt",
      "base_code": "TSH-001",
      "sku": "TSH-001-BLK-M",
      "product_type": {
        "value": "0",
        "label": "Simple"
      },
      "is_active": true,
      "parent": null,
      "attributes": {
        "color": "Black",
        "size": "M",
        "material": "Cotton"
      },
      "attributes_kwargs": {
        "color": { "label": "Color", "data_type": "dropdown" },
        "size": { "label": "Size", "data_type": "dropdown" }
      },
      "extra_attributes": {},
      "is_seller_product": false,
      "group_products": [],
      "productimage_set": [
        {
          "pk": 3001,
          "status": {
            "value": "active",
            "label": "Active"
          },
          "image": "https://cdn.example.com/images/tshirt-001.jpg",
          "order": 1,
          "created_date": "2024-01-01T10:00:00Z",
          "specialimage_set": []
        }
      ],
      "attribute_set": 1,
      "custom_attribute_set": null,
      "is_listable": true,
      "listing_code": "TSH-001-BLK-M",
      "data_source": null,
      "absolute_url": "/products/premium-cotton-t-shirt/?color=Black&size=M",
      "is_form_required": false
    }
  },
  "site_domain": "www.example.com",
  "receiver_user": {
    "id": 1001,
    "first_name": "John",
    "last_name": "Doe",
    "email_allowed": true,
    "sms_allowed": true,
    "call_allowed": false,
    "whatsapp_allowed": true,
    "avatar": null,
    "email": "john.doe@example.com",
    "phone": "+905551234567",
    "date_of_birth": "1990-05-15",
    "gender": {
      "value": "male",
      "label": "male"
    },
    "genders": [
      { "value": "male", "label": "male" },
      { "value": "female", "label": "female" }
    ],
    "language_code": "en",
    "attributes": {},
    "date_joined": "2024-01-01T10:00:00Z"
  }
}
```

***

### Order Cancellation Payload

Used by: `order_cancellation`

**Request Body Example**

```json
{
  "from": "akinon",
  "to": "+905551234567",
  "event": "order_cancellation",
  "payload": {
    "order": {
      "pk": 12345,
      "number": "ORD-2024-00001",
      "status": {
        "value": "100",
        "label": "cancelled"
      },
      "currency": {
        "value": "try",
        "label": "TL"
      },
      "amount": "1250.00",
      "discount_amount": "50.00",
      "shipping_amount": "15.00",
      "amount_without_discount": "1300.00",
      "is_cancelled": true,
      "is_cancellable": false,
      "is_refundable": false,
      "is_payable": false,
      "tracking_url": null,
      "client_type": {
        "value": "default",
        "label": "default"
      },
      "shipping_company": null,
      "shipping_address": {},
      "billing_address": {},
      "payment_option": {
        "pk": 1,
        "name": "Credit Card",
        "payment_type": "credit_card",
        "slug": "credit-card"
      },
      "bank": {
        "pk": 1,
        "name": "Example Bank",
        "slug": "example-bank",
        "logo": null,
        "logo_path": null
      },
      "orderitem_set": [],
      "discountitem_set": [],
      "loyaltytransaction_set": [],
      "created_date": "2024-01-15T10:30:00Z",
      "modified_date": "2024-01-16T14:20:00Z"
    },
    "cancellation_type": "cancel",
    "order_items": [
      {
        "pk": 50001,
        "order": 12345,
        "status": {
          "value": "100",
          "label": "cancelled"
        },
        "price": "299.00",
        "price_currency": {
          "value": "try",
          "label": "TL"
        },
        "tax_rate": "18.00",
        "invoice_number": null,
        "invoice_date": null,
        "e_archive_url": null,
        "tracking_number": null,
        "defined_tracking_url": null,
        "shipping_company": null,
        "defined_shipping_company": null,
        "retail_price": "350.00",
        "image": null,
        "parent": null,
        "extra_field": {},
        "estimated_delivery_date": null,
        "shipped_date": null,
        "delivered_date": null,
        "attributes": {
          "color": "Black",
          "size": "M"
        },
        "attributes_kwargs": {
          "color": { "label": "Color" },
          "size": { "label": "Size" }
        },
        "localized_attributes": {},
        "localized_attributes_kwargs": {},
        "extra_product_price": null,
        "extra_product_stock": null,
        "shipping_tracking_url": null,
        "datasource": null,
        "shipping_option_group": null,
        "discount_amount": "0.00",
        "is_cancelled": true,
        "is_cancellable": false,
        "is_refundable": false,
        "is_tradable": false,
        "tracking_url": null,
        "discounted_price": "299.00",
        "cancellationrequest_set": [],
        "active_cancellation_request": null,
        "available_easy_return_shipping_companies": [],
        "datasource_detailed": null,
        "extra_product_stock_detailed": null,
        "extra_product_price_detailed": null,
        "product": {
          "pk": 1001,
          "sku": "TSH-001-BLK-M",
          "base_code": "TSH-001",
          "name": "Premium Cotton T-Shirt",
          "image": "https://cdn.example.com/images/tshirt-001.jpg",
          "absolute_url": "/products/premium-cotton-t-shirt/",
          "attributes": {
            "color": "Black",
            "size": "M"
          },
          "attributes_kwargs": {
            "color": { "label": "Color" },
            "size": { "label": "Size" }
          },
          "form_schema": null,
          "data_source": null,
          "extra_attributes": {},
          "category": null,
          "attribute_set": 1
        }
      }
    ],
    "return_code": "RET-2024-00123"
  },
  "site_domain": "www.example.com",
  "receiver_user": {
    "id": 1001,
    "first_name": "John",
    "last_name": "Doe",
    "email_allowed": true,
    "sms_allowed": true,
    "call_allowed": false,
    "whatsapp_allowed": true,
    "avatar": null,
    "email": "john.doe@example.com",
    "phone": "+905551234567",
    "date_of_birth": "1990-05-15",
    "gender": {
      "value": "male",
      "label": "male"
    },
    "genders": [
      { "value": "male", "label": "male" },
      { "value": "female", "label": "female" }
    ],
    "language_code": "en",
    "attributes": {},
    "date_joined": "2024-01-01T10:00:00Z"
  }
}
```

**Cancellation Payload Extra Fields**

| Field               | Type   | Description                                                      |
| ------------------- | ------ | ---------------------------------------------------------------- |
| `cancellation_type` | String | `cancel` (before shipment) or `refund` (after delivery)          |
| `order_items`       | Array  | Cancelled items (only included if specific items were cancelled) |
| `return_code`       | String | Return code if applicable (only included when present)           |

{% hint style="warning" %}
The `order_items` and `return_code` fields are optional. They are only included in the payload when specific items are cancelled or when a return code exists.
{% endhint %}

***

### Partial Shipment Payload

Used by: `order_shipped_partial_cargo`

**Request Body Example**

```json
{
  "from": "akinon",
  "to": "+905551234567",
  "event": "order_shipped_partial_cargo",
  "payload": {
    "order": {
      "pk": 12345,
      "number": "ORD-2024-00001",
      "status": {
        "value": "500",
        "label": "shipped"
      },
      "currency": {
        "value": "try",
        "label": "TL"
      },
      "amount": "1250.00",
      "discount_amount": "50.00",
      "shipping_amount": "15.00",
      "amount_without_discount": "1300.00",
      "is_cancelled": false,
      "is_cancellable": false,
      "is_refundable": false,
      "is_payable": false,
      "tracking_url": "https://tracking.example.com/TRK123456789",
      "client_type": {
        "value": "default",
        "label": "default"
      },
      "shipping_company": {
        "value": "dhlexpress",
        "label": "DHL Express"
      },
      "shipping_address": {},
      "billing_address": {},
      "payment_option": {
        "pk": 1,
        "name": "Credit Card",
        "payment_type": "credit_card",
        "slug": "credit-card"
      },
      "bank": null,
      "orderitem_set": [],
      "discountitem_set": [],
      "loyaltytransaction_set": [],
      "created_date": "2024-01-15T10:30:00Z",
      "modified_date": "2024-01-16T14:20:00Z"
    },
    "tracking_number": "TRK123456789",
    "shipping_company": "DHL Express",
    "order_items": [
      {
        "pk": 50001,
        "order": 12345,
        "status": {
          "value": "500",
          "label": "shipped"
        },
        "price": "299.00",
        "price_currency": {
          "value": "try",
          "label": "TL"
        },
        "tax_rate": "18.00",
        "invoice_number": null,
        "invoice_date": null,
        "e_archive_url": null,
        "tracking_number": "TRK123456789",
        "defined_tracking_url": null,
        "shipping_company": {
          "value": "dhlexpress",
          "label": "DHL Express"
        },
        "defined_shipping_company": null,
        "retail_price": "350.00",
        "image": null,
        "parent": null,
        "extra_field": {},
        "estimated_delivery_date": "2024-01-20",
        "shipped_date": "2024-01-16T09:00:00Z",
        "delivered_date": null,
        "attributes": {
          "color": "Black",
          "size": "M"
        },
        "attributes_kwargs": {
          "color": { "label": "Color" },
          "size": { "label": "Size" }
        },
        "localized_attributes": {},
        "localized_attributes_kwargs": {},
        "extra_product_price": null,
        "extra_product_stock": null,
        "shipping_tracking_url": null,
        "datasource": null,
        "shipping_option_group": {
          "pk": 1,
          "amount": "15.00",
          "shipping_option_name": "Express Shipping",
          "shipping_option_logo": "https://cdn.example.com/logos/express.png"
        },
        "discount_amount": "0.00",
        "is_cancelled": false,
        "is_cancellable": false,
        "is_refundable": false,
        "is_tradable": false,
        "tracking_url": "https://tracking.example.com/TRK123456789",
        "discounted_price": "299.00",
        "cancellationrequest_set": [],
        "active_cancellation_request": null,
        "available_easy_return_shipping_companies": [],
        "datasource_detailed": null,
        "extra_product_stock_detailed": null,
        "extra_product_price_detailed": null,
        "product": {
          "pk": 1001,
          "sku": "TSH-001-BLK-M",
          "base_code": "TSH-001",
          "name": "Premium Cotton T-Shirt",
          "image": "https://cdn.example.com/images/tshirt-001.jpg",
          "absolute_url": "/products/premium-cotton-t-shirt/",
          "attributes": {
            "color": "Black",
            "size": "M"
          },
          "attributes_kwargs": {
            "color": { "label": "Color" },
            "size": { "label": "Size" }
          },
          "form_schema": null,
          "data_source": null,
          "extra_attributes": {},
          "category": null,
          "attribute_set": 1
        }
      }
    ]
  },
  "site_domain": "www.example.com",
  "receiver_user": {
    "id": 1001,
    "first_name": "John",
    "last_name": "Doe",
    "email_allowed": true,
    "sms_allowed": true,
    "call_allowed": false,
    "whatsapp_allowed": true,
    "avatar": null,
    "email": "john.doe@example.com",
    "phone": "+905551234567",
    "date_of_birth": "1990-05-15",
    "gender": {
      "value": "male",
      "label": "male"
    },
    "genders": [
      { "value": "male", "label": "male" },
      { "value": "female", "label": "female" }
    ],
    "language_code": "en",
    "attributes": {},
    "date_joined": "2024-01-01T10:00:00Z"
  }
}
```

**Partial Shipment Payload Extra Fields**

| Field              | Type   | Description                              |
| ------------------ | ------ | ---------------------------------------- |
| `tracking_number`  | String | Tracking number for the partial shipment |
| `shipping_company` | String | Name of the shipping company             |
| `order_items`      | Array  | Items included in this partial shipment  |

***

### Checkout URL Payload

Used by: `order_checkout_url_with_token`

**Request Body Example**

```json
{
  "from": "akinon",
  "to": "+905551234567",
  "event": "order_checkout_url_with_token",
  "payload": {
    "checkout_url": "https://www.example.com/checkout/?token=abc123def456"
  },
  "site_domain": "www.example.com",
  "receiver_user": {
    "id": 1001,
    "first_name": "John",
    "last_name": "Doe",
    "email_allowed": true,
    "sms_allowed": true,
    "call_allowed": false,
    "whatsapp_allowed": true,
    "avatar": null,
    "email": "john.doe@example.com",
    "phone": "+905551234567",
    "date_of_birth": "1990-05-15",
    "gender": {
      "value": "male",
      "label": "male"
    },
    "genders": [
      { "value": "male", "label": "male" },
      { "value": "female", "label": "female" }
    ],
    "language_code": "en",
    "attributes": {},
    "date_joined": "2024-01-01T10:00:00Z"
  }
}
```

***

## Typical Flows

### Order Lifecycle Notification

```
Order event occurs → Commerce sends POST to send_url
```

### Stock Alert Notification

```
Product stock threshold met → Commerce sends POST to send_url
```

### Checkout URL Notification

```
Token generated → Commerce sends POST to send_url
```

***

## Enum Reference

### Order Status

Order and order item status codes. Returned as `{value, label}` object.

| Value | Label                  | Description                       |
| ----- | ---------------------- | --------------------------------- |
| `50`  | cancellation waiting   | Cancellation request is pending   |
| `100` | cancelled              | Order has been cancelled          |
| `200` | waiting                | Order is waiting to be processed  |
| `300` | payment\_waiting       | Waiting for payment confirmation  |
| `350` | confirmation waiting   | Waiting for order confirmation    |
| `400` | approved               | Order has been approved           |
| `450` | preparing              | Order is being prepared           |
| `500` | shipped                | Order has been shipped            |
| `510` | shipped\_and\_informed | Shipped and customer notified     |
| `520` | ready for pickup       | Ready for customer pickup         |
| `540` | attempted\_delivery    | Delivery was attempted            |
| `544` | review\_started        | Review process started (trade-in) |
| `545` | review\_waiting        | Waiting for review (trade-in)     |
| `546` | waiting\_for\_payment  | Waiting for payment (trade-in)    |
| `547` | paid                   | Payment received (trade-in)       |
| `550` | delivered              | Order delivered to customer       |
| `600` | refunded               | Order has been refunded           |

### Currency Types

ISO 4217 currency codes. Returned as `{value, label}` object.

| Value | Label | Description       |
| ----- | ----- | ----------------- |
| `try` | TL    | Turkish Lira      |
| `eur` | EUR   | Euro              |
| `usd` | USD   | US Dollar         |
| `egp` | EGP   | Egyptian Pound    |
| `gbp` | GBP   | British Pound     |
| `mad` | MAD   | Moroccan Dirham   |
| `pln` | PLN   | Polish Zloty      |
| `sar` | SAR   | Saudi Riyal       |
| `ron` | RON   | Romanian Leu      |
| `uah` | UAH   | Ukrainian Hryvnia |
| `czk` | CZK   | Czech Koruna      |
| `huf` | HUF   | Hungarian Forint  |
| `rub` | RUB   | Russian Ruble     |
| `bgn` | BGN   | Bulgarian Lev     |
| `iqd` | IQD   | Iraqi Dinar       |
| `kwd` | KWD   | Kuwaiti Dinar     |
| `bhd` | BHD   | Bahraini Dinar    |
| `omr` | OMR   | Omani Rial        |
| `qar` | QAR   | Qatari Riyal      |
| `aed` | AED   | UAE Dirham        |
| `ngn` | NGN   | Nigerian Naira    |
| `inr` | INR   | Indian Rupee      |
| `kzt` | KZT   | Kazakhstani Tenge |
| `jod` | JOD   | Jordanian Dinar   |
| `rsd` | RSD   | Serbian Dinar     |
| `amd` | AMD   | Armenian Dram     |
| `lyd` | LYD   | Libyan Dinar      |

### Gender Types

User gender. Returned as `{value, label}` object. Can be null.

| Value    | Label  |
| -------- | ------ |
| `male`   | male   |
| `female` | female |

### Client Types

Platform where the order was placed.

| Value     | Description                         |
| --------- | ----------------------------------- |
| `default` | Web browser (desktop or mobile web) |
| `android` | Android mobile application          |
| `ios`     | iOS mobile application              |
| `instore` | In-store POS system                 |
| `b2b`     | B2B portal                          |

### Product Types

Type of product. Returned as `{value, label}` object.

| Value | Label             | Description                                 |
| ----- | ----------------- | ------------------------------------------- |
| `-1`  | Pre Product       | Pre-product (draft)                         |
| `0`   | Simple            | Simple product (single SKU)                 |
| `1`   | Product Meta      | Configurable product (parent with variants) |
| `2`   | Bundle            | Bundle product (contains multiple products) |
| `3`   | Grouped           | Grouped product                             |
| `-2`  | Pre Miscellaneous | Pre-miscellaneous (draft)                   |
| `4`   | Miscellaneous     | Miscellaneous product                       |
| `5`   | Offer             | Offer product                               |

### Shipping Companies

Supported shipping carriers. Returned as `{value, label}` object. Can be null.

| Value        | Label         |
| ------------ | ------------- |
| `aras`       | Aras Kargo    |
| `ups`        | UPS           |
| `yurtici`    | Yurtiçi Kargo |
| `mng`        | MNG Kargo     |
| `hbexpress`  | Hepsi Express |
| `aramex`     | Aramex        |
| `ptt`        | Ptt           |
| `dhlexpress` | DHL Express   |
| `gls`        | GLS Logistic  |
| `dpd`        | DPD Cargo     |
| `novaposhta` | Nova Poshta   |
| `cdek`       | Cdek          |
| `surat`      | Sürat Kargo   |
| `scotty`     | Scotty Cargo  |
| `sendeo`     | Sendeo Cargo  |
| `other`      | Other         |

{% hint style="warning" %}
Many more shipping companies are supported. See the full list in the codebase.
{% endhint %}

### Cancellation Types

Type of cancellation in the `order_cancellation` event.

| Value    | Description                     |
| -------- | ------------------------------- |
| `cancel` | Order cancelled before shipment |
| `refund` | Refund after delivery (return)  |

***

## Data Models

### Receiver User

Based on `UserProfileSerializer`.

| Field              | Type            | Description                                      |
| ------------------ | --------------- | ------------------------------------------------ |
| `id`               | Integer         | User ID                                          |
| `first_name`       | String          | User's first name                                |
| `last_name`        | String          | User's last name                                 |
| `email_allowed`    | Boolean         | User consent for email marketing                 |
| `sms_allowed`      | Boolean         | User consent for SMS marketing                   |
| `call_allowed`     | Boolean \| null | User consent for phone calls                     |
| `whatsapp_allowed` | Boolean \| null | User consent for WhatsApp messages               |
| `avatar`           | String \| null  | User's avatar image URL                          |
| `email`            | String          | User's email address (read-only)                 |
| `phone`            | String          | User's phone number                              |
| `date_of_birth`    | String \| null  | User's birth date (YYYY-MM-DD)                   |
| `gender`           | Object \| null  | User's gender `{value, label}`                   |
| `genders`          | Array           | All available gender options                     |
| `language_code`    | String          | User's preferred language code                   |
| `attributes`       | Object          | Custom user attributes                           |
| `date_joined`      | String          | Account creation timestamp (ISO 8601, read-only) |

### Order

Based on `UserOrderSerializer`. Includes all Order model fields plus computed fields.

| Field                         | Type            | Description                                                                                  |
| ----------------------------- | --------------- | -------------------------------------------------------------------------------------------- |
| `pk`                          | Integer         | Order ID                                                                                     |
| `number`                      | String          | Order number (human-readable)                                                                |
| `status`                      | Object          | Order status `{value, label}`                                                                |
| `currency`                    | Object          | Order currency `{value, label}`                                                              |
| `amount`                      | String          | Total order amount after discounts                                                           |
| `discount_amount`             | String          | Total discount applied                                                                       |
| `shipping_amount`             | String          | Shipping cost                                                                                |
| `shipping_tax_rate`           | String \| null  | Tax rate applied to shipping                                                                 |
| `refund_amount`               | String          | Total refund amount                                                                          |
| `discount_refund_amount`      | String          | Discount refund amount                                                                       |
| `shipping_refund_amount`      | String          | Shipping refund amount                                                                       |
| `invoice_number`              | String \| null  | Invoice number                                                                               |
| `invoice_date`                | String \| null  | Invoice date (ISO 8601)                                                                      |
| `e_archive_url`               | String \| null  | E-archive URL                                                                                |
| `tracking_number`             | String \| null  | Shipment tracking number                                                                     |
| `defined_tracking_url`        | String \| null  | Custom tracking URL                                                                          |
| `remote_addr`                 | String \| null  | Customer IP address                                                                          |
| `has_gift_box`                | Boolean \| null | Whether order includes gift box                                                              |
| `gift_box_note`               | String \| null  | Gift box note                                                                                |
| `language_code`               | String \| null  | Language code                                                                                |
| `notes`                       | String \| null  | Order notes                                                                                  |
| `delivery_range`              | Object \| null  | Delivery date range                                                                          |
| `shipping_option_slug`        | String \| null  | Shipping option slug                                                                         |
| `extra_field`                 | Object \| null  | Additional custom fields                                                                     |
| `user`                        | Integer \| null | User ID                                                                                      |
| `user_email`                  | String          | Customer email                                                                               |
| `basket`                      | Integer \| null | Basket ID                                                                                    |
| `shipping_option`             | Integer         | Shipping option ID                                                                           |
| `card`                        | Integer \| null | Payment card ID                                                                              |
| `bin_number`                  | String \| null  | Card BIN number                                                                              |
| `installment`                 | Integer \| null | Installment ID                                                                               |
| `installment_count`           | Integer         | Number of installments                                                                       |
| `installment_interest_amount` | String          | Interest amount                                                                              |
| `segment`                     | Integer \| null | Segment ID                                                                                   |
| `shipping_tracking_url`       | String \| null  | Shipping tracking URL                                                                        |
| `checkout_provider`           | Integer \| null | Checkout provider ID                                                                         |
| `created_date`                | String          | Order creation timestamp (ISO 8601)                                                          |
| `modified_date`               | String          | Last modification timestamp (ISO 8601)                                                       |
| `amount_without_discount`     | String          | Order amount before discounts (computed)                                                     |
| `is_cancelled`                | Boolean         | Whether order is cancelled (computed)                                                        |
| `is_cancellable`              | Boolean         | Whether order can be cancelled (computed)                                                    |
| `is_refundable`               | Boolean         | Whether order is eligible for refund (computed)                                              |
| `is_payable`                  | Boolean         | Whether order is awaiting payment (computed)                                                 |
| `tracking_url`                | String \| null  | Tracking URL                                                                                 |
| `client_type`                 | Object          | Platform where order was placed `{value, label}`                                             |
| `shipping_company`            | Object \| null  | Shipping carrier `{value, label}`                                                            |
| `shipping_address`            | Object \| null  | Delivery address (AddressDetailedSerializer)                                                 |
| `billing_address`             | Object \| null  | Invoice address (AddressDetailedSerializer)                                                  |
| `payment_option`              | Object          | Payment method with `pk`, `name`, `payment_type`, `slug`                                     |
| `bank`                        | Object \| null  | Bank information with `pk`, `name`, `slug`, `logo`, `logo_path`                              |
| `orderitem_set`               | Array           | List of items in the order                                                                   |
| `discountitem_set`            | Array           | Discount items with `name`, `amount`, `created_date`, `order_number`, `currency`             |
| `loyaltytransaction_set`      | Array           | Loyalty transactions with `pk`, `uuid`, `amount`, `order`, `user`, `user_email`, `reference` |

### Address

Based on `AddressDetailedSerializer`.

| Field             | Type           | Description                                                                                                                                                                                                                                                                       |
| ----------------- | -------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `pk`              | Integer        | Address ID                                                                                                                                                                                                                                                                        |
| `email`           | String \| null | Contact email                                                                                                                                                                                                                                                                     |
| `phone_number`    | String         | Contact phone number                                                                                                                                                                                                                                                              |
| `first_name`      | String         | Recipient first name                                                                                                                                                                                                                                                              |
| `last_name`       | String         | Recipient last name                                                                                                                                                                                                                                                               |
| `country`         | Object         | Country with `pk`, `name`, `code`, `is_active`                                                                                                                                                                                                                                    |
| `city`            | Object         | City with `pk`, `name`, `is_active`                                                                                                                                                                                                                                               |
| `line`            | String         | Street address line                                                                                                                                                                                                                                                               |
| `title`           | String         | Address label (e.g. Home, Work)                                                                                                                                                                                                                                                   |
| `township`        | Object         | Township with `pk`, `name`, `is_active`                                                                                                                                                                                                                                           |
| `district`        | Object \| null | District with `pk`, `name`, `is_active`                                                                                                                                                                                                                                           |
| `postcode`        | String \| null | Postal/ZIP code                                                                                                                                                                                                                                                                   |
| `notes`           | String \| null | Address notes                                                                                                                                                                                                                                                                     |
| `company_name`    | String \| null | Company name (for corporate addresses)                                                                                                                                                                                                                                            |
| `tax_office`      | String \| null | Tax office                                                                                                                                                                                                                                                                        |
| `tax_no`          | String \| null | Tax number                                                                                                                                                                                                                                                                        |
| `e_bill_taxpayer` | Boolean        | Whether address is e-bill taxpayer                                                                                                                                                                                                                                                |
| `hash_data`       | String         | Address hash (read-only)                                                                                                                                                                                                                                                          |
| `address_type`    | Object         | Address type `{value, label}`                                                                                                                                                                                                                                                     |
| `retail_store`    | Object \| null | Retail store (for pickup addresses)                                                                                                                                                                                                                                               |
| `remote_id`       | String \| null | Remote ID                                                                                                                                                                                                                                                                         |
| `identity_number` | String \| null | Identity number                                                                                                                                                                                                                                                                   |
| `extra_field`     | Object \| null | Additional custom fields                                                                                                                                                                                                                                                          |
| `user`            | Object         | User with `pk`, `username`, `first_name`, `last_name`, `email`, `is_active`, `date_joined`, `last_login`, `email_allowed`, `sms_allowed`, `whatsapp_allowed`, `call_allowed`, `gender`, `attributes`, `phone`, `date_of_birth`, `attributes_kwargs`, `user_type`, `modified_date` |

### Order Item

Based on `UserOrderItemSerializer`. Includes all OrderItem model fields plus computed fields.

| Field                                      | Type            | Description                                                                         |
| ------------------------------------------ | --------------- | ----------------------------------------------------------------------------------- |
| `pk`                                       | Integer         | Order item ID                                                                       |
| `order`                                    | Integer         | Order ID (FK)                                                                       |
| `status`                                   | Object          | Item status `{value, label}`                                                        |
| `price`                                    | String          | Unit price of the item                                                              |
| `price_currency`                           | Object          | Price currency `{value, label}`                                                     |
| `tax_rate`                                 | String          | Tax rate percentage                                                                 |
| `invoice_number`                           | String \| null  | Invoice number                                                                      |
| `invoice_date`                             | String \| null  | Invoice date (ISO 8601)                                                             |
| `e_archive_url`                            | String \| null  | E-archive URL                                                                       |
| `tracking_number`                          | String \| null  | Shipment tracking number                                                            |
| `defined_tracking_url`                     | String \| null  | Custom tracking URL                                                                 |
| `shipping_company`                         | Object \| null  | Shipping carrier `{value, label}`                                                   |
| `defined_shipping_company`                 | String \| null  | Custom shipping company name                                                        |
| `retail_price`                             | String \| null  | Retail price                                                                        |
| `image`                                    | String \| null  | Order item image URL                                                                |
| `parent`                                   | Integer \| null | Parent order item ID                                                                |
| `extra_field`                              | Object \| null  | Additional custom fields                                                            |
| `estimated_delivery_date`                  | String \| null  | Estimated delivery date                                                             |
| `shipped_date`                             | String \| null  | Date item was shipped (ISO 8601)                                                    |
| `delivered_date`                           | String \| null  | Date item was delivered (ISO 8601)                                                  |
| `attributes`                               | Object          | Item attribute values                                                               |
| `attributes_kwargs`                        | Object          | Attribute metadata                                                                  |
| `localized_attributes`                     | Object          | Localized attribute values                                                          |
| `localized_attributes_kwargs`              | Object          | Localized attribute metadata                                                        |
| `extra_product_price`                      | Integer \| null | Extra product price ID                                                              |
| `extra_product_stock`                      | Integer \| null | Extra product stock ID                                                              |
| `shipping_tracking_url`                    | String \| null  | Shipping tracking URL                                                               |
| `datasource`                               | Integer \| null | Data source ID                                                                      |
| `shipping_option_group`                    | Object \| null  | Shipping option with `pk`, `amount`, `shipping_option_name`, `shipping_option_logo` |
| `discount_amount`                          | String          | Discount amount                                                                     |
| `is_cancelled`                             | Boolean         | Whether item is cancelled (computed)                                                |
| `is_cancellable`                           | Boolean         | Whether item can be cancelled (computed)                                            |
| `is_refundable`                            | Boolean         | Whether item is eligible for refund (computed)                                      |
| `is_tradable`                              | Boolean         | Whether item can be exchanged (computed)                                            |
| `tracking_url`                             | String \| null  | URL to track this item's shipment (computed)                                        |
| `discounted_price`                         | String          | Price after discounts applied (computed)                                            |
| `cancellationrequest_set`                  | Array           | Cancellation requests                                                               |
| `active_cancellation_request`              | Object \| null  | Active cancellation request (computed)                                              |
| `available_easy_return_shipping_companies` | Array           | Available return shipping companies (computed)                                      |
| `datasource_detailed`                      | Object \| null  | Detailed data source info                                                           |
| `extra_product_stock_detailed`             | Object \| null  | Detailed stock info                                                                 |
| `extra_product_price_detailed`             | Object \| null  | Detailed price info                                                                 |
| `product`                                  | Object          | Product details                                                                     |

### Product (in Order Item)

Based on `UserOrderProductSerializer`.

| Field               | Type           | Description                                                                                                                                                                                                                      |
| ------------------- | -------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `pk`                | Integer        | Product ID                                                                                                                                                                                                                       |
| `sku`               | String         | Stock keeping unit (unique variant identifier)                                                                                                                                                                                   |
| `base_code`         | String         | Base product code (shared across variants)                                                                                                                                                                                       |
| `name`              | String         | Product name                                                                                                                                                                                                                     |
| `image`             | String \| null | Product image URL (computed)                                                                                                                                                                                                     |
| `absolute_url`      | String \| null | Product page URL path (computed)                                                                                                                                                                                                 |
| `attributes`        | Object         | Product attribute values                                                                                                                                                                                                         |
| `attributes_kwargs` | Object         | Attribute metadata (labels, display info)                                                                                                                                                                                        |
| `form_schema`       | Array \| null  | Form schema array with `{order, attribute: {key, name, data_type}, is_required}`                                                                                                                                                 |
| `data_source`       | Object \| null | Data source object with `pk`, `name`, `slug`, `title`, `supplier_code`, `address`, `email`, `phone_number`, `fax_number`, `kep_address`, `mersis_number`, `trade_association`, `extras`, `price_list`, `stock_list`, `is_active` |
| `extra_attributes`  | Object         | Additional custom attributes                                                                                                                                                                                                     |
| `category`          | Object \| null | Category object with `{name}`                                                                                                                                                                                                    |
| `attribute_set`     | Integer        | Attribute set ID                                                                                                                                                                                                                 |

### Product (in Product Alert)

Based on `ProductSerializerWithOfferURL` (inherits from ProductSerializer).

| Field                  | Type            | Description                                   |
| ---------------------- | --------------- | --------------------------------------------- |
| `pk`                   | Integer         | Product ID                                    |
| `name`                 | String          | Product name                                  |
| `base_code`            | String          | Base product code                             |
| `sku`                  | String          | Stock keeping unit                            |
| `product_type`         | Object          | Product type `{value, label}`                 |
| `is_active`            | Boolean         | Whether product is active                     |
| `parent`               | Integer \| null | Parent product ID (for variants)              |
| `attributes`           | Object          | Product attribute values                      |
| `attributes_kwargs`    | Object          | Attribute metadata                            |
| `extra_attributes`     | Object          | Additional custom attributes                  |
| `is_seller_product`    | Boolean         | Whether product is from seller                |
| `group_products`       | Array           | Group product IDs                             |
| `productimage_set`     | Array           | Product images                                |
| `attribute_set`        | Integer         | Attribute set ID                              |
| `custom_attribute_set` | Integer \| null | Custom attribute set ID                       |
| `is_listable`          | Boolean         | Whether product is listable (computed)        |
| `listing_code`         | String \| null  | Listing code                                  |
| `data_source`          | Integer \| null | Data source ID                                |
| `absolute_url`         | String \| null  | Product page URL with query params (computed) |
| `is_form_required`     | Boolean         | Whether form is required                      |

***

## <mark style="color:red;">Changelog</mark>

### Version 1.0.0

#### Added

* Initial implementation of the Extension Notification Gateway
* `send-notification` endpoint for all order lifecycle and stock alert events
* HTTP Basic Auth support
* `order_delivered`, `pay_on_delivery`, `order_completed`, `order_refund_result`, `order_shipped_cargo`, `order_ready_for_pick_up`, `order_e_archive_url_available` events with Order Payload
* `product_alert` event with Product Alert Payload
* `order_cancellation` event with Order Cancellation Payload
* `order_shipped_partial_cargo` event with Partial Shipment Payload
* `order_checkout_url_with_token` event with Checkout URL Payload
* TypeScript interfaces for all payload types
* Enum reference for order status, currency, gender, client type, product type, shipping company, and cancellation type
* Data models for ReceiverUser, Order, Address, OrderItem, and Product


---

# 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 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/flows/extension-notification-flows.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.
