{
    "openapi": "3.1.0",
    "info": {
        "title": "EMPOWO public API",
        "version": "1.0.0",
        "summary": "Read the EMPOWO service catalogue and send an inquiry on behalf of a person.",
        "description": "EMPOWO is a maintenance engineering company based in Rotterdam, the Netherlands, that helps small and mid-sized industrial plants in the Netherlands, Belgium, the rest of Europe and Latin America get their spare parts under control: stock analysis, critical spares, parts lists, multi-brand sourcing and reverse engineering of obsolete parts. No authentication. The inquiry endpoint is rate limited per IP and sends a confirmation email to the person named (human in the loop).",
        "contact": {
            "name": "EMPOWO",
            "email": "info@empowo.com",
            "url": "https://empowo.com/en/contact"
        }
    },
    "servers": [
        {
            "url": "https://empowo.com"
        }
    ],
    "paths": {
        "/api/services.json": {
            "get": {
                "operationId": "listServices",
                "summary": "List services, plant visit packages, prices and booking links",
                "parameters": [
                    {
                        "name": "lang",
                        "in": "query",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "enum": [
                                "en",
                                "nl",
                                "es"
                            ],
                            "default": "en"
                        },
                        "description": "Language of names, summaries and URLs"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Service catalogue",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Catalogue"
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "Unsupported language",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/api/inquiry": {
            "post": {
                "operationId": "createInquiry",
                "summary": "Send an inquiry or quote request to EMPOWO",
                "description": "For AI agents acting for a person. Only the listed fields are accepted. EMPOWO receives the inquiry by email tagged [AGENT] and the person named receives a confirmation email. For a stopped production line, tell the person to phone +31 6 25 30 52 96 instead.",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/Inquiry"
                            },
                            "example": {
                                "name": "Jane Doe",
                                "email": "jane.doe@example.com",
                                "company": "Example Packaging BV",
                                "country": "Netherlands",
                                "service": "spare-parts-analysis",
                                "language": "en",
                                "agent": "Example Assistant",
                                "consent": true,
                                "message": "We hold about 3,000 spare part items in an ERP and want to know what a spare parts analysis would involve."
                            }
                        }
                    }
                },
                "responses": {
                    "201": {
                        "description": "Inquiry received",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/InquiryReceipt"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Body is not a JSON object",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "413": {
                        "description": "Body larger than 16 KB",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "415": {
                        "description": "Content-Type is not application/json",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "Validation failed: unknown, missing or invalid fields (see errors)",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "Rate limit reached (5 inquiries per hour per IP)",
                        "headers": {
                            "Retry-After": {
                                "schema": {
                                    "type": "integer"
                                },
                                "description": "Seconds to wait"
                            }
                        },
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "503": {
                        "description": "The inquiry could not be delivered",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "Inquiry": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                    "name",
                    "email",
                    "message",
                    "consent"
                ],
                "properties": {
                    "name": {
                        "type": "string",
                        "maxLength": 100,
                        "description": "Full name of the person the inquiry is for",
                        "minLength": 1
                    },
                    "email": {
                        "type": "string",
                        "maxLength": 254,
                        "description": "Email address of that person. The confirmation and the reply go here.",
                        "format": "email"
                    },
                    "message": {
                        "type": "string",
                        "maxLength": 4000,
                        "description": "What they need: equipment, situation, quantities, urgency",
                        "minLength": 20
                    },
                    "company": {
                        "type": "string",
                        "maxLength": 200,
                        "description": "Company name"
                    },
                    "country": {
                        "type": "string",
                        "maxLength": 80,
                        "description": "Country of the plant"
                    },
                    "phone": {
                        "type": "string",
                        "maxLength": 30,
                        "description": "Phone number with country code"
                    },
                    "service": {
                        "type": "string",
                        "enum": [
                            "machine-profiles-spare-parts-lists",
                            "maintenance-kits",
                            "spare-parts-analysis",
                            "multi-brand-sourcing",
                            "industrial-spare-parts-supply",
                            "reverse-engineering",
                            "spare-part-redesign",
                            "preventive-maintenance-programmes",
                            "maintenance-analysis-upgrades",
                            "process-analysis",
                            "technical-documentation",
                            "breakdown-response",
                            "plant-visit",
                            "other"
                        ],
                        "description": "Service id from /api/services.json"
                    },
                    "language": {
                        "type": "string",
                        "enum": [
                            "en",
                            "nl",
                            "es"
                        ],
                        "default": "en",
                        "description": "Language for the confirmation and the reply"
                    },
                    "agent": {
                        "type": "string",
                        "maxLength": 100,
                        "description": "Name of the AI agent or product sending the inquiry"
                    },
                    "consent": {
                        "type": "boolean",
                        "const": true,
                        "description": "Must be true: the person named asked for this inquiry to be sent and agrees to be contacted by EMPOWO"
                    }
                }
            },
            "InquiryReceipt": {
                "type": "object",
                "required": [
                    "reference",
                    "status"
                ],
                "properties": {
                    "reference": {
                        "type": "string",
                        "description": "Reference number, e.g. EMP-261113-A1B2",
                        "pattern": "^EMP-[0-9]{6}-[0-9A-F]{4}$"
                    },
                    "status": {
                        "type": "string",
                        "const": "received"
                    },
                    "confirmation_sent_to": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "message": {
                        "type": "string"
                    },
                    "next": {
                        "type": "object",
                        "properties": {
                            "book_a_call": {
                                "type": "string",
                                "format": "uri"
                            },
                            "breakdown_phone": {
                                "type": "string"
                            }
                        }
                    }
                }
            },
            "Catalogue": {
                "type": "object",
                "required": [
                    "organization",
                    "lang",
                    "services"
                ],
                "properties": {
                    "organization": {
                        "type": "object"
                    },
                    "lang": {
                        "type": "string",
                        "enum": [
                            "en",
                            "nl",
                            "es"
                        ]
                    },
                    "services": {
                        "type": "array",
                        "items": {
                            "$ref": "#/components/schemas/Service"
                        }
                    },
                    "booking": {
                        "type": "object"
                    },
                    "inquiry_api": {
                        "type": "object"
                    }
                }
            },
            "Service": {
                "type": "object",
                "required": [
                    "id",
                    "type",
                    "name",
                    "summary",
                    "url"
                ],
                "properties": {
                    "id": {
                        "type": "string"
                    },
                    "type": {
                        "type": "string",
                        "enum": [
                            "service",
                            "plant_visit_package"
                        ]
                    },
                    "name": {
                        "type": "string"
                    },
                    "summary": {
                        "type": "string"
                    },
                    "deliverables": {
                        "type": "array",
                        "items": {
                            "type": "string"
                        }
                    },
                    "duration": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "price": {
                        "type": "object",
                        "required": [
                            "type",
                            "currency",
                            "vat_included"
                        ],
                        "properties": {
                            "type": {
                                "type": "string",
                                "enum": [
                                    "fixed",
                                    "from",
                                    "on_request"
                                ]
                            },
                            "amount": {
                                "type": "number"
                            },
                            "currency": {
                                "type": "string",
                                "const": "EUR"
                            },
                            "vat_included": {
                                "type": "boolean"
                            },
                            "note": {
                                "type": "string"
                            }
                        }
                    },
                    "url": {
                        "type": "string",
                        "format": "uri"
                    },
                    "booking_url": {
                        "type": "string",
                        "format": "uri"
                    },
                    "alternates": {
                        "type": "object",
                        "additionalProperties": {
                            "type": "string",
                            "format": "uri"
                        }
                    }
                }
            },
            "Error": {
                "type": "object",
                "required": [
                    "error"
                ],
                "properties": {
                    "error": {
                        "type": "string"
                    },
                    "message": {
                        "type": "string"
                    },
                    "errors": {
                        "type": "array",
                        "items": {
                            "type": "object",
                            "properties": {
                                "field": {
                                    "type": "string"
                                },
                                "issue": {
                                    "type": "string"
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}