{
    "openapi": "3.1.0",
    "info": {
        "title": "Developer Platform API",
        "version": "0.1.0",
        "description": "Public merchant API gateway, tier rate limits, and outbound webhooks.\n\n**Base path:** `/developer/api/v1`\n\n**Auth:** Sanctum bearer token. Most routes also need `X-Organisation-Uuid` (or Host tenant) plus org membership."
    },
    "servers": [
        {
            "url": "http://api.akoole.localhost/developer/api"
        }
    ],
    "paths": {
        "/v1/health": {
            "get": {
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "status": {
                                            "type": "string",
                                            "const": "ok"
                                        },
                                        "service": {
                                            "type": "string",
                                            "const": "developer-platform"
                                        }
                                    },
                                    "required": [
                                        "status",
                                        "service"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v1/customers/{customerUuid}": {
            "get": {
                "operationId": "customers.show",
                "tags": [
                    "Customers"
                ],
                "parameters": [
                    {
                        "name": "customerUuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": [
                                                "object",
                                                "null"
                                            ],
                                            "properties": {
                                                "uuid": {
                                                    "type": "string"
                                                },
                                                "name": {
                                                    "type": "string"
                                                },
                                                "phone": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "email": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "credit_limit": {
                                                    "type": "string"
                                                },
                                                "balance": {
                                                    "type": "string"
                                                },
                                                "available_credit": {
                                                    "type": "string"
                                                },
                                                "archived": {
                                                    "type": "boolean"
                                                }
                                            },
                                            "required": [
                                                "uuid",
                                                "name",
                                                "phone",
                                                "email",
                                                "credit_limit",
                                                "balance",
                                                "available_credit",
                                                "archived"
                                            ]
                                        },
                                        "meta": {
                                            "type": "string"
                                        },
                                        "error": {
                                            "type": "null"
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "meta",
                                        "error"
                                    ]
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "anyOf": [
                                        {
                                            "type": "object",
                                            "properties": {
                                                "data": {
                                                    "type": "null"
                                                },
                                                "meta": {
                                                    "type": "string"
                                                },
                                                "error": {
                                                    "type": "object",
                                                    "properties": {
                                                        "code": {
                                                            "type": "string",
                                                            "const": "customer_not_found"
                                                        },
                                                        "message": {
                                                            "type": "string",
                                                            "const": "Customer not found."
                                                        },
                                                        "details": {
                                                            "type": "null"
                                                        }
                                                    },
                                                    "required": [
                                                        "code",
                                                        "message",
                                                        "details"
                                                    ]
                                                }
                                            },
                                            "required": [
                                                "data",
                                                "meta",
                                                "error"
                                            ]
                                        },
                                        {
                                            "type": "object",
                                            "properties": {
                                                "data": {
                                                    "type": "null"
                                                },
                                                "meta": {
                                                    "type": "string"
                                                },
                                                "error": {
                                                    "type": "object",
                                                    "properties": {
                                                        "code": {
                                                            "type": "string",
                                                            "const": "organisation_not_found"
                                                        },
                                                        "message": {
                                                            "type": "string",
                                                            "const": "Organisation context is required."
                                                        },
                                                        "details": {
                                                            "type": "null"
                                                        }
                                                    },
                                                    "required": [
                                                        "code",
                                                        "message",
                                                        "details"
                                                    ]
                                                }
                                            },
                                            "required": [
                                                "data",
                                                "meta",
                                                "error"
                                            ]
                                        }
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v1/inventory/stock-on-hand": {
            "get": {
                "operationId": "inventory.stockOnHand",
                "tags": [
                    "Inventory"
                ],
                "parameters": [
                    {
                        "name": "branch_uuid",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "product_uuid",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "variant_uuid",
                        "in": "query",
                        "schema": {
                            "type": [
                                "string",
                                "null"
                            ]
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "on_hand": {
                                                    "type": "string"
                                                },
                                                "reserved": {
                                                    "type": "string"
                                                },
                                                "available": {
                                                    "type": "string"
                                                }
                                            },
                                            "required": [
                                                "on_hand",
                                                "reserved",
                                                "available"
                                            ]
                                        },
                                        "meta": {
                                            "type": "string"
                                        },
                                        "error": {
                                            "type": "null"
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "meta",
                                        "error"
                                    ]
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "null"
                                        },
                                        "meta": {
                                            "type": "string"
                                        },
                                        "error": {
                                            "type": "object",
                                            "properties": {
                                                "code": {
                                                    "type": "string",
                                                    "const": "organisation_not_found"
                                                },
                                                "message": {
                                                    "type": "string",
                                                    "const": "Organisation context is required."
                                                },
                                                "details": {
                                                    "type": "null"
                                                }
                                            },
                                            "required": [
                                                "code",
                                                "message",
                                                "details"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "meta",
                                        "error"
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationException"
                    }
                }
            }
        },
        "/v1/sales/today-summary": {
            "get": {
                "operationId": "orders.todaySummary",
                "tags": [
                    "Orders"
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "count": {
                                                    "type": "integer"
                                                },
                                                "total": {
                                                    "type": "string"
                                                }
                                            },
                                            "required": [
                                                "count",
                                                "total"
                                            ]
                                        },
                                        "meta": {
                                            "type": "string"
                                        },
                                        "error": {
                                            "type": "null"
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "meta",
                                        "error"
                                    ]
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "null"
                                        },
                                        "meta": {
                                            "type": "string"
                                        },
                                        "error": {
                                            "type": "object",
                                            "properties": {
                                                "code": {
                                                    "type": "string",
                                                    "const": "organisation_not_found"
                                                },
                                                "message": {
                                                    "type": "string",
                                                    "const": "Organisation context is required."
                                                },
                                                "details": {
                                                    "type": "null"
                                                }
                                            },
                                            "required": [
                                                "code",
                                                "message",
                                                "details"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "meta",
                                        "error"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v1/sales/orders/{saleUuid}": {
            "get": {
                "operationId": "orders.show",
                "tags": [
                    "Orders"
                ],
                "parameters": [
                    {
                        "name": "saleUuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": [
                                                "object",
                                                "null"
                                            ],
                                            "properties": {
                                                "uuid": {
                                                    "type": "string"
                                                },
                                                "receipt_number": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "receipt_payload": {
                                                    "type": [
                                                        "array",
                                                        "null"
                                                    ],
                                                    "items": {}
                                                }
                                            },
                                            "required": [
                                                "uuid",
                                                "receipt_number",
                                                "receipt_payload"
                                            ]
                                        },
                                        "meta": {
                                            "type": "string"
                                        },
                                        "error": {
                                            "type": "null"
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "meta",
                                        "error"
                                    ]
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "anyOf": [
                                        {
                                            "type": "object",
                                            "properties": {
                                                "data": {
                                                    "type": "null"
                                                },
                                                "meta": {
                                                    "type": "string"
                                                },
                                                "error": {
                                                    "type": "object",
                                                    "properties": {
                                                        "code": {
                                                            "type": "string",
                                                            "const": "sale_not_found"
                                                        },
                                                        "message": {
                                                            "type": "string",
                                                            "const": "Sale or order not found."
                                                        },
                                                        "details": {
                                                            "type": "null"
                                                        }
                                                    },
                                                    "required": [
                                                        "code",
                                                        "message",
                                                        "details"
                                                    ]
                                                }
                                            },
                                            "required": [
                                                "data",
                                                "meta",
                                                "error"
                                            ]
                                        },
                                        {
                                            "type": "object",
                                            "properties": {
                                                "data": {
                                                    "type": "null"
                                                },
                                                "meta": {
                                                    "type": "string"
                                                },
                                                "error": {
                                                    "type": "object",
                                                    "properties": {
                                                        "code": {
                                                            "type": "string",
                                                            "const": "organisation_not_found"
                                                        },
                                                        "message": {
                                                            "type": "string",
                                                            "const": "Organisation context is required."
                                                        },
                                                        "details": {
                                                            "type": "null"
                                                        }
                                                    },
                                                    "required": [
                                                        "code",
                                                        "message",
                                                        "details"
                                                    ]
                                                }
                                            },
                                            "required": [
                                                "data",
                                                "meta",
                                                "error"
                                            ]
                                        }
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v1/products": {
            "get": {
                "operationId": "products.index",
                "tags": [
                    "Products"
                ],
                "parameters": [
                    {
                        "name": "search",
                        "in": "query",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "cursor",
                        "in": "query",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "additionalProperties": {
                                                "type": "string"
                                            }
                                        },
                                        "meta": {
                                            "type": "string"
                                        },
                                        "error": {
                                            "type": "null"
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "meta",
                                        "error"
                                    ]
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "null"
                                        },
                                        "meta": {
                                            "type": "string"
                                        },
                                        "error": {
                                            "type": "object",
                                            "properties": {
                                                "code": {
                                                    "type": "string",
                                                    "const": "organisation_not_found"
                                                },
                                                "message": {
                                                    "type": "string",
                                                    "const": "Organisation context is required."
                                                },
                                                "details": {
                                                    "type": "null"
                                                }
                                            },
                                            "required": [
                                                "code",
                                                "message",
                                                "details"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "meta",
                                        "error"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v1/products/{productUuid}": {
            "get": {
                "operationId": "products.show",
                "tags": [
                    "Products"
                ],
                "parameters": [
                    {
                        "name": "productUuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": [
                                                "object",
                                                "null"
                                            ],
                                            "properties": {
                                                "uuid": {
                                                    "type": "string"
                                                },
                                                "organisation_uuid": {
                                                    "type": "string"
                                                },
                                                "name": {
                                                    "type": "string"
                                                },
                                                "sku": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "barcode": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "sell_price": {
                                                    "type": "string"
                                                },
                                                "cost_price": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "currency": {
                                                    "type": "string"
                                                },
                                                "unit": {
                                                    "type": "string"
                                                },
                                                "track_stock": {
                                                    "type": "boolean"
                                                },
                                                "tracking_mode": {
                                                    "type": "string"
                                                },
                                                "reorder_level": {
                                                    "type": [
                                                        "integer",
                                                        "null"
                                                    ]
                                                },
                                                "storefront_visible": {
                                                    "type": "boolean"
                                                },
                                                "archived": {
                                                    "type": "boolean"
                                                }
                                            },
                                            "required": [
                                                "uuid",
                                                "organisation_uuid",
                                                "name",
                                                "sku",
                                                "barcode",
                                                "sell_price",
                                                "cost_price",
                                                "currency",
                                                "unit",
                                                "track_stock",
                                                "archived"
                                            ]
                                        },
                                        "meta": {
                                            "type": "string"
                                        },
                                        "error": {
                                            "type": "null"
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "meta",
                                        "error"
                                    ]
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "anyOf": [
                                        {
                                            "type": "object",
                                            "properties": {
                                                "data": {
                                                    "type": "null"
                                                },
                                                "meta": {
                                                    "type": "string"
                                                },
                                                "error": {
                                                    "type": "object",
                                                    "properties": {
                                                        "code": {
                                                            "type": "string",
                                                            "const": "product_not_found"
                                                        },
                                                        "message": {
                                                            "type": "string",
                                                            "const": "Product not found."
                                                        },
                                                        "details": {
                                                            "type": "null"
                                                        }
                                                    },
                                                    "required": [
                                                        "code",
                                                        "message",
                                                        "details"
                                                    ]
                                                }
                                            },
                                            "required": [
                                                "data",
                                                "meta",
                                                "error"
                                            ]
                                        },
                                        {
                                            "type": "object",
                                            "properties": {
                                                "data": {
                                                    "type": "null"
                                                },
                                                "meta": {
                                                    "type": "string"
                                                },
                                                "error": {
                                                    "type": "object",
                                                    "properties": {
                                                        "code": {
                                                            "type": "string",
                                                            "const": "organisation_not_found"
                                                        },
                                                        "message": {
                                                            "type": "string",
                                                            "const": "Organisation context is required."
                                                        },
                                                        "details": {
                                                            "type": "null"
                                                        }
                                                    },
                                                    "required": [
                                                        "code",
                                                        "message",
                                                        "details"
                                                    ]
                                                }
                                            },
                                            "required": [
                                                "data",
                                                "meta",
                                                "error"
                                            ]
                                        }
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v1/settings/webhooks": {
            "get": {
                "operationId": "webhookSettings.index",
                "tags": [
                    "WebhookSettings"
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "type": "object",
                                                "properties": {
                                                    "uuid": {
                                                        "type": "string"
                                                    },
                                                    "url": {
                                                        "type": "string"
                                                    },
                                                    "subscribed_events": {
                                                        "type": "string"
                                                    },
                                                    "is_active": {
                                                        "type": "string"
                                                    },
                                                    "consecutive_failure_count": {
                                                        "type": "string"
                                                    },
                                                    "last_triggered_at": {
                                                        "type": [
                                                            "string",
                                                            "null"
                                                        ]
                                                    },
                                                    "latest_delivery": {
                                                        "type": [
                                                            "object",
                                                            "null"
                                                        ],
                                                        "properties": {
                                                            "uuid": {
                                                                "type": "string"
                                                            },
                                                            "event": {
                                                                "type": "string"
                                                            },
                                                            "response_status": {
                                                                "type": "string"
                                                            },
                                                            "duration_ms": {
                                                                "type": "string"
                                                            },
                                                            "status": {
                                                                "type": "string"
                                                            },
                                                            "created_at": {
                                                                "type": [
                                                                    "string",
                                                                    "null"
                                                                ]
                                                            }
                                                        },
                                                        "required": [
                                                            "uuid",
                                                            "event",
                                                            "response_status",
                                                            "duration_ms",
                                                            "status",
                                                            "created_at"
                                                        ]
                                                    },
                                                    "created_at": {
                                                        "type": [
                                                            "string",
                                                            "null"
                                                        ]
                                                    }
                                                },
                                                "required": [
                                                    "uuid",
                                                    "url",
                                                    "subscribed_events",
                                                    "is_active",
                                                    "consecutive_failure_count",
                                                    "last_triggered_at",
                                                    "latest_delivery",
                                                    "created_at"
                                                ]
                                            }
                                        },
                                        "meta": {
                                            "type": "string"
                                        },
                                        "error": {
                                            "type": "null"
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "meta",
                                        "error"
                                    ]
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "null"
                                        },
                                        "meta": {
                                            "type": "string"
                                        },
                                        "error": {
                                            "type": "object",
                                            "properties": {
                                                "code": {
                                                    "type": "string",
                                                    "const": "organisation_not_found"
                                                },
                                                "message": {
                                                    "type": "string",
                                                    "const": "Organisation context is required."
                                                },
                                                "details": {
                                                    "type": "null"
                                                }
                                            },
                                            "required": [
                                                "code",
                                                "message",
                                                "details"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "meta",
                                        "error"
                                    ]
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "operationId": "webhookSettings.store",
                "tags": [
                    "WebhookSettings"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "url": {
                                        "type": "string",
                                        "format": "uri",
                                        "maxLength": 500
                                    },
                                    "subscribed_events": {
                                        "type": "array",
                                        "items": {
                                            "type": "string",
                                            "enum": [
                                                ""
                                            ]
                                        },
                                        "minItems": 1
                                    }
                                },
                                "required": [
                                    "url",
                                    "subscribed_events"
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "201": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "uuid": {
                                                    "type": "string"
                                                },
                                                "url": {
                                                    "type": "string"
                                                },
                                                "secret": {
                                                    "type": "string"
                                                },
                                                "subscribed_events": {
                                                    "type": "string",
                                                    "description": "Shown only once upon creation"
                                                },
                                                "is_active": {
                                                    "type": "string"
                                                },
                                                "created_at": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                }
                                            },
                                            "required": [
                                                "uuid",
                                                "url",
                                                "secret",
                                                "subscribed_events",
                                                "is_active",
                                                "created_at"
                                            ]
                                        },
                                        "meta": {
                                            "type": "string"
                                        },
                                        "error": {
                                            "type": "null"
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "meta",
                                        "error"
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationException"
                    },
                    "403": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "null"
                                        },
                                        "meta": {
                                            "type": "string"
                                        },
                                        "error": {
                                            "type": "object",
                                            "properties": {
                                                "code": {
                                                    "type": "string",
                                                    "const": "webhooks_disabled"
                                                },
                                                "message": {
                                                    "type": "string",
                                                    "const": "Your current subscription plan does not allow outbound webhooks."
                                                },
                                                "details": {
                                                    "type": "object",
                                                    "properties": {
                                                        "plan": {
                                                            "type": "string"
                                                        }
                                                    },
                                                    "required": [
                                                        "plan"
                                                    ]
                                                }
                                            },
                                            "required": [
                                                "code",
                                                "message",
                                                "details"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "meta",
                                        "error"
                                    ]
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "null"
                                        },
                                        "meta": {
                                            "type": "string"
                                        },
                                        "error": {
                                            "type": "object",
                                            "properties": {
                                                "code": {
                                                    "type": "string",
                                                    "const": "organisation_not_found"
                                                },
                                                "message": {
                                                    "type": "string",
                                                    "const": "Organisation context is required."
                                                },
                                                "details": {
                                                    "type": "null"
                                                }
                                            },
                                            "required": [
                                                "code",
                                                "message",
                                                "details"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "meta",
                                        "error"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v1/settings/webhooks/{uuid}": {
            "patch": {
                "operationId": "webhookSettings.update",
                "tags": [
                    "WebhookSettings"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "url": {
                                        "type": "string",
                                        "format": "uri",
                                        "maxLength": 500
                                    },
                                    "subscribed_events": {
                                        "type": "array",
                                        "items": {
                                            "type": "string",
                                            "enum": [
                                                ""
                                            ]
                                        },
                                        "minItems": 1
                                    },
                                    "is_active": {
                                        "type": "boolean"
                                    }
                                }
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "uuid": {
                                                    "type": "string"
                                                },
                                                "url": {
                                                    "type": "string"
                                                },
                                                "subscribed_events": {
                                                    "type": "string"
                                                },
                                                "is_active": {
                                                    "type": "string"
                                                },
                                                "consecutive_failure_count": {
                                                    "type": "string"
                                                },
                                                "last_triggered_at": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                }
                                            },
                                            "required": [
                                                "uuid",
                                                "url",
                                                "subscribed_events",
                                                "is_active",
                                                "consecutive_failure_count",
                                                "last_triggered_at"
                                            ]
                                        },
                                        "meta": {
                                            "type": "string"
                                        },
                                        "error": {
                                            "type": "null"
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "meta",
                                        "error"
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationException"
                    },
                    "404": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "anyOf": [
                                        {
                                            "type": "object",
                                            "properties": {
                                                "data": {
                                                    "type": "null"
                                                },
                                                "meta": {
                                                    "type": "string"
                                                },
                                                "error": {
                                                    "type": "object",
                                                    "properties": {
                                                        "code": {
                                                            "type": "string",
                                                            "const": "webhook_not_found"
                                                        },
                                                        "message": {
                                                            "type": "string",
                                                            "const": "Webhook not found."
                                                        },
                                                        "details": {
                                                            "type": "null"
                                                        }
                                                    },
                                                    "required": [
                                                        "code",
                                                        "message",
                                                        "details"
                                                    ]
                                                }
                                            },
                                            "required": [
                                                "data",
                                                "meta",
                                                "error"
                                            ]
                                        },
                                        {
                                            "type": "object",
                                            "properties": {
                                                "data": {
                                                    "type": "null"
                                                },
                                                "meta": {
                                                    "type": "string"
                                                },
                                                "error": {
                                                    "type": "object",
                                                    "properties": {
                                                        "code": {
                                                            "type": "string",
                                                            "const": "organisation_not_found"
                                                        },
                                                        "message": {
                                                            "type": "string",
                                                            "const": "Organisation context is required."
                                                        },
                                                        "details": {
                                                            "type": "null"
                                                        }
                                                    },
                                                    "required": [
                                                        "code",
                                                        "message",
                                                        "details"
                                                    ]
                                                }
                                            },
                                            "required": [
                                                "data",
                                                "meta",
                                                "error"
                                            ]
                                        }
                                    ]
                                }
                            }
                        }
                    }
                }
            },
            "delete": {
                "operationId": "webhookSettings.destroy",
                "tags": [
                    "WebhookSettings"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "deleted": {
                                                    "type": "boolean"
                                                }
                                            },
                                            "required": [
                                                "deleted"
                                            ]
                                        },
                                        "meta": {
                                            "type": "string"
                                        },
                                        "error": {
                                            "type": "null"
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "meta",
                                        "error"
                                    ]
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "anyOf": [
                                        {
                                            "type": "object",
                                            "properties": {
                                                "data": {
                                                    "type": "null"
                                                },
                                                "meta": {
                                                    "type": "string"
                                                },
                                                "error": {
                                                    "type": "object",
                                                    "properties": {
                                                        "code": {
                                                            "type": "string",
                                                            "const": "webhook_not_found"
                                                        },
                                                        "message": {
                                                            "type": "string",
                                                            "const": "Webhook not found."
                                                        },
                                                        "details": {
                                                            "type": "null"
                                                        }
                                                    },
                                                    "required": [
                                                        "code",
                                                        "message",
                                                        "details"
                                                    ]
                                                }
                                            },
                                            "required": [
                                                "data",
                                                "meta",
                                                "error"
                                            ]
                                        },
                                        {
                                            "type": "object",
                                            "properties": {
                                                "data": {
                                                    "type": "null"
                                                },
                                                "meta": {
                                                    "type": "string"
                                                },
                                                "error": {
                                                    "type": "object",
                                                    "properties": {
                                                        "code": {
                                                            "type": "string",
                                                            "const": "organisation_not_found"
                                                        },
                                                        "message": {
                                                            "type": "string",
                                                            "const": "Organisation context is required."
                                                        },
                                                        "details": {
                                                            "type": "null"
                                                        }
                                                    },
                                                    "required": [
                                                        "code",
                                                        "message",
                                                        "details"
                                                    ]
                                                }
                                            },
                                            "required": [
                                                "data",
                                                "meta",
                                                "error"
                                            ]
                                        }
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v1/settings/webhooks/{uuid}/ping": {
            "post": {
                "operationId": "webhookSettings.ping",
                "tags": [
                    "WebhookSettings"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "delivery_uuid": {
                                                    "type": "string"
                                                },
                                                "status": {
                                                    "type": "string"
                                                },
                                                "response_status": {
                                                    "type": "string"
                                                },
                                                "duration_ms": {
                                                    "type": "string"
                                                },
                                                "error_message": {
                                                    "type": "string"
                                                }
                                            },
                                            "required": [
                                                "delivery_uuid",
                                                "status",
                                                "response_status",
                                                "duration_ms",
                                                "error_message"
                                            ]
                                        },
                                        "meta": {
                                            "type": "string"
                                        },
                                        "error": {
                                            "type": "null"
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "meta",
                                        "error"
                                    ]
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "anyOf": [
                                        {
                                            "type": "object",
                                            "properties": {
                                                "data": {
                                                    "type": "null"
                                                },
                                                "meta": {
                                                    "type": "string"
                                                },
                                                "error": {
                                                    "type": "object",
                                                    "properties": {
                                                        "code": {
                                                            "type": "string",
                                                            "const": "webhook_not_found"
                                                        },
                                                        "message": {
                                                            "type": "string",
                                                            "const": "Webhook not found."
                                                        },
                                                        "details": {
                                                            "type": "null"
                                                        }
                                                    },
                                                    "required": [
                                                        "code",
                                                        "message",
                                                        "details"
                                                    ]
                                                }
                                            },
                                            "required": [
                                                "data",
                                                "meta",
                                                "error"
                                            ]
                                        },
                                        {
                                            "type": "object",
                                            "properties": {
                                                "data": {
                                                    "type": "null"
                                                },
                                                "meta": {
                                                    "type": "string"
                                                },
                                                "error": {
                                                    "type": "object",
                                                    "properties": {
                                                        "code": {
                                                            "type": "string",
                                                            "const": "organisation_not_found"
                                                        },
                                                        "message": {
                                                            "type": "string",
                                                            "const": "Organisation context is required."
                                                        },
                                                        "details": {
                                                            "type": "null"
                                                        }
                                                    },
                                                    "required": [
                                                        "code",
                                                        "message",
                                                        "details"
                                                    ]
                                                }
                                            },
                                            "required": [
                                                "data",
                                                "meta",
                                                "error"
                                            ]
                                        }
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v1/settings/webhooks/{uuid}/deliveries": {
            "get": {
                "operationId": "webhookSettings.deliveries",
                "tags": [
                    "WebhookSettings"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "type": "object",
                                                "properties": {
                                                    "uuid": {
                                                        "type": "string"
                                                    },
                                                    "event": {
                                                        "type": "string"
                                                    },
                                                    "payload": {
                                                        "type": "string"
                                                    },
                                                    "response_status": {
                                                        "type": "string"
                                                    },
                                                    "response_body": {
                                                        "type": "string"
                                                    },
                                                    "duration_ms": {
                                                        "type": "string"
                                                    },
                                                    "attempt": {
                                                        "type": "string"
                                                    },
                                                    "status": {
                                                        "type": "string"
                                                    },
                                                    "error_message": {
                                                        "type": "string"
                                                    },
                                                    "created_at": {
                                                        "type": [
                                                            "string",
                                                            "null"
                                                        ]
                                                    }
                                                },
                                                "required": [
                                                    "uuid",
                                                    "event",
                                                    "payload",
                                                    "response_status",
                                                    "response_body",
                                                    "duration_ms",
                                                    "attempt",
                                                    "status",
                                                    "error_message",
                                                    "created_at"
                                                ]
                                            }
                                        },
                                        "meta": {
                                            "type": "string"
                                        },
                                        "error": {
                                            "type": "null"
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "meta",
                                        "error"
                                    ]
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "anyOf": [
                                        {
                                            "type": "object",
                                            "properties": {
                                                "data": {
                                                    "type": "null"
                                                },
                                                "meta": {
                                                    "type": "string"
                                                },
                                                "error": {
                                                    "type": "object",
                                                    "properties": {
                                                        "code": {
                                                            "type": "string",
                                                            "const": "webhook_not_found"
                                                        },
                                                        "message": {
                                                            "type": "string",
                                                            "const": "Webhook not found."
                                                        },
                                                        "details": {
                                                            "type": "null"
                                                        }
                                                    },
                                                    "required": [
                                                        "code",
                                                        "message",
                                                        "details"
                                                    ]
                                                }
                                            },
                                            "required": [
                                                "data",
                                                "meta",
                                                "error"
                                            ]
                                        },
                                        {
                                            "type": "object",
                                            "properties": {
                                                "data": {
                                                    "type": "null"
                                                },
                                                "meta": {
                                                    "type": "string"
                                                },
                                                "error": {
                                                    "type": "object",
                                                    "properties": {
                                                        "code": {
                                                            "type": "string",
                                                            "const": "organisation_not_found"
                                                        },
                                                        "message": {
                                                            "type": "string",
                                                            "const": "Organisation context is required."
                                                        },
                                                        "details": {
                                                            "type": "null"
                                                        }
                                                    },
                                                    "required": [
                                                        "code",
                                                        "message",
                                                        "details"
                                                    ]
                                                }
                                            },
                                            "required": [
                                                "data",
                                                "meta",
                                                "error"
                                            ]
                                        }
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        }
    },
    "components": {
        "responses": {
            "ValidationException": {
                "description": "Validation error",
                "content": {
                    "application/json": {
                        "schema": {
                            "type": "object",
                            "properties": {
                                "message": {
                                    "type": "string",
                                    "description": "Errors overview."
                                },
                                "errors": {
                                    "type": "object",
                                    "description": "A detailed description of each field that failed validation.",
                                    "additionalProperties": {
                                        "type": "array",
                                        "items": {
                                            "type": "string"
                                        }
                                    }
                                }
                            },
                            "required": [
                                "message",
                                "errors"
                            ]
                        }
                    }
                }
            }
        }
    }
}
