{"openapi":"3.0.1","info":{"title":"Stats operator Iopole API","description":"## Iopole API\n\nTo use the Iopole APIs, you must have a **`clientId`** and a **`clientSecret`**.\n\nYou can obtain these credentials by one of the following methods:\n- 📧 Contact the Iopole team at **support@iopole.com**\n- 🧪 Connect to **[Iopole Labs](https://labs.iopole.io)** to create your own sandbox environment\n\n### 📚 API Documentation\n- 🧪 **Preproduction**: [https://docs.ppd.iopole.fr/](https://docs.ppd.iopole.fr/)\n- 🚀 **Production**: [https://docs.iopole.com/](https://docs.iopole.com/)\n\n### 🛠️ Support & Monitoring (production only)\n- 📈 **System status**: [https://uptime.iopole.com](https://uptime.iopole.com)\n  - View real-time platform availability\n  - Subscribe to incident notifications\n  - Receive alerts for planned maintenance periods\n- 📝 **Release notes**: [https://release.iopole.com](https://release.iopole.com)\n","version":"1.0.0","contact":{"name":"Iopole","email":"support@iopole.com"},"x-doc":{"text":"## Iopole API\n\nTo use the Iopole APIs, you must have a **`clientId`** and a **`clientSecret`**.\n\nYou can obtain these credentials by one of the following methods:\n- 📧 Contact the Iopole team at **support@iopole.com**\n- 🧪 Connect to **[Iopole Labs](https://labs.iopole.io)** to create your own sandbox environment\n\n### 📚 API Documentation\n- 🧪 **Preproduction**: [https://docs.ppd.iopole.fr/](https://docs.ppd.iopole.fr/)\n- 🚀 **Production**: [https://docs.iopole.com/](https://docs.iopole.com/)\n\n### 🛠️ Support & Monitoring (production only)\n- 📈 **System status**: [https://uptime.iopole.com](https://uptime.iopole.com)\n  - View real-time platform availability\n  - Subscribe to incident notifications\n  - Receive alerts for planned maintenance periods\n- 📝 **Release notes**: [https://release.iopole.com](https://release.iopole.com)\n"}},"security":[{"oauth2ClientCredentials":[]}],"components":{"securitySchemes":{"oauth2ClientCredentials":{"type":"oauth2","flows":{"clientCredentials":{"tokenUrl":"https://auth.preprod.iopole.fr/realms/iopole/protocol/openid-connect/token","scopes":{}}}}}},"paths":{"/v1/stats/{network}/summary":{"get":{"description":"Retrieve a summary on a given interval","summary":"Retrieve a summary on a given interval","tags":["Statistic"],"security":[{"oauth2ClientCredentials":[]}],"parameters":[{"in":"header","name":"customer-id","description":"The unique identifier for the customer.","required":false,"schema":{"type":"string","format":"uuid"},"x-doc":{"text":"The unique identifier for the customer."}},{"name":"interval","in":"path","required":true,"schema":{"type":"string","enum":["week","month","threeMonths","year","hour","day","today","all_time"]}},{"schema":{"type":"string","enum":["EDI","INVOICING"],"description":"Network type for the statistics query","example":"EDI","x-doc":{"text":"Network type for the statistics query"}},"required":true,"name":"network","in":"path"},{"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"Start date for the statistics query","example":"2023-01-01","x-doc":{"text":"Start date for the statistics query"}},"required":false,"name":"start","in":"query"},{"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"End date for the statistics query","example":"2023-01-01","x-doc":{"text":"End date for the statistics query"}},"required":false,"name":"end","in":"query"},{"schema":{"type":"string","format":"uuid","description":"Client ID for the statistics query","example":"123e4567-e89b-12d3-a456-426614174000","x-doc":{"text":"Client ID for the statistics query"}},"required":false,"name":"client","in":"query"}],"responses":{"200":{"description":"Summary data","content":{"application/json":{"schema":{"type":"object","properties":{"total":{"type":"number"},"inbound":{"type":"number"},"outbound":{"type":"number"},"inbound_errors":{"type":"number"},"outbound_errors":{"type":"number"},"processing":{"type":"number"}},"required":["total","inbound","outbound","inbound_errors","outbound_errors","processing"],"description":"Summary","x-doc":{"text":"Summary"}}}},"x-doc":{"text":"Summary data"}},"401":{"description":"Unauthorized - Authentication is required and has failed or has not yet been provided.","x-doc":{"text":"Unauthorized - Authentication is required and has failed or has not yet been provided."}},"403":{"description":"Forbidden - The server understood the request, but it refuses to authorize it.","x-doc":{"text":"Forbidden - The server understood the request, but it refuses to authorize it."}}},"x-doc":{"text":"Retrieve a summary on a given interval"}}},"/v1/stats/{network}/messages":{"get":{"description":"Get the count of messages and errors on a given interval","summary":"Get the count of messages and errors on a given interval","tags":["Statistic"],"security":[{"oauth2ClientCredentials":[]}],"parameters":[{"schema":{"type":"string","enum":["EDI","INVOICING"],"description":"Network type for the statistics query","example":"EDI","x-doc":{"text":"Network type for the statistics query"}},"required":true,"name":"network","in":"path"},{"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"Start date for the statistics query","example":"2023-01-01","x-doc":{"text":"Start date for the statistics query"}},"required":false,"name":"start","in":"query"},{"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"End date for the statistics query","example":"2023-01-01","x-doc":{"text":"End date for the statistics query"}},"required":false,"name":"end","in":"query"},{"schema":{"type":"string","format":"uuid","description":"Client ID for the statistics query","example":"123e4567-e89b-12d3-a456-426614174000","x-doc":{"text":"Client ID for the statistics query"}},"required":false,"name":"client","in":"query"}],"responses":{"200":{"description":"List of messages","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"date":{"type":"string"},"outbound":{"type":"number"},"inbound":{"type":"number"},"outbound_errors":{"type":"number"},"inbound_errors":{"type":"number"}},"required":["date","outbound","inbound","outbound_errors","inbound_errors"]}},"truncInterval":{"anyOf":[{"type":"string","enum":["month","day","year","week","quarter"]},{"nullable":true},{"nullable":true}]}},"required":["data","truncInterval"]}}},"x-doc":{"text":"List of messages"}},"401":{"description":"Unauthorized - Authentication is required and has failed or has not yet been provided.","x-doc":{"text":"Unauthorized - Authentication is required and has failed or has not yet been provided."}},"403":{"description":"Forbidden - The server understood the request, but it refuses to authorize it.","x-doc":{"text":"Forbidden - The server understood the request, but it refuses to authorize it."}}},"x-doc":{"text":"Get the count of messages and errors on a given interval"}}},"/v1/stats/{network}/frequentSuppliers":{"get":{"summary":"Get Top 5 Suppliers by Volume","description":"Returns a list of the 5 suppliers with the highest number of transactions, ranked by volume.","tags":["Statistic"],"security":[{"oauth2ClientCredentials":[]}],"parameters":[{"schema":{"type":"string","enum":["EDI","INVOICING"],"description":"Network type for the statistics query","example":"EDI","x-doc":{"text":"Network type for the statistics query"}},"required":true,"name":"network","in":"path"},{"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"Start date for the statistics query","example":"2023-01-01","x-doc":{"text":"Start date for the statistics query"}},"required":false,"name":"start","in":"query"},{"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"End date for the statistics query","example":"2023-01-01","x-doc":{"text":"End date for the statistics query"}},"required":false,"name":"end","in":"query"},{"schema":{"type":"string","format":"uuid","description":"Client ID for the statistics query","example":"123e4567-e89b-12d3-a456-426614174000","x-doc":{"text":"Client ID for the statistics query"}},"required":false,"name":"client","in":"query"},{"schema":{"type":"string","enum":["INBOUND","OUTBOUND"],"default":"OUTBOUND","description":"Direction of the supplier for the statistics query","x-doc":{"text":"Direction of the supplier for the statistics query"}},"required":false,"name":"direction","in":"query"}],"responses":{"200":{"description":"List of suppliers","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"contact_name":{"type":"string"},"messages_count":{"type":"number"},"errors_count":{"type":"number"}},"required":["contact_name","messages_count","errors_count"]}}}},"x-doc":{"text":"List of suppliers"}},"401":{"description":"Unauthorized - Authentication is required and has failed or has not yet been provided.","x-doc":{"text":"Unauthorized - Authentication is required and has failed or has not yet been provided."}},"403":{"description":"Forbidden - The server understood the request, but it refuses to authorize it.","x-doc":{"text":"Forbidden - The server understood the request, but it refuses to authorize it."}}},"x-doc":{"text":"Returns a list of the 5 suppliers with the highest number of transactions, ranked by volume."}}},"/v1/stats/{network}/tagsDistribution":{"get":{"description":"Get the distribution of tags on a given interval","summary":"Get the distribution of tags on a given interval","tags":["Statistic"],"security":[{"oauth2ClientCredentials":[]}],"parameters":[{"in":"header","name":"customer-id","description":"The unique identifier for the customer.","required":false,"schema":{"type":"string","format":"uuid"},"x-doc":{"text":"The unique identifier for the customer."}},{"name":"interval","in":"path","required":true,"schema":{"type":"string","enum":["week","month","threeMonths","year","hour","day","today","all_time"]}},{"schema":{"type":"string","enum":["EDI","INVOICING"],"description":"Network type for the statistics query","example":"EDI","x-doc":{"text":"Network type for the statistics query"}},"required":true,"name":"network","in":"path"},{"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"Start date for the statistics query","example":"2023-01-01","x-doc":{"text":"Start date for the statistics query"}},"required":false,"name":"start","in":"query"},{"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"End date for the statistics query","example":"2023-01-01","x-doc":{"text":"End date for the statistics query"}},"required":false,"name":"end","in":"query"},{"schema":{"type":"string","format":"uuid","description":"Client ID for the statistics query","example":"123e4567-e89b-12d3-a456-426614174000","x-doc":{"text":"Client ID for the statistics query"}},"required":false,"name":"client","in":"query"}],"responses":{"200":{"description":"Distribution of status","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"count":{"type":"integer"},"value":{"type":"string"}},"required":["count","value"]},"description":"Distribution of status or types depending on the network","x-doc":{"text":"Distribution of status or types depending on the network"}}}},"x-doc":{"text":"Distribution of status"}},"401":{"description":"Unauthorized - Authentication is required and has failed or has not yet been provided.","x-doc":{"text":"Unauthorized - Authentication is required and has failed or has not yet been provided."}},"403":{"description":"Forbidden - The server understood the request, but it refuses to authorize it.","x-doc":{"text":"Forbidden - The server understood the request, but it refuses to authorize it."}}},"x-doc":{"text":"Get the distribution of tags on a given interval"}}},"/v1/stats/{network}/lastErrors":{"get":{"summary":"Get Last 5 Errors in Time Interval","description":"Retrieves the latest 5 error events that occurred during a defined time interval, useful for recent troubleshooting and monitoring.","tags":["Statistic"],"security":[{"oauth2ClientCredentials":[]}],"parameters":[{"in":"header","name":"customer-id","description":"The unique identifier for the customer.","required":false,"schema":{"type":"string","format":"uuid"},"x-doc":{"text":"The unique identifier for the customer."}},{"schema":{"type":"string","enum":["EDI","INVOICING"],"description":"Network type for the statistics query","example":"EDI","x-doc":{"text":"Network type for the statistics query"}},"required":true,"name":"network","in":"path"},{"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"Start date for the statistics query","example":"2023-01-01","x-doc":{"text":"Start date for the statistics query"}},"required":false,"name":"start","in":"query"},{"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"End date for the statistics query","example":"2023-01-01","x-doc":{"text":"End date for the statistics query"}},"required":false,"name":"end","in":"query"},{"schema":{"type":"string","format":"uuid","description":"Client ID for the statistics query","example":"123e4567-e89b-12d3-a456-426614174000","x-doc":{"text":"Client ID for the statistics query"}},"required":false,"name":"client","in":"query"}],"responses":{"200":{"description":"List of errors","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"from_user":{"type":"string"},"to_user":{"type":"string"},"message_state":{"type":"string"},"create_date":{"type":"string"}},"required":["id","from_user","to_user","message_state","create_date"]},"description":"List of errors","x-doc":{"text":"List of errors"}}}},"x-doc":{"text":"List of errors"}},"401":{"description":"Unauthorized - Authentication is required and has failed or has not yet been provided.","x-doc":{"text":"Unauthorized - Authentication is required and has failed or has not yet been provided."}},"403":{"description":"Forbidden - The server understood the request, but it refuses to authorize it.","x-doc":{"text":"Forbidden - The server understood the request, but it refuses to authorize it."}}},"x-doc":{"text":"Retrieves the latest 5 error events that occurred during a defined time interval, useful for recent troubleshooting and monitoring."}}},"/v1/stats/{network}/errorBreakdown":{"get":{"summary":"Get Error Breakdown","description":"Returns a list of error types and the number of occurrences for each type, providing insight into the most common issues.","tags":["Statistic"],"security":[{"oauth2ClientCredentials":[]}],"parameters":[{"schema":{"type":"string","enum":["EDI","INVOICING"],"description":"Network type for the statistics query","example":"EDI","x-doc":{"text":"Network type for the statistics query"}},"required":true,"name":"network","in":"path"},{"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"Start date for the statistics query","example":"2023-01-01","x-doc":{"text":"Start date for the statistics query"}},"required":false,"name":"start","in":"query"},{"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"End date for the statistics query","example":"2023-01-01","x-doc":{"text":"End date for the statistics query"}},"required":false,"name":"end","in":"query"},{"schema":{"type":"string","format":"uuid","description":"Client ID for the statistics query","example":"123e4567-e89b-12d3-a456-426614174000","x-doc":{"text":"Client ID for the statistics query"}},"required":false,"name":"client","in":"query"}],"responses":{"200":{"description":"List of errors","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"messages_count":{"type":"number","minimum":0},"timestamp":{"type":"string"}},"required":["messages_count","timestamp"]},"description":"List of messages with errors","x-doc":{"text":"List of messages with errors"}}}},"x-doc":{"text":"List of errors"}},"401":{"description":"Unauthorized - Authentication is required and has failed or has not yet been provided.","x-doc":{"text":"Unauthorized - Authentication is required and has failed or has not yet been provided."}},"403":{"description":"Forbidden - The server understood the request, but it refuses to authorize it.","x-doc":{"text":"Forbidden - The server understood the request, but it refuses to authorize it."}}},"x-doc":{"text":"Returns a list of error types and the number of occurrences for each type, providing insight into the most common issues."}}},"/v1/stats/{network}/successErrors/{interval}":{"get":{"description":"Compare the count of successful and errored messages on a given interval","summary":"Compare the count of successful and errored messages on a given interval","tags":["Statistic"],"security":[{"oauth2ClientCredentials":[]}],"parameters":[{"in":"header","name":"customer-id","description":"The unique identifier for the customer.","required":false,"schema":{"type":"string","format":"uuid"},"x-doc":{"text":"The unique identifier for the customer."}},{"name":"network","in":"path","required":true,"schema":{"type":"string","enum":["EDI","INVOICING"]}},{"name":"interval","in":"path","required":true,"schema":{"type":"string","enum":["week","month","threeMonths","year","hour","day","today","all_time"]}}],"responses":{"200":{"description":"List of errors","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"error_count":{"type":"number","minimum":0,"description":"Number of errored messages","x-doc":{"text":"Number of errored messages"}},"success_count":{"type":"number","minimum":0,"description":"Number of successful messages","x-doc":{"text":"Number of successful messages"}},"timestamp":{"type":"string","description":"Timestamp","x-doc":{"text":"Timestamp"}}},"required":["error_count","success_count","timestamp"]},"description":"List of successful and errored messages","x-doc":{"text":"List of successful and errored messages"}}}},"x-doc":{"text":"List of errors"}},"401":{"description":"Unauthorized - Authentication is required and has failed or has not yet been provided.","x-doc":{"text":"Unauthorized - Authentication is required and has failed or has not yet been provided."}},"403":{"description":"Forbidden - The server understood the request, but it refuses to authorize it.","x-doc":{"text":"Forbidden - The server understood the request, but it refuses to authorize it."}}},"x-doc":{"text":"Compare the count of successful and errored messages on a given interval"}}}}}